Thread (8 messages) flat view 8 messages, 3 authors, 2016-06-15

Re: [PATCH] git diff/diff-index/diff-files: call setup_work_tree()

From: Miklos Vajna <hidden>
Date: 2016-06-15 22:45:13

Possibly related (same subject, not in this thread)

On Mon, Aug 25, 2008 at 09:46:37PM +0700, Nguyen Thai Ngoc Duy [off-list ref] wrote:
On 8/25/08, Miklos Vajna [off-list ref] wrote:
quoted
 diff --git a/builtin-diff-index.c b/builtin-diff-index.c
 index 17d851b..b8e0656 100644
 --- a/builtin-diff-index.c
 +++ b/builtin-diff-index.c
 @@ -16,6 +16,7 @@ int cmd_diff_index(int argc, const char **argv, const char *prefix)
        int i;
        int result;

 +       setup_work_tree();
        init_revisions(&rev, prefix);
        git_config(git_diff_basic_config, NULL); /* no "diff" UI options */
        rev.abbrev = 0;
I think this is only needed when cached == 0
quoted
 diff --git a/builtin-diff.c b/builtin-diff.c
 index 7ffea97..86f9255 100644
 --- a/builtin-diff.c
 +++ b/builtin-diff.c
 @@ -244,6 +244,7 @@ int cmd_diff(int argc, const char **argv, const char *prefix)
        int nongit;
        int result = 0;

 +       setup_work_tree();
        /*
         * We could get N tree-ish in the rev.pending_objects list.
         * Also there could be M blobs there, and P pathspecs.
No. git-diff has too many modes, some does not need worktree. This
forces worktree on all modes.
Ah, yes. I just wanted to say that I forgot do a 'make test' and
actually this breaks at least t0020-crlf.sh. I'll post a fixed patch in
a bit.

Sorry.

Attachments

Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help