diff options
author | Junio C Hamano <gitster@pobox.com> | 2011-08-16 11:41:28 -0700 |
---|---|---|
committer | Junio C Hamano <gitster@pobox.com> | 2011-08-16 11:41:28 -0700 |
commit | 7aa50897dda0360b9cbbe23e723a5aee461e1d71 (patch) | |
tree | faa92da7147f6ffee7057a9e3afeaa2a6fca398c /diff-lib.c | |
parent | b5e104a0e69f224b89a849fa1e9b4064a36c2f4b (diff) | |
parent | ff00b682f203eb39876b57404916b4c54b6032c6 (diff) | |
download | git-7aa50897dda0360b9cbbe23e723a5aee461e1d71.tar.gz |
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.c | 3 |
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; } |