diff options
author | Ian Lynagh <ian@well-typed.com> | 2013-04-19 13:53:28 +0100 |
---|---|---|
committer | Ian Lynagh <ian@well-typed.com> | 2013-04-19 20:28:29 +0100 |
commit | 0ae042d370fa3ed1cc184b858e9120ef0bfdb198 (patch) | |
tree | 01ea07ad843810001bc80807f055b27b66c01b98 /sync-all | |
parent | d6dd769d84fd62903fcfb59a8be0efde7c9beca7 (diff) | |
download | haskell-0ae042d370fa3ed1cc184b858e9120ef0bfdb198.tar.gz |
Use a simpler way of finding the current git branch in sync-all
Diffstat (limited to 'sync-all')
-rwxr-xr-x | sync-all | 2 |
1 files changed, 1 insertions, 1 deletions
@@ -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) |