Skip to content

Commit 1ef2d8d

Browse files
felipecgitster
authored andcommitted
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 <[email protected]> Signed-off-by: Junio C Hamano <[email protected]>
1 parent 723b74e commit 1ef2d8d

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

sha1_name.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -464,7 +464,7 @@ static int get_sha1_basic(const char *str, int len, unsigned char *sha1)
464464
struct strbuf buf = STRBUF_INIT;
465465
int ret;
466466
/* try the @{-N} syntax for n-th checkout */
467-
ret = interpret_branch_name(str+at, &buf);
467+
ret = interpret_branch_name(str, &buf);
468468
if (ret > 0) {
469469
/* substitute this branch name and restart */
470470
return get_sha1_1(buf.buf, buf.len, sha1, 0);

0 commit comments

Comments
 (0)