git@vger.kernel.org mailing list mirror (one of many)
 help / color / mirror / code / Atom feed
From: Sebastian Staudt <koraktor@gmail.com>
To: Git Mailing List <git@vger.kernel.org>
Cc: Junio C Hamano <gitster@pobox.com>, Jeff King <peff@peff.net>,
	Duy Nguyen <pclouds@gmail.com>,
	Sebastian Staudt <koraktor@gmail.com>
Subject: [PATCH v2 2/3] Setup working tree in describe
Date: Sat, 26 Jan 2019 21:49:50 +0100	[thread overview]
Message-ID: <20190126204951.42455-2-koraktor@gmail.com> (raw)
In-Reply-To: <20190126204951.42455-1-koraktor@gmail.com>

This ensures the given working tree is used for --dirty.

The implementation of --broken uses diff-index which calls
setup_work_tree() itself.

Signed-off-by: Sebastian Staudt <koraktor@gmail.com>
---
 builtin/describe.c | 1 +
 1 file changed, 1 insertion(+)

diff --git a/builtin/describe.c b/builtin/describe.c
index cc118448ee..b5b7abdc8f 100644
--- a/builtin/describe.c
+++ b/builtin/describe.c
@@ -629,6 +629,7 @@ int cmd_describe(int argc, const char **argv, const char *prefix)
 			struct argv_array args = ARGV_ARRAY_INIT;
 			int fd, result;
 
+			setup_work_tree();
 			read_cache();
 			refresh_index(&the_index, REFRESH_QUIET|REFRESH_UNMERGED,
 				      NULL, NULL, NULL);
-- 
2.20.1


  reply	other threads:[~2019-01-26 20:51 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-01-26 20:49 [PATCH v2 1/3] Add tests for describe with --work-tree Sebastian Staudt
2019-01-26 20:49 ` Sebastian Staudt [this message]
2019-01-27  0:21   ` [PATCH v2 2/3] Setup working tree in describe Duy Nguyen
2019-01-27  7:19     ` Sebastian Staudt
2019-01-26 20:49 ` [PATCH v2 3/3] Add test for describe with a bare repository Sebastian Staudt
2019-01-27  0:25   ` Duy Nguyen
2019-01-27  6:54     ` Sebastian Staudt
2019-01-27  0:07 ` [PATCH v2 1/3] Add tests for describe with --work-tree Duy Nguyen
2019-01-27  7:13   ` Sebastian Staudt
2019-01-28 10:06     ` Duy Nguyen
2019-01-30 16:47       ` Junio C Hamano

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: http://vger.kernel.org/majordomo-info.html

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20190126204951.42455-2-koraktor@gmail.com \
    --to=koraktor@gmail.com \
    --cc=git@vger.kernel.org \
    --cc=gitster@pobox.com \
    --cc=pclouds@gmail.com \
    --cc=peff@peff.net \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this public inbox

	https://80x24.org/mirrors/git.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).