author | Junio C Hamano <gitster@pobox.com> | |
Tue, 21 Dec 2010 01:45:08 +0000 (17:45 -0800) | ||
committer | Junio C Hamano <gitster@pobox.com> | |
Tue, 21 Dec 2010 01:45:08 +0000 (17:45 -0800) |
* nd/oneline-sha1-name-from-specific-ref:
get_sha1: handle special case $commit^{/}
get_sha1: support $commit^{/regex} syntax
get_sha1_oneline: make callers prepare the commit list to traverse
get_sha1_oneline: fix lifespan rule of temp_commit_buffer variable
get_sha1: handle special case $commit^{/}
get_sha1: support $commit^{/regex} syntax
get_sha1_oneline: make callers prepare the commit list to traverse
get_sha1_oneline: fix lifespan rule of temp_commit_buffer variable
1 | 2 | |||
---|---|---|---|---|
Documentation/revisions.txt | patch | | diff1 | | diff2 | | blob | history |
sha1_name.c | patch | | diff1 | | diff2 | | blob | history |
diff --cc Documentation/revisions.txt
Simple merge
diff --cc sha1_name.c
index 8f49279642bf1aa8ce74fee351772e3fb28a73c4,c5c59ced7f0cbd9ced026d44df6439da65082fb8..ceb9cdd860da78bf3fe0a1819846ded0e87fda8c
--- 1/sha1_name.c
--- 2/sha1_name.c
+++ b/sha1_name.c
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 > 2 && name[1] == '/') {
+ struct commit_list *list = NULL;
+ for_each_ref(handle_one_ref, &list);
+ return get_sha1_oneline(name + 2, sha1, list);
+ }
if (namelen < 3 ||
name[2] != ':' ||
name[1] < '0' || '3' < name[1])