From 62a1ce0583cf41c173f4edb91511430b552e04da Mon Sep 17 00:00:00 2001 From: marha Date: Sun, 21 Apr 2013 19:17:28 +0200 Subject: dos2unix --- fastforwardotherbranch.sh | 46 +++++++++++++++++++++++----------------------- 1 file changed, 23 insertions(+), 23 deletions(-) mode change 100644 => 100755 fastforwardotherbranch.sh diff --git a/fastforwardotherbranch.sh b/fastforwardotherbranch.sh old mode 100644 new mode 100755 index 4b6d1e9a4..f710b052c --- a/fastforwardotherbranch.sh +++ b/fastforwardotherbranch.sh @@ -1,23 +1,23 @@ -#!/bin/sh - -BRANCH=master -NEWER=origin/master - -if [ $(git symbolic-ref HEAD) = "refs/heads/$BRANCH" ] -then - echo "This doesn't make sense if you're already on the branch '$BRANCH'" - echo "Just run: git merge $NEWER" - exit 1 -fi - -BRANCH_HASH=$(git rev-parse $BRANCH) -NEWER_HASH=$(git rev-parse $NEWER) -MERGE_BASE=$(git merge-base $BRANCH_HASH $NEWER_HASH) - -if [ "$MERGE_BASE" = "$BRANCH_HASH" ] -then - git update-ref "refs/heads/$BRANCH" "$NEWER_HASH" "$BRANCH_HASH" -else - echo "$BRANCH can't be fast-forwarded to $NEWER" - exit 1 -fi +#!/bin/sh + +BRANCH=master +NEWER=origin/master + +if [ $(git symbolic-ref HEAD) = "refs/heads/$BRANCH" ] +then + echo "This doesn't make sense if you're already on the branch '$BRANCH'" + echo "Just run: git merge $NEWER" + exit 1 +fi + +BRANCH_HASH=$(git rev-parse $BRANCH) +NEWER_HASH=$(git rev-parse $NEWER) +MERGE_BASE=$(git merge-base $BRANCH_HASH $NEWER_HASH) + +if [ "$MERGE_BASE" = "$BRANCH_HASH" ] +then + git update-ref "refs/heads/$BRANCH" "$NEWER_HASH" "$BRANCH_HASH" +else + echo "$BRANCH can't be fast-forwarded to $NEWER" + exit 1 +fi -- cgit v1.2.3