From: Junio C Hamano Date: Thu, 16 Dec 2010 20:51:05 +0000 (-0800) Subject: Merge branch 'nd/extended-sha1-relpath' X-Git-Tag: v1.7.4-rc0~33 X-Git-Url: https://git.tokkee.org/?a=commitdiff_plain;h=620b89cd98219db33ce499c7f8e50d091fe9b598;p=git.git Merge branch 'nd/extended-sha1-relpath' * nd/extended-sha1-relpath: get_sha1: teach ":$n:" the same relative path logic get_sha1: support relative path ":path" syntax Make prefix_path() return char* without const Conflicts: sha1_name.c --- 620b89cd98219db33ce499c7f8e50d091fe9b598 diff --cc sha1_name.c index 2c3a5fb36,207405688..8f4927964 --- 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 -1121,7 +1142,8 @@@ break; if (ce_stage(ce) == stage) { hashcpy(sha1, ce->sha1); + oc->mode = ce->ce_mode; + free(new_path); return 0; } pos++;