Merge branch 'ss/describe-dirty-in-the-right-directory'
authorJunio C Hamano <gitster@pobox.com>
Thu, 7 Feb 2019 06:05:29 +0000 (22:05 -0800)
committerJunio C Hamano <gitster@pobox.com>
Thu, 7 Feb 2019 06:05:29 +0000 (22:05 -0800)
"git --work-tree=$there --git-dir=$here describe --dirty" did not
work correctly as it did not pay attention to the location of the
worktree specified by the user by mistake, which has been
corrected.

* ss/describe-dirty-in-the-right-directory:
  t6120: test for describe with a bare repository
  describe: setup working tree for --dirty

1  2 
builtin/describe.c
t/t6120-describe.sh

@@@ -630,7 -617,8 +630,8 @@@ int cmd_describe(int argc, const char *
                        struct argv_array args = ARGV_ARRAY_INIT;
                        int fd, result;
  
 -                      read_cache_preload(NULL);
+                       setup_work_tree();
 +                      read_cache();
                        refresh_index(&the_index, REFRESH_QUIET|REFRESH_UNMERGED,
                                      NULL, NULL, NULL);
                        fd = hold_locked_index(&index_lock, 0);
Simple merge