Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.kernel.org/pub/scm/git/git.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorFelipe Contreras <felipe.contreras@gmail.com>2021-05-31 22:51:22 +0300
committerJunio C Hamano <gitster@pobox.com>2021-06-02 04:12:02 +0300
commitc5b09cf771ea3c340335aeff501ebec342f78aa4 (patch)
treee5a44639473e8728a1b3f60a9e5f647d3ecc1437 /builtin/push.c
parent1afd78fb5c29b8ad95de072bb8a0edacc69db61a (diff)
push: remove trivial function
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>
Diffstat (limited to 'builtin/push.c')
-rw-r--r--builtin/push.c7
1 files changed, 1 insertions, 6 deletions
diff --git a/builtin/push.c b/builtin/push.c
index aa22d6a8e5..a873f8da92 100644
--- a/builtin/push.c
+++ b/builtin/push.c
@@ -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) {