summaryrefslogtreecommitdiff
path: root/sha1_name.c
diff options
context:
space:
mode:
authorJunio C Hamano <gitster@pobox.com>2010-11-17 22:59:27 (GMT)
committerJunio C Hamano <gitster@pobox.com>2010-11-17 22:59:27 (GMT)
commitdd9d290bc983255a24c70e26e7fad40c6212b636 (patch)
tree6ba2beb3a4fad91a7541e048d1dd24a8de9f7aa4 /sha1_name.c
parent430fac9e5bdf24a2969f854ff0ff376140f88090 (diff)
parent900647104e02e545064789f3c6b90a5807fba07b (diff)
downloadgit-dd9d290bc983255a24c70e26e7fad40c6212b636.zip
git-dd9d290bc983255a24c70e26e7fad40c6212b636.tar.gz
git-dd9d290bc983255a24c70e26e7fad40c6212b636.tar.bz2
Merge branch 'ks/no-textconv-symlink'
* ks/no-textconv-symlink: blame,cat-file --textconv: Don't assume mode is ``S_IFREF | 0664'' blame,cat-file: Demonstrate --textconv is wrongly running converter on symlinks blame,cat-file: Prepare --textconv tests for correctly-failing conversion program
Diffstat (limited to 'sha1_name.c')
-rw-r--r--sha1_name.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/sha1_name.c b/sha1_name.c
index 484081d..3e856b8 100644
--- a/sha1_name.c
+++ b/sha1_name.c
@@ -1069,6 +1069,7 @@ int get_sha1_with_context_1(const char *name, unsigned char *sha1,
struct cache_entry *ce;
int pos;
if (namelen > 2 && name[1] == '/')
+ /* don't need mode for commit */
return get_sha1_oneline(name + 2, sha1);
if (namelen < 3 ||
name[2] != ':' ||
@@ -1096,6 +1097,7 @@ int get_sha1_with_context_1(const char *name, unsigned char *sha1,
break;
if (ce_stage(ce) == stage) {
hashcpy(sha1, ce->sha1);
+ oc->mode = ce->ce_mode;
return 0;
}
pos++;