diff options
author | nulltoken <emeric.fermas@gmail.com> | 2012-04-29 23:46:33 +0400 |
---|---|---|
committer | nulltoken <emeric.fermas@gmail.com> | 2012-04-30 09:12:37 +0400 |
commit | fa6420f73e8a621cc04e95820b625097b5c2fbf2 (patch) | |
tree | b5107d76b205dfb9b475606bb284da05b01e2a79 /src/refspec.c | |
parent | 1d2dd864add4835c49744a566c226a1c7da04e99 (diff) |
buf: deploy git_buf_len()
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)) |