diff options
author | Junio C Hamano <gitster@pobox.com> | 2011-09-07 11:16:03 -0700 |
---|---|---|
committer | Junio C Hamano <gitster@pobox.com> | 2011-09-15 16:52:43 -0700 |
commit | 6099835c1900876c813be6114ff4e81f6d90e8a3 (patch) | |
tree | 3ecfdf5de8bf11f8d6abffd91eb4aa2018397ee8 /sha1_name.c | |
parent | Git 1.7.6 (diff) | |
download | tgif-6099835c1900876c813be6114ff4e81f6d90e8a3.tar.xz |
Allow git merge ":/<pattern>"
It probably is not such a good idea to use ":/<pattern>" to specify which
commit to merge, as ":/<pattern>" can often hit unexpected commits, but
somebody tried it and got a nonsense error message:
fatal: ':/Foo bar' does not point to a commit
So here is a for-the-sake-of-consistency update that is fairly useless
that allows users to carefully try not shooting in the foot.
Signed-off-by: Junio C Hamano <gitster@pobox.com>
Diffstat (limited to 'sha1_name.c')
-rw-r--r-- | sha1_name.c | 6 |
1 files changed, 0 insertions, 6 deletions
diff --git a/sha1_name.c b/sha1_name.c index ff5992acc9..653b0659be 100644 --- a/sha1_name.c +++ b/sha1_name.c @@ -501,12 +501,6 @@ struct object *peel_to_type(const char *name, int namelen, { if (name && !namelen) namelen = strlen(name); - if (!o) { - unsigned char sha1[20]; - if (get_sha1_1(name, namelen, sha1)) - return NULL; - o = parse_object(sha1); - } while (1) { if (!o || (!o->parsed && !parse_object(o->sha1))) return NULL; |