summaryrefslogtreecommitdiff
path: root/sha1_name.c
diff options
context:
space:
mode:
authorFelipe Contreras <felipe.contreras@gmail.com>2013-05-07 16:55:06 -0500
committerJunio C Hamano <gitster@pobox.com>2013-05-08 09:15:37 -0700
commit1ef2d8dacc992b98444170ea9ee17de417433146 (patch)
tree83402288c318fd6c4a00b663997422766753ed30 /sha1_name.c
parent723b74ee3e09bfb19b43218da19c52f805bb69ae (diff)
downloadgit-1ef2d8dacc992b98444170ea9ee17de417433146.tar.gz
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>
Diffstat (limited to 'sha1_name.c')
-rw-r--r--sha1_name.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/sha1_name.c b/sha1_name.c
index 3820f28ae7..01e49a92dd 100644
--- a/sha1_name.c
+++ b/sha1_name.c
@@ -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);