[PATCH] simplifying branch.c:install_branch_config() if()

2014-03-13 Thread Nemina Amarasinghe
Signed-off-by: Nemina Amarasinghe nemi...@gmail.com --- branch.c | 7 +-- 1 file changed, 1 insertion(+), 6 deletions(-) diff --git a/branch.c b/branch.c index 723a36b..fd93603 100644 --- a/branch.c +++ b/branch.c @@ -87,16 +87,11 @@ void install_branch_config(int flag, const char *local,

Re: [PATCH] simplifying branch.c:install_branch_config() if()

2014-03-13 Thread Jonathan Nieder
Hi, Nemina Amarasinghe wrote: Signed-off-by: Nemina Amarasinghe nemi...@gmail.com The above is a place to explain why this is a good change. For example: When it prints a message indicating what it has done, install_branch_config() treats the (!remote_is_branch origin)

Re: [PATCH] simplifying branch.c:install_branch_config() if()

2014-03-13 Thread Nemina Amarasinghe
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