]> git.ipfire.org Git - thirdparty/git.git/commitdiff
push: remove trivial function
authorFelipe Contreras <felipe.contreras@gmail.com>
Mon, 31 May 2021 19:51:22 +0000 (14:51 -0500)
committerJunio C Hamano <gitster@pobox.com>
Wed, 2 Jun 2021 01:12:02 +0000 (10:12 +0900)
It's a single line that is used in a single place, and the variable has
the same name as the function.

Signed-off-by: Felipe Contreras <felipe.contreras@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
builtin/push.c

index aa22d6a8e596d62fee95ea40a2b53c0dfe0a0c7d..a873f8da9294e107fa11799569a5931d58c31e70 100644 (file)
@@ -202,15 +202,10 @@ static const char *get_upstream_ref(struct branch *branch, const char *remote_na
        return branch->merge[0]->src;
 }
 
-static int is_same_remote(struct remote *remote)
-{
-       return remote == remote_get(NULL);
-}
-
 static void setup_default_push_refspecs(struct remote *remote)
 {
        struct branch *branch;
-       int same_remote = is_same_remote(remote);
+       int same_remote = remote == remote_get(NULL);
        const char *dst;
 
        switch (push_default) {