Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/mpc-hc/mpc-hc.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorm0viefreak <m0viefreak.cm@googlemail.com>2013-07-20 18:31:46 +0400
committerm0viefreak <m0viefreak.cm@googlemail.com>2013-07-20 18:42:33 +0400
commit558269dabdf30092e1ada2c2dd3c56358de7b707 (patch)
tree405893bf33999c50806f3508f47d42e46836a4da /version.sh
parentbe96cdcbb893bd5c991bc604b4c90bb10255c553 (diff)
version.sh: simplify an unused if/else
base is only needed in the case where the current branch is not master
Diffstat (limited to 'version.sh')
-rw-r--r--version.sh6
1 files changed, 2 insertions, 4 deletions
diff --git a/version.sh b/version.sh
index 3cc2b2095..1527b1969 100644
--- a/version.sh
+++ b/version.sh
@@ -31,13 +31,11 @@ if ! git rev-parse --git-dir > /dev/null 2>&1; then
else
# Get the current branch name
branch=$(git symbolic-ref -q HEAD) && branch=${branch##refs/heads/} || branch="no branch"
- # If we are on the master branch
- if [[ "$branch" == "master" ]]; then
- base="HEAD"
+
# If we are on another branch that isn't master, we want extra info like on
# which commit from master it is based on and what its hash is. This assumes we
# won't ever branch from a changeset from before the move to git
- else
+ if [[ "$branch" != "master" ]]; then
# Get where the branch is based on master
base=$(git merge-base master HEAD)
base_ver=$(git rev-list --count $svnhash..$base)