Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.kernel.org/pub/scm/git/git.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJunio C Hamano <gitster@pobox.com>2010-11-18 01:59:27 +0300
committerJunio C Hamano <gitster@pobox.com>2010-11-18 01:59:27 +0300
commitdd9d290bc983255a24c70e26e7fad40c6212b636 (patch)
tree6ba2beb3a4fad91a7541e048d1dd24a8de9f7aa4 /sha1_name.c
parent430fac9e5bdf24a2969f854ff0ff376140f88090 (diff)
parent900647104e02e545064789f3c6b90a5807fba07b (diff)
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 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++;