diff options
author | Junio C Hamano <gitster@pobox.com> | 2010-12-02 11:26:24 -0800 |
---|---|---|
committer | Junio C Hamano <gitster@pobox.com> | 2010-12-02 11:26:24 -0800 |
commit | 9f6774ed86a9ac22142c0b37e26e67eb1d032962 (patch) | |
tree | 421e3ac59adf3683a03e954ebf5f2998bd34886a /sha1_name.c | |
parent | Merge branch 'bc/fortran-userdiff' into maint (diff) | |
parent | blame,cat-file --textconv: Don't assume mode is ``S_IFREF | 0664'' (diff) | |
download | tgif-9f6774ed86a9ac22142c0b37e26e67eb1d032962.tar.xz |
Merge branch 'ks/no-textconv-symlink' into maint
* 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++; |