1
0
Fork 0
mirror of https://github.com/git/git.git synced 2024-06-11 01:06:34 +02:00

sha1_name: remove no-op

'at' is always 0, since we can reach this point only if
!len && reflog_len, and len=at when reflog is assigned.

Signed-off-by: Felipe Contreras <felipe.contreras@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
This commit is contained in:
Felipe Contreras 2013-05-07 16:55:06 -05:00 committed by Junio C Hamano
parent 723b74ee3e
commit 1ef2d8dacc

View File

@ -464,7 +464,7 @@ static int get_sha1_basic(const char *str, int len, unsigned char *sha1)
struct strbuf buf = STRBUF_INIT;
int ret;
/* try the @{-N} syntax for n-th checkout */
ret = interpret_branch_name(str+at, &buf);
ret = interpret_branch_name(str, &buf);
if (ret > 0) {
/* substitute this branch name and restart */
return get_sha1_1(buf.buf, buf.len, sha1, 0);