diff options
Diffstat (limited to 'src/refspec.c')
-rw-r--r-- | src/refspec.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/refspec.c b/src/refspec.c index d51fd4ceb..7a5127c33 100644 --- a/src/refspec.c +++ b/src/refspec.c @@ -103,10 +103,10 @@ int git_refspec_transform_r(git_buf *out, const git_refspec *spec, const char *n * No '*' at the end means that it's mapped to one specific local * branch, so no actual transformation is needed. */ - if (out->size > 0 && out->ptr[out->size - 1] != '*') + if (git_buf_len(out) > 0 && out->ptr[git_buf_len(out) - 1] != '*') return GIT_SUCCESS; - git_buf_truncate(out, out->size - 1); /* remove trailing '*' */ + git_buf_truncate(out, git_buf_len(out) - 1); /* remove trailing '*' */ git_buf_puts(out, name + strlen(spec->src) - 1); if (git_buf_oom(out)) |