]> git.ipfire.org Git - thirdparty/git.git/commit
push: remove redundant check
authorFelipe Contreras <felipe.contreras@gmail.com>
Mon, 31 May 2021 19:51:21 +0000 (14:51 -0500)
committerJunio C Hamano <gitster@pobox.com>
Wed, 2 Jun 2021 01:12:02 +0000 (10:12 +0900)
commit1afd78fb5c29b8ad95de072bb8a0edacc69db61a
treebb354abd69366e493db1c351ff747563b83b7da9
parent1f934725f7597366c981b72be6597124e2c21a77
push: remove redundant check

If fetch_remote is NULL (i.e. the branch remote is invalid), then it
can't possibly be same as remote, which can't be NULL.

The check is redundant, and so is the extra variable.

Also, fix the Yoda condition: we want to check if remote is the same as
the branch remote, not the other way around.

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