aboutsummaryrefslogtreecommitdiff
path: root/git-fmt-merge-msg.perl
diff options
context:
space:
mode:
authorEric Wong <normalperson@yhbt.net>2006-03-10 04:19:07 -0800
committerJunio C Hamano <junkio@cox.net>2006-03-10 22:31:20 -0800
commit687b8be8bb75b97e917dc744f91890270913041d (patch)
treea280395be4505a1691d898c1a57ee990f2641fb8 /git-fmt-merge-msg.perl
parentf2561fda364ad984ef1441a80c90b0ee04f1a7c4 (diff)
downloadgit-687b8be8bb75b97e917dc744f91890270913041d.tar.gz
git-687b8be8bb75b97e917dc744f91890270913041d.tar.xz
fetch,parse-remote,fmt-merge-msg: refs/remotes/* support
We can now easily fetch and merge things from heads in the refs/remotes/ hierarchy in remote repositories. The refs/remotes/ hierarchy is likely to become the standard for tracking foreign SCMs, as well as the location of Pull: targets for tracking remote branches in newly cloned repositories. Signed-off-by: Eric Wong <normalperson@yhbt.net> Signed-off-by: Junio C Hamano <junkio@cox.net>
Diffstat (limited to 'git-fmt-merge-msg.perl')
-rwxr-xr-xgit-fmt-merge-msg.perl8
1 files changed, 8 insertions, 0 deletions
diff --git a/git-fmt-merge-msg.perl b/git-fmt-merge-msg.perl
index afe80e632..5986e5414 100755
--- a/git-fmt-merge-msg.perl
+++ b/git-fmt-merge-msg.perl
@@ -75,6 +75,7 @@ while (<>) {
$src{$src} = {
BRANCH => [],
TAG => [],
+ R_BRANCH => [],
GENERIC => [],
# &1 == has HEAD.
# &2 == has others.
@@ -91,6 +92,11 @@ while (<>) {
push @{$src{$src}{TAG}}, $1;
$src{$src}{HEAD_STATUS} |= 2;
}
+ elsif (/^remote branch (.*)$/) {
+ $origin = $1;
+ push @{$src{$src}{R_BRANCH}}, $1;
+ $src{$src}{HEAD_STATUS} |= 2;
+ }
elsif (/^HEAD$/) {
$origin = $src;
$src{$src}{HEAD_STATUS} |= 1;
@@ -123,6 +129,8 @@ for my $src (@src) {
}
push @this, andjoin("branch ", "branches ",
$src{$src}{BRANCH});
+ push @this, andjoin("remote branch ", "remote branches ",
+ $src{$src}{R_BRANCH});
push @this, andjoin("tag ", "tags ",
$src{$src}{TAG});
push @this, andjoin("commit ", "commits ",