diff options
| author | brian m. carlson <sandals@crustytoothpaste.net> | 2017-10-15 22:06:55 +0000 |
|---|---|---|
| committer | Junio C Hamano <gitster@pobox.com> | 2017-10-16 11:05:50 +0900 |
| commit | 0f2dc722dd01097d1e1c1dac43b2f57924594457 (patch) | |
| tree | a8121caea164480b7dec0c9d069160d9797fc21d /builtin/checkout.c | |
| parent | 6ccac9eed56280f035d84605b4451ae1721a3100 (diff) | |
| download | git-0f2dc722dd01097d1e1c1dac43b2f57924594457.tar.gz | |
refs: convert resolve_refdup and refs_resolve_refdup to struct object_id
All of the callers already pass the hash member of struct object_id, so
update them to pass a pointer to the struct directly,
This transformation was done with an update to declaration and
definition and the following semantic patch:
@@
expression E1, E2, E3, E4;
@@
- resolve_refdup(E1, E2, E3.hash, E4)
+ resolve_refdup(E1, E2, &E3, E4)
@@
expression E1, E2, E3, E4;
@@
- resolve_refdup(E1, E2, E3->hash, E4)
+ resolve_refdup(E1, E2, E3, E4)
Signed-off-by: brian m. carlson <sandals@crustytoothpaste.net>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
Diffstat (limited to 'builtin/checkout.c')
| -rw-r--r-- | builtin/checkout.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/builtin/checkout.c b/builtin/checkout.c index 2bb009ec0e..c33dbb70fb 100644 --- a/builtin/checkout.c +++ b/builtin/checkout.c @@ -827,7 +827,7 @@ static int switch_branches(const struct checkout_opts *opts, struct object_id rev; int flag, writeout_error = 0; memset(&old, 0, sizeof(old)); - old.path = path_to_free = resolve_refdup("HEAD", 0, rev.hash, &flag); + old.path = path_to_free = resolve_refdup("HEAD", 0, &rev, &flag); if (old.path) old.commit = lookup_commit_reference_gently(&rev, 1); if (!(flag & REF_ISSYMREF)) |
