Replace the chain of if statements with table of strings.
Signed-off-by: Paweł Wawruch
---
Thanks to Eric Sunshine and Junio C Hamano.
Simplified printing logic. The name moved to a table.
v4: http://thread.gmane.org/gmane.comp.version-control.git/243914
v3: http://thread.gmane.org
Replace the chain of if statements with table of strings.
Signed-off-by: Paweł Wawruch
---
The changes proposed by Junio C Hamano:
Improvement of indentations. Removed an unused variable.
[1]: http://thread.gmane.org/gmane.comp.version-control.git/243502
[2]: http://thread.gmane.org
Replace the chain of if statements with table of strings.
Signed-off-by: Paweł Wawruch
---
I changed the commit message. Logic of table has changed. To make it more
clear I added three dimensions of the table.
[1]: http://thread.gmane.org/gmane.comp.version-control.git/243502
[2]: http
Simplify the long if chain in install_branch_config().
There is a long chain of if statements. The code can be more clear.
Replace the chain with table of strings. New approach is more
compact.
Signed-off-by: Paweł Wawruch
---
branch.c | 40 ++--
1 file
>From adfcfa0a334378a6242347efc0d614fa193610db Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Pawe=C5=82=20Wawruch?=
Date: Thu, 6 Mar 2014 00:05:00 +0100
Subject: [PATCH] branch.c:install_branch_config(): Simplify the long chain of
if statements. Threre was a long chain of if statements. The code can b
5 matches
Mail list logo