aboutsummaryrefslogtreecommitdiff
path: root/refs
diff options
context:
space:
mode:
authorJunio C Hamano <gitster@pobox.com>2017-10-05 13:48:19 +0900
committerJunio C Hamano <gitster@pobox.com>2017-10-05 13:48:19 +0900
commitefe9d6ce33ed817150f4ff63ebfc14a3f7667eb4 (patch)
tree445ad62e5235a01002086d2009b35fb9cc16af96 /refs
parent29a67ccc89b0f105aa8e6f675649145b88b2cb0e (diff)
parentefbd4fdfc9978bf3872ca8cf390da4ffa3480188 (diff)
downloadgit-efe9d6ce33ed817150f4ff63ebfc14a3f7667eb4.tar.gz
git-efe9d6ce33ed817150f4ff63ebfc14a3f7667eb4.tar.xz
Merge branch 'rs/resolve-ref-optional-result'
Code clean-up. * rs/resolve-ref-optional-result: refs: pass NULL to resolve_refdup() if hash is not needed refs: pass NULL to refs_resolve_refdup() if hash is not needed
Diffstat (limited to 'refs')
-rw-r--r--refs/files-backend.c3
1 files changed, 1 insertions, 2 deletions
diff --git a/refs/files-backend.c b/refs/files-backend.c
index 1b6141e71..014dabb0b 100644
--- a/refs/files-backend.c
+++ b/refs/files-backend.c
@@ -2494,7 +2494,6 @@ static int files_transaction_prepare(struct ref_store *ref_store,
struct string_list affected_refnames = STRING_LIST_INIT_NODUP;
char *head_ref = NULL;
int head_type;
- struct object_id head_oid;
struct files_transaction_backend_data *backend_data;
struct ref_transaction *packed_transaction = NULL;
@@ -2551,7 +2550,7 @@ static int files_transaction_prepare(struct ref_store *ref_store,
*/
head_ref = refs_resolve_refdup(ref_store, "HEAD",
RESOLVE_REF_NO_RECURSE,
- head_oid.hash, &head_type);
+ NULL, &head_type);
if (head_ref && !(head_type & REF_ISSYMREF)) {
FREE_AND_NULL(head_ref);