summaryrefslogtreecommitdiff
path: root/builtin/update-ref.c
diff options
context:
space:
mode:
authorPatrick Steinhardt <ps@pks.im>2020-04-02 07:09:43 (GMT)
committerJunio C Hamano <gitster@pobox.com>2020-04-02 18:09:48 (GMT)
commit5ae6c5a7129a55e69d39cfb70c78bb5b92bbccb7 (patch)
treeb30a7d27a65bb3891beb8dfc1a2ff45d9f237e54 /builtin/update-ref.c
parenta65b8ac291d919c8f0c89f7397e03662020344ab (diff)
downloadgit-5ae6c5a7129a55e69d39cfb70c78bb5b92bbccb7.zip
git-5ae6c5a7129a55e69d39cfb70c78bb5b92bbccb7.tar.gz
git-5ae6c5a7129a55e69d39cfb70c78bb5b92bbccb7.tar.bz2
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>
Diffstat (limited to 'builtin/update-ref.c')
-rw-r--r--builtin/update-ref.c10
1 files changed, 5 insertions, 5 deletions
diff --git a/builtin/update-ref.c b/builtin/update-ref.c
index a6ff88b..1bba5ea 100644
--- a/builtin/update-ref.c
+++ b/builtin/update-ref.c
@@ -50,7 +50,7 @@ static const char *parse_arg(const char *next, struct strbuf *arg)
* the argument. Die if C-quoting is malformed or the reference name
* is invalid.
*/
-static char *parse_refname(struct strbuf *input, const char **next)
+static char *parse_refname(const char **next)
{
struct strbuf ref = STRBUF_INIT;
@@ -186,7 +186,7 @@ static const char *parse_cmd_update(struct ref_transaction *transaction,
struct object_id new_oid, old_oid;
int have_old;
- refname = parse_refname(input, &next);
+ refname = parse_refname(&next);
if (!refname)
die("update: missing <ref>");
@@ -220,7 +220,7 @@ static const char *parse_cmd_create(struct ref_transaction *transaction,
char *refname;
struct object_id new_oid;
- refname = parse_refname(input, &next);
+ refname = parse_refname(&next);
if (!refname)
die("create: missing <ref>");
@@ -253,7 +253,7 @@ static const char *parse_cmd_delete(struct ref_transaction *transaction,
struct object_id old_oid;
int have_old;
- refname = parse_refname(input, &next);
+ refname = parse_refname(&next);
if (!refname)
die("delete: missing <ref>");
@@ -288,7 +288,7 @@ static const char *parse_cmd_verify(struct ref_transaction *transaction,
char *refname;
struct object_id old_oid;
- refname = parse_refname(input, &next);
+ refname = parse_refname(&next);
if (!refname)
die("verify: missing <ref>");