aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJeff King <peff@peff.net>2014-01-15 03:27:32 -0500
committerJunio C Hamano <gitster@pobox.com>2014-01-15 12:38:47 -0800
commitf278f40f09fd5a4e8e091be489bcb54230d2e3de (patch)
treec05a72a52f6616f25393024050f13e876b410232
parenta39c14af82e973ba1502888e89585b7501721ede (diff)
downloadgit-f278f40f09fd5a4e8e091be489bcb54230d2e3de.tar.gz
git-f278f40f09fd5a4e8e091be489bcb54230d2e3de.tar.xz
interpret_branch_name: rename "cp" variable to "at"
In the original version of this function, "cp" acted as a pointer to many different things. Since the refactoring in the last patch, it only marks the at-sign in the string. Let's use a more descriptive variable name. Signed-off-by: Jeff King <peff@peff.net> Signed-off-by: Junio C Hamano <gitster@pobox.com>
-rw-r--r--sha1_name.c10
1 files changed, 5 insertions, 5 deletions
diff --git a/sha1_name.c b/sha1_name.c
index 03c574e29..47a71e310 100644
--- a/sha1_name.c
+++ b/sha1_name.c
@@ -1119,7 +1119,7 @@ static int interpret_upstream_mark(const char *name, int namelen,
*/
int interpret_branch_name(const char *name, int namelen, struct strbuf *buf)
{
- char *cp;
+ char *at;
int len = interpret_nth_prior_checkout(name, buf);
if (!namelen)
@@ -1134,15 +1134,15 @@ int interpret_branch_name(const char *name, int namelen, struct strbuf *buf)
return reinterpret(name, namelen, len, buf);
}
- cp = strchr(name, '@');
- if (!cp)
+ at = strchr(name, '@');
+ if (!at)
return -1;
- len = interpret_empty_at(name, namelen, cp - name, buf);
+ len = interpret_empty_at(name, namelen, at - name, buf);
if (len > 0)
return reinterpret(name, namelen, len, buf);
- len = interpret_upstream_mark(name, namelen, cp - name, buf);
+ len = interpret_upstream_mark(name, namelen, at - name, buf);
if (len > 0)
return len;