Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.kernel.org/pub/scm/git/git.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJunio C Hamano <gitster@pobox.com>2011-08-16 22:41:28 +0400
committerJunio C Hamano <gitster@pobox.com>2011-08-16 22:41:28 +0400
commit7aa50897dda0360b9cbbe23e723a5aee461e1d71 (patch)
treefaa92da7147f6ffee7057a9e3afeaa2a6fca398c /diff-lib.c
parentb5e104a0e69f224b89a849fa1e9b4064a36c2f4b (diff)
parentff00b682f203eb39876b57404916b4c54b6032c6 (diff)
Merge branch 'jc/maint-reset-unmerged-path' into maint
* jc/maint-reset-unmerged-path: reset [<commit>] paths...: do not mishandle unmerged paths
Diffstat (limited to 'diff-lib.c')
-rw-r--r--diff-lib.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/diff-lib.c b/diff-lib.c
index 2e09500c82..b3797592c6 100644
--- a/diff-lib.c
+++ b/diff-lib.c
@@ -379,7 +379,8 @@ static void do_oneway_diff(struct unpack_trees_options *o,
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;
}