diff options
author | Junio C Hamano <gitster@pobox.com> | 2010-11-17 23:59:27 +0100 |
---|---|---|
committer | Junio C Hamano <gitster@pobox.com> | 2010-11-17 23:59:27 +0100 |
commit | dd9d290bc983255a24c70e26e7fad40c6212b636 (patch) | |
tree | 6ba2beb3a4fad91a7541e048d1dd24a8de9f7aa4 /sha1_name.c | |
parent | Merge branch 'jn/gitweb-test' (diff) | |
parent | blame,cat-file --textconv: Don't assume mode is ``S_IFREF | 0664'' (diff) | |
download | git-dd9d290bc983255a24c70e26e7fad40c6212b636.tar.xz git-dd9d290bc983255a24c70e26e7fad40c6212b636.zip |
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.c | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/sha1_name.c b/sha1_name.c index 484081de82..3e856b8036 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++; |