Re: [PATCH] simplified the chain if() statements of install_branch_config() function in branch.c

2 messages, 2 authors, 2016-06-15 · open the first message on its own page

Re: [PATCH] simplified the chain if() statements of install_branch_config() function in branch.c

From: David Kastrup <hidden>
Date: 2016-06-15 23:00:15

Nemina Amarasinghe [off-list ref] writes:
quoted
Nemina Amarasinghe <neminaa <at> gmail.com> writes:

Is it me, or is (origin || !origin) a tautology?
Thanks for the advices Matthieu. I will go through the documentations again. 
Is there anything wrong with my logic? 
What I wanted to express is
((!remote_is_branch && origin) || (!remote_is_branch || !origin))
Is it?

The above is the same as (!remote_is_branch || !origin).  What you wrote
before is the same as (!remote_is_branch).

Maybe you should try copy&paste from the expressions you are trying to
combine to make sure that what you start with makes sense.

-- 
David Kastrup

Re: [PATCH] simplified the chain if() statements of install_branch_config() function in branch.c

From: Nemina Amarasinghe <hidden>
Date: 2016-06-15 23:00:15

quoted
((!remote_is_branch && origin) || (!remote_is_branch || !origin))
Is it?

The above is the same as (!remote_is_branch || !origin).  What you wrote
before is the same as (!remote_is_branch).

Maybe you should try copy&paste from the expressions you are trying to
combine to make sure that what you start with makes sense.
OMG.. Really sorry for that... that was a silly mistake. 
This is the one..

((!remote_is_branch && origin) || (!remote_is_branch && !origin))
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help