update-ref: drop unused argument for `parse_refname`
The `parse_refname` function accepts a `struct strbuf *input` argument that isn't used at all. As we're about to convert commands to not use a strbuf anymore but instead an end pointer, let's drop this argument now to make the converting commit easier to review. Signed-off-by: Patrick Steinhardt <ps@pks.im> Signed-off-by: Junio C Hamano <gitster@pobox.com>
Patrick Steinhardt committed
Apr 2, 2020 at 09:09 UTC
5ae6c5a7129a55e69d39cfb70c78bb5b92bbccb7
1 file changed
+5
-5
builtin/update-ref.c
+5
-5
@@ -50,7 +50,7 @@ static const char *parse_arg(const char *next, struct strbuf *arg)
50
* the argument. Die if C-quoting is malformed or the reference name
51
* is invalid.
52
*/
53
-static char *parse_refname(struct strbuf *input, const char **next)
53
+static char *parse_refname(const char **next)
54
{
55
struct strbuf ref = STRBUF_INIT;
56
@@ -186,7 +186,7 @@ static const char *parse_cmd_update(struct ref_transaction *transaction,
186
struct object_id new_oid, old_oid;
187
int have_old;
188
189
- refname = parse_refname(input, &next);
189
+ refname = parse_refname(&next);
190
if (!refname)
191
die("update: missing <ref>");
192
@@ -220,7 +220,7 @@ static const char *parse_cmd_create(struct ref_transaction *transaction,
220
char *refname;
221
struct object_id new_oid;
222
223
- refname = parse_refname(input, &next);
223
+ refname = parse_refname(&next);
224
if (!refname)
225
die("create: missing <ref>");
226
@@ -253,7 +253,7 @@ static const char *parse_cmd_delete(struct ref_transaction *transaction,
253
struct object_id old_oid;
254
int have_old;
255
256
- refname = parse_refname(input, &next);
256
+ refname = parse_refname(&next);
257
if (!refname)
258
die("delete: missing <ref>");
259
@@ -288,7 +288,7 @@ static const char *parse_cmd_verify(struct ref_transaction *transaction,
288
char *refname;
289
struct object_id old_oid;
290
291
- refname = parse_refname(input, &next);
291
+ refname = parse_refname(&next);
292
if (!refname)
293
die("verify: missing <ref>");
294