From: Junio C Hamano Date: Mon, 1 Aug 2011 22:00:08 +0000 (-0700) Subject: Merge branch 'jc/maint-reset-unmerged-path' X-Git-Tag: v1.7.7-rc0~62 X-Git-Url: https://git.lorimer.id.au/gitweb.git/diff_plain/1df561fb4861708ce208488aa307516c0ecfa968?hp=-c Merge branch 'jc/maint-reset-unmerged-path' * jc/maint-reset-unmerged-path: reset [] paths...: do not mishandle unmerged paths --- 1df561fb4861708ce208488aa307516c0ecfa968 diff --combined diff-lib.c index 2e09500c82,fd61acbdce..b3797592c6 --- a/diff-lib.c +++ b/diff-lib.c @@@ -379,7 -379,8 +379,8 @@@ static void do_oneway_diff(struct unpac if (cached && idx && ce_stage(idx)) { struct diff_filepair *pair; pair = diff_unmerge(&revs->diffopt, idx->name); - fill_filespec(pair->one, idx->sha1, idx->ce_mode); + if (tree) + fill_filespec(pair->one, tree->sha1, tree->ce_mode); return; } @@@ -433,13 -434,8 +434,13 @@@ static int oneway_diff(struct cache_ent if (tree == o->df_conflict_entry) tree = NULL; - if (ce_path_match(idx ? idx : tree, &revs->prune_data)) + if (ce_path_match(idx ? idx : tree, &revs->prune_data)) { do_oneway_diff(o, idx, tree); + if (diff_can_quit_early(&revs->diffopt)) { + o->exiting_early = 1; + return -1; + } + } return 0; }