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>
Jeff King committed
Jan 15, 2014 at 03:27 UTC
f278f40f09fd5a4e8e091be489bcb54230d2e3de
1 file changed
+5
-5
sha1_name.c
+5
-5
@@ -1119,7 +1119,7 @@ static int interpret_upstream_mark(const char *name, int namelen,
1119
*/
1120
int interpret_branch_name(const char *name, int namelen, struct strbuf *buf)
1121
{
1122
- char *cp;
1122
+ char *at;
1123
int len = interpret_nth_prior_checkout(name, buf);
1124
1125
if (!namelen)
@@ -1134,15 +1134,15 @@ int interpret_branch_name(const char *name, int namelen, struct strbuf *buf)
1134
return reinterpret(name, namelen, len, buf);
1135
}
1136
1137
- cp = strchr(name, '@');
1138
- if (!cp)
1137
+ at = strchr(name, '@');
1138
+ if (!at)
1139
return -1;
1140
1141
- len = interpret_empty_at(name, namelen, cp - name, buf);
1141
+ len = interpret_empty_at(name, namelen, at - name, buf);
1142
if (len > 0)
1143
return reinterpret(name, namelen, len, buf);
1144
1145
- len = interpret_upstream_mark(name, namelen, cp - name, buf);
1145
+ len = interpret_upstream_mark(name, namelen, at - name, buf);
1146
if (len > 0)
1147
return len;
1148