diff options
| author | Slávek Banko <slavek.banko@axis.cz> | 2012-10-07 03:25:55 +0200 |
|---|---|---|
| committer | Slávek Banko <slavek.banko@axis.cz> | 2012-10-07 03:39:02 +0200 |
| commit | 4816dfe85261c07f53930c37957b965586e06b70 (patch) | |
| tree | fa3730e7ea8f71643e57b69fcb488bb32921a57c | |
| parent | bb470b8851d2a7d4c5ecaf4580240b01819901ed (diff) | |
| download | scripts-4816dfe85261c07f53930c37957b965586e06b70.tar.gz scripts-4816dfe85261c07f53930c37957b965586e06b70.zip | |
Scripts: Fix branch detection with git older than 1.7.10
| -rwxr-xr-x | commit_all_submodules | 2 | ||||
| -rwxr-xr-x | switch_all_submodules_to_head_and_clean | 2 | ||||
| -rwxr-xr-x | update_all_submodules | 2 |
3 files changed, 3 insertions, 3 deletions
diff --git a/commit_all_submodules b/commit_all_submodules index ce3a8c7..c754640 100755 --- a/commit_all_submodules +++ b/commit_all_submodules @@ -6,7 +6,7 @@ if [[ ! -e .git ]] || exit 1 fi -branch=`git symbolic-ref --short -q HEAD` +branch=`git symbolic-ref -q HEAD | sed "s|^refs/heads/||"` if [[ -z "$branch" ]] || [[ -z "`git rev-parse --symbolic-full-name --remotes=\"*/$branch\"`" ]]; then echo "There is not active upstream branch. Exiting..." diff --git a/switch_all_submodules_to_head_and_clean b/switch_all_submodules_to_head_and_clean index c35d9f8..0171537 100755 --- a/switch_all_submodules_to_head_and_clean +++ b/switch_all_submodules_to_head_and_clean @@ -6,7 +6,7 @@ if [[ ! -e .git ]] || exit 1 fi -branch=`git symbolic-ref --short -q HEAD` +branch=`git symbolic-ref -q HEAD | sed "s|^refs/heads/||"` if [[ -z "$branch" ]] || [[ -z "`git rev-parse --symbolic-full-name --remotes=\"*/$branch\"`" ]]; then echo "There is not active upstream branch. Exiting..." diff --git a/update_all_submodules b/update_all_submodules index 46fcc6d..8e6668f 100755 --- a/update_all_submodules +++ b/update_all_submodules @@ -12,7 +12,7 @@ if [[ ! -e .git ]] || exit 1 fi -branch=`git symbolic-ref --short -q HEAD` +branch=`git symbolic-ref -q HEAD | sed "s|^refs/heads/||"` if [[ -z "$branch" ]] || [[ -z "`git rev-parse --symbolic-full-name --remotes=\"*/$branch\"`" ]]; then echo "There is not active upstream branch. Exiting..." |
