summary | shortlog | log | commit | commitdiff | tree
raw | patch | inline | side by side (parent: 08727ea)
raw | patch | inline | side by side (parent: 08727ea)
author | Johannes Sixt <johannes.sixt@telecom.at> | |
Sun, 18 Mar 2007 20:34:46 +0000 (21:34 +0100) | ||
committer | Junio C Hamano <junkio@cox.net> | |
Tue, 20 Mar 2007 08:54:49 +0000 (01:54 -0700) |
The configured refspecs are printed almost verbatim, i.e. both the local
and the remote branch name separated by a colon are printed; only the
prefix 'refs/heads/' is removed, like this:
Local branch(es) pushed with 'git push'
master refs/tags/*:refs/tags/* next:next
Signed-off-by: Johannes Sixt <johannes.sixt@telecom.at>
Signed-off-by: Junio C Hamano <junkio@cox.net>
and the remote branch name separated by a colon are printed; only the
prefix 'refs/heads/' is removed, like this:
Local branch(es) pushed with 'git push'
master refs/tags/*:refs/tags/* next:next
Signed-off-by: Johannes Sixt <johannes.sixt@telecom.at>
Signed-off-by: Junio C Hamano <junkio@cox.net>
git-remote.perl | patch | blob | history |
diff --git a/git-remote.perl b/git-remote.perl
index bd70bf1ddd663db7d0af49b8513fdf234767e422..52013fe76dba73e19244fadf63f91677ce8e6a40 100755 (executable)
--- a/git-remote.perl
+++ b/git-remote.perl
$hash->{$name}{'FETCH'} ||= [];
push @{$hash->{$name}{'FETCH'}}, $value;
}
+ elsif ($what eq 'push') {
+ $hash->{$name}{'PUSH'} ||= [];
+ push @{$hash->{$name}{'PUSH'}}, $value;
+ }
if (!exists $hash->{$name}{'SOURCE'}) {
$hash->{$name}{'SOURCE'} = 'config';
}
}
}
elsif (/^Push:\s*(.*)$/) {
- ; # later
+ $it->{'PUSH'} ||= [];
+ push @{$it->{'PUSH'}}, $1;
}
elsif (/^Pull:\s*(.*)$/) {
$it->{'FETCH'} ||= [];
if ($info->{'LS_REMOTE'}) {
show_mapping($name, $info);
}
+ if ($info->{'PUSH'}) {
+ my @pushed = map {
+ s|^refs/heads/||;
+ s|:refs/heads/|:|;
+ $_;
+ } @{$info->{'PUSH'}};
+ print " Local branch(es) pushed with 'git push'\n";
+ print " @pushed\n";
+ }
}
sub add_remote {