Skip to content

Commit 5ae6c5a

Browse files
pks-tgitster
authored andcommitted
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 <[email protected]> Signed-off-by: Junio C Hamano <[email protected]>
1 parent a65b8ac commit 5ae6c5a

File tree

1 file changed

+5
-5
lines changed

1 file changed

+5
-5
lines changed

builtin/update-ref.c

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -50,7 +50,7 @@ static const char *parse_arg(const char *next, struct strbuf *arg)
5050
* the argument. Die if C-quoting is malformed or the reference name
5151
* is invalid.
5252
*/
53-
static char *parse_refname(struct strbuf *input, const char **next)
53+
static char *parse_refname(const char **next)
5454
{
5555
struct strbuf ref = STRBUF_INIT;
5656

@@ -186,7 +186,7 @@ static const char *parse_cmd_update(struct ref_transaction *transaction,
186186
struct object_id new_oid, old_oid;
187187
int have_old;
188188

189-
refname = parse_refname(input, &next);
189+
refname = parse_refname(&next);
190190
if (!refname)
191191
die("update: missing <ref>");
192192

@@ -220,7 +220,7 @@ static const char *parse_cmd_create(struct ref_transaction *transaction,
220220
char *refname;
221221
struct object_id new_oid;
222222

223-
refname = parse_refname(input, &next);
223+
refname = parse_refname(&next);
224224
if (!refname)
225225
die("create: missing <ref>");
226226

@@ -253,7 +253,7 @@ static const char *parse_cmd_delete(struct ref_transaction *transaction,
253253
struct object_id old_oid;
254254
int have_old;
255255

256-
refname = parse_refname(input, &next);
256+
refname = parse_refname(&next);
257257
if (!refname)
258258
die("delete: missing <ref>");
259259

@@ -288,7 +288,7 @@ static const char *parse_cmd_verify(struct ref_transaction *transaction,
288288
char *refname;
289289
struct object_id old_oid;
290290

291-
refname = parse_refname(input, &next);
291+
refname = parse_refname(&next);
292292
if (!refname)
293293
die("verify: missing <ref>");
294294

0 commit comments

Comments
 (0)