Document that 'git -C ""' works and doesn't change directory
authorSZEDER Gábor <szeder.dev@gmail.com>
Sat, 29 Jun 2019 08:24:57 +0000 (10:24 +0200)
committerJunio C Hamano <gitster@pobox.com>
Mon, 1 Jul 2019 17:42:49 +0000 (10:42 -0700)
It's been behaving so since 6a536e2076 (git: treat "git -C '<path>'"
as a no-op when <path> is empty, 2015-03-06).

Signed-off-by: SZEDER Gábor <szeder.dev@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
Documentation/git.txt
index 6ddc1e2ca6830ac165543dad4a57afd6d4b50c49..81f7ecd52c959f74f5b78b45d34ea0c9b041a966 100644 (file)
@@ -56,7 +56,8 @@ help ...`.
        Run as if git was started in '<path>' instead of the current working
        directory.  When multiple `-C` options are given, each subsequent
        non-absolute `-C <path>` is interpreted relative to the preceding `-C
-       <path>`.
+       <path>`.  If '<path>' is present but empty, e.g. `-C ""`, then the
+       current working directory is left unchanged.
 +
 This option affects options that expect path name like `--git-dir` and
 `--work-tree` in that their interpretations of the path names would be