diff options
author | Junio C Hamano <gitster@pobox.com> | 2011-08-02 00:00:08 +0200 |
---|---|---|
committer | Junio C Hamano <gitster@pobox.com> | 2011-08-02 00:00:08 +0200 |
commit | 1df561fb4861708ce208488aa307516c0ecfa968 (patch) | |
tree | d642bff3822cc638967d3fc6c54d2060e21ec0cf /diff-lib.c | |
parent | Merge branch 'maint' (diff) | |
parent | reset [<commit>] paths...: do not mishandle unmerged paths (diff) | |
download | git-1df561fb4861708ce208488aa307516c0ecfa968.tar.xz git-1df561fb4861708ce208488aa307516c0ecfa968.zip |
Merge branch 'jc/maint-reset-unmerged-path'
* 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; } |