Re: [PATCH] simplifying branch.c:install_branch_config() if()
- From
- Nemina Amarasinghe <neminaa@gmail.com>
- Date
- Mar 14, 2014, 04:22 UTC
- Message-ID
- <loom.20140314T051213-863@post.gmane.org>
- In-Reply-To
- <20140314021052.GH15625@google.com>
Is this safe? Today branch.c::create_branch checks that the argument
> to e.g. --set-upstream-to is either in
refs/heads/* or the image of
> some remote, but what is making sure that remains
true tomorrow?
> > So if changing this, I would be happier if the
"if" condition were
> still (!remote_is_branch && origin) so the
impossible case could emit
Show 5 quoted lines
> a BUG. > > Hope that helps, > Jonathan >
Thanks for the coments Jonathan, Yes you are correct... I was just thought about how to simplify this chain of if() statement. Not the big picture. Now I understand when I change or implenet something I have to think not only about the current matter but abot the future also.
Nemina