summaryrefslogtreecommitdiff
path: root/builtin/remote.c
diff options
context:
space:
mode:
authorRené Scharfe <l.s.r@web.de>2019-12-11 18:46:37 (GMT)
committerJunio C Hamano <gitster@pobox.com>2019-12-11 21:48:46 (GMT)
commit99f86bde8332dbff834b9e4c0e929c594200807a (patch)
tree28f8d33d92dc233bb4b094ffe8e454a588066915 /builtin/remote.c
parente0ae2447d66aa3983837ddc3d6fc0c3371a8e350 (diff)
downloadgit-99f86bde8332dbff834b9e4c0e929c594200807a.zip
git-99f86bde8332dbff834b9e4c0e929c594200807a.tar.gz
git-99f86bde8332dbff834b9e4c0e929c594200807a.tar.bz2
remote: pass NULL to read_ref_full() because object ID is not needed
read_ref_full() wraps refs_read_ref_full(), which in turn wraps refs_resolve_ref_unsafe(), which handles a NULL oid pointer of callers not interested in the resolved object ID. Make use of that feature to document that mv() is such a caller. Signed-off-by: René Scharfe <l.s.r@web.de> Signed-off-by: Junio C Hamano <gitster@pobox.com>
Diffstat (limited to 'builtin/remote.c')
-rw-r--r--builtin/remote.c3
1 files changed, 1 insertions, 2 deletions
diff --git a/builtin/remote.c b/builtin/remote.c
index 5591cef..96bbe82 100644
--- a/builtin/remote.c
+++ b/builtin/remote.c
@@ -693,9 +693,8 @@ static int mv(int argc, const char **argv)
for (i = 0; i < remote_branches.nr; i++) {
struct string_list_item *item = remote_branches.items + i;
int flag = 0;
- struct object_id oid;
- read_ref_full(item->string, RESOLVE_REF_READING, &oid, &flag);
+ read_ref_full(item->string, RESOLVE_REF_READING, NULL, &flag);
if (!(flag & REF_ISSYMREF))
continue;
if (delete_ref(NULL, item->string, NULL, REF_NO_DEREF))