summaryrefslogtreecommitdiff
path: root/sha1_name.c
diff options
context:
space:
mode:
authorJunio C Hamano <gitster@pobox.com>2012-06-28 15:19:31 -0700
committerJunio C Hamano <gitster@pobox.com>2012-06-28 15:19:32 -0700
commit08080894b7bd68db413275e601286d94b40752bd (patch)
tree4541a9e47013b90380d18111c97df65d138aaf8b /sha1_name.c
parentdefd7aa34c81148904ed5d22d975b5b3c843e040 (diff)
parent023e37c37780d6a56f2870a979c8eb3a9ee9a44d (diff)
downloadgit-08080894b7bd68db413275e601286d94b40752bd.tar.gz
Merge branch 'mm/verify-filename-fix'
"git diff COPYING HEAD:COPYING" gave a nonsense error message that claimed that the treeish HEAD did not have COPYING in it.
Diffstat (limited to 'sha1_name.c')
-rw-r--r--sha1_name.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/sha1_name.c b/sha1_name.c
index c6331136d1..5d81ea0564 100644
--- a/sha1_name.c
+++ b/sha1_name.c
@@ -1127,7 +1127,7 @@ int get_sha1_with_context_1(const char *name, unsigned char *sha1,
if (new_filename)
filename = new_filename;
ret = get_tree_entry(tree_sha1, filename, sha1, &oc->mode);
- if (only_to_die) {
+ if (ret && only_to_die) {
diagnose_invalid_sha1_path(prefix, filename,
tree_sha1, object_name);
free(object_name);