Re: git ate my home directory :-(
From: Junio C Hamano <hidden>
Date: 2016-06-15 22:56:31
Jeff King [off-list ref] writes:
On Tue, Mar 26, 2013 at 04:48:44PM +0700, Nguyen Thai Ngoc Duy wrote:quoted
Something like this, maybe? -- 8< -- Subject: [PATCH] git.txt: document the implicit working tree setting with GIT_DIR Signed-off-by: Nguyễn Thái Ngọc Duy <redacted> --- Documentation/git.txt | 2 ++ 1 file changed, 2 insertions(+)diff --git a/Documentation/git.txt b/Documentation/git.txt index 7efaa59..ce55abf 100644 --- a/Documentation/git.txt +++ b/Documentation/git.txt@@ -671,6 +671,8 @@ Git so take care if using Cogito etc. specifies a path to use instead of the default `.git` for the base of the repository. The '--git-dir' command-line option also sets this value. + If neither GIT_WORK_TREE nor '--work-tree' is set, the + current directory will become the working tree.I think this is a good thing to mention, but a few nits: 1. core.worktree is another way of setting it 2. This can also be overridden by --bare (at least in "next"). 3. I think having core.bare set will also override this
Yeah. And sorry I kept typing alias. I obviously meant "bare"; the user visible symptom is closely linked to the use of alias, but the most important aspect of the change in 2cd83d10bb6b (setup: suppress implicit "." work-tree for bare repos, 2013-03-08) is about being in a bare repository where by definition working tree does not exist.