[PATCH v2 0/1] Some left-over add-on for bw/config-h

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Back when bw/config-h was developed (and backported to Git for Windows), I
came up with a patch to use git_dir if commondir is NULL, and contributed
that as v1 of this patch. However, it was deemed a bug if that happens, so
let's instead detect that condition and report it.

Change since v1:

 * Be loud about this bug instead of papering over it.

Johannes Schindelin (1):
  config: report a bug if git_dir exists without commondir

 config.c | 2 ++
 1 file changed, 2 insertions(+)


base-commit: 8858448bb49332d353febc078ce4a3abcc962efe
Published-As: https://github.com/gitgitgadget/git/releases/tags/pr-78%2Fdscho%2Fbw%2Fconfig-h-v2
Fetch-It-Via: git fetch https://github.com/gitgitgadget/git pr-78/dscho/bw/config-h-v2
Pull-Request: https://github.com/gitgitgadget/git/pull/78

Range-diff vs v1:

 1:  a3854e4ed8 ! 1:  0767f98378 do_git_config_sequence(): fall back to git_dir if commondir is NULL
     @@ -1,8 +1,9 @@
      Author: Johannes Schindelin <johannes.schindelin@xxxxxx>
      
     -    do_git_config_sequence(): fall back to git_dir if commondir is NULL
     +    config: report a bug if git_dir exists without commondir
      
     -    Just some defensive programming.
     +    This did happen at some stage, and was fixed relatively quickly. Make
     +    sure that we detect very quickly, too, should that happen again.
      
          Signed-off-by: Johannes Schindelin <johannes.schindelin@xxxxxx>
      
     @@ -14,7 +15,7 @@
       	if (opts->commondir)
       		repo_config = mkpathdup("%s/config", opts->commondir);
      +	else if (opts->git_dir)
     -+		repo_config = mkpathdup("%s/config", opts->git_dir);
     ++		BUG("git_dir without commondir");
       	else
       		repo_config = NULL;
       

-- 
gitgitgadget



[Index of Archives]     [Linux Kernel Development]     [Gcc Help]     [IETF Annouce]     [DCCP]     [Netdev]     [Networking]     [Security]     [V4L]     [Bugtraq]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux SCSI]     [Fedora Users]

  Powered by Linux