From: Junio C Hamano Date: Wed, 8 Dec 2010 20:25:24 +0000 (-0800) Subject: Merge branch 'nd/extended-sha1-relpath' into next X-Git-Tag: ko-next~100 X-Git-Url: https://git.tokkee.org/?a=commitdiff_plain;h=940e5e226b895a04bd0bd93471dd873677394a83;p=git.git Merge branch 'nd/extended-sha1-relpath' into next * nd/extended-sha1-relpath: get_sha1: support relative path ":path" syntax Make prefix_path() return char* without const Conflicts: sha1_name.c --- 940e5e226b895a04bd0bd93471dd873677394a83 diff --cc sha1_name.c index 2c3a5fb36,f918faf5c..451b3de2f --- a/sha1_name.c +++ b/sha1_name.c @@@ -1087,9 -1085,9 +1105,10 @@@ int get_sha1_with_context_1(const char if (name[0] == ':') { int stage = 0; struct cache_entry *ce; + char *new_path = NULL; 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] != ':' || @@@ -1117,7 -1119,7 +1140,8 @@@ break; if (ce_stage(ce) == stage) { hashcpy(sha1, ce->sha1); + oc->mode = ce->ce_mode; + free(new_path); return 0; } pos++;