[PATCH 4/3] refs: pass NULL to refs_resolve_refdup() if hash is not needed

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



This gets us rid of a write-only variable.

Signed-off-by: Rene Scharfe <l.s.r@xxxxxx>
---
 refs/files-backend.c | 3 +--
 1 file changed, 1 insertion(+), 2 deletions(-)

diff --git a/refs/files-backend.c b/refs/files-backend.c
index fec77744b4..ed00ddab1a 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);
-- 
2.14.2




[Index of Archives]     [Linux Kernel Development]     [Gcc Help]     [IETF Annouce]     [DCCP]     [Netdev]     [Networking]     [Security]     [V4L]     [Bugtraq]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux SCSI]     [Fedora Users]

  Powered by Linux