summaryrefslogtreecommitdiff
path: root/refs/files-backend.c
diff options
context:
space:
mode:
authorRené Scharfe <l.s.r@web.de>2017-10-01 07:28:50 (GMT)
committerJunio C Hamano <gitster@pobox.com>2017-10-01 08:26:58 (GMT)
commit872ccb2c69ce44abb198efa1013dd4e0887a7495 (patch)
treec37253ba91682f1bdeecc4984084813b297117bb /refs/files-backend.c
parent744c040b19412fa5075810eb1aced105fad96726 (diff)
downloadgit-872ccb2c69ce44abb198efa1013dd4e0887a7495.zip
git-872ccb2c69ce44abb198efa1013dd4e0887a7495.tar.gz
git-872ccb2c69ce44abb198efa1013dd4e0887a7495.tar.bz2
refs: pass NULL to refs_resolve_refdup() if hash is not needed
This gets us rid of a write-only variable. Signed-off-by: Rene Scharfe <l.s.r@web.de> Signed-off-by: Junio C Hamano <gitster@pobox.com>
Diffstat (limited to 'refs/files-backend.c')
-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 a3134d2..a69b70f 100644
--- a/refs/files-backend.c
+++ b/refs/files-backend.c
@@ -2499,7 +2499,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;
@@ -2556,7 +2555,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);