summaryrefslogtreecommitdiff
path: root/src/refspec.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/refspec.c')
-rw-r--r--src/refspec.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/refspec.c b/src/refspec.c
index 7694be525..48265bcde 100644
--- a/src/refspec.c
+++ b/src/refspec.c
@@ -107,7 +107,7 @@ int git_refspec_transform_r(git_buf *out, const git_refspec *spec, const char *n
return GIT_SUCCESS;
git_buf_truncate(out, out->size - 1); /* remove trailing '*' */
- git_buf_puts(out, name);
+ git_buf_puts(out, name + strlen(spec->src) - 1);
return git_buf_lasterror(out);
}