Browse files

git-get branch-remote-branch gets the remote tracking branch for some…

… head
  • Loading branch information...
1 parent 2479221 commit 7d442e9efa30413b8844481e024d144a79f70391 @mjdominus committed Mar 25, 2012
Showing with 7 additions and 0 deletions.
  1. +7 −0 git-get
View
7 git-get
@@ -24,6 +24,13 @@ sub branch_remote {
_run("git config --get 'branch.$branch.remote'");
}
+sub branch_remote_branch {
+ my ($branch) = @_;
+ $branch ||= current_branch_name();
+ my $remote = branch_remote($branch);
+ if ($remote) { return "$remote/$branch" } else { exit 1 }
+}
+
sub working_tree_dirty {
my ($arg) = @_;
for my $cmd ("git rev-parse --verify HEAD > /dev/null",

0 comments on commit 7d442e9

Please sign in to comment.