summaryrefslogtreecommitdiff
path: root/sync-all
diff options
context:
space:
mode:
authorIan Lynagh <ian@well-typed.com>2013-04-19 13:53:28 +0100
committerIan Lynagh <ian@well-typed.com>2013-04-19 20:28:29 +0100
commit0ae042d370fa3ed1cc184b858e9120ef0bfdb198 (patch)
tree01ea07ad843810001bc80807f055b27b66c01b98 /sync-all
parentd6dd769d84fd62903fcfb59a8be0efde7c9beca7 (diff)
downloadhaskell-0ae042d370fa3ed1cc184b858e9120ef0bfdb198.tar.gz
Use a simpler way of finding the current git branch in sync-all
Diffstat (limited to 'sync-all')
-rwxr-xr-xsync-all2
1 files changed, 1 insertions, 1 deletions
diff --git a/sync-all b/sync-all
index 71d707e3c8..bcd5d7575b 100755
--- a/sync-all
+++ b/sync-all
@@ -29,7 +29,7 @@ sub getrepo {
# Figure out where to get the other repositories from,
# based on where this GHC repo came from.
my $git_dir = $bare_flag ? "--git-dir=ghc.git" : "";
- my $branch = `git $git_dir branch | grep "\* " | sed "s/^\* //"`; chomp $branch;
+ my $branch = `git $git_dir rev-parse --abbrev-ref HEAD`; chomp $branch;
my $remote = `git $git_dir config branch.$branch.remote`; chomp $remote;
if ($remote eq "") {
# remotes are not mandatory for branches (e.g. not recorded by default for bare repos)