aboutsummaryrefslogtreecommitdiff
path: root/git-send-email.perl
diff options
context:
space:
mode:
authorJunio C Hamano <gitster@pobox.com>2009-08-07 20:44:49 -0700
committerJunio C Hamano <gitster@pobox.com>2009-08-07 20:44:49 -0700
commit7ecc9b153c89aeec7470256f7b121fd845101b57 (patch)
tree0bf662b5dd1ffe642756f5cb168902a89b60506a /git-send-email.perl
parentc9c3c6781c5b97c37b3ce16af7ea9bc613413c7e (diff)
parent5dc36a5888a7063ff4536c9ea50eb0557bfef627 (diff)
downloadgit-7ecc9b153c89aeec7470256f7b121fd845101b57.tar.gz
git-7ecc9b153c89aeec7470256f7b121fd845101b57.tar.xz
Merge branch 'maint' into jc/verify-pack-stat
* maint: (95 commits) verify-pack -v: do not report "chain length 0" t5510: harden the way verify-pack is used gitweb/README: Document $base_url Documentation: git submodule: add missing options to synopsis Better usage string for reflog. hg-to-git: don't import the unused popen2 module send-email: remove debug trace config: Keep inner whitespace verbatim GIT 1.6.4 GIT 1.6.3.4 config.txt: document add.ignore-errors request-pull: allow ls-remote to notice remote.$nickname.uploadpack Update the documentation of the raw diff output format git-rerere.txt: Clarify ambiguity of the config variable t9143: do not fail if Compress::Zlib is missing Trivial path quoting fixes in git-instaweb GIT 1.6.4-rc3 Documentation/config.txt: a variable can be defined on the section header line git svn: make minimize URL more reliable over http(s) Disable asciidoc 8.4.1+ semantics for `{plus}` and friends ...
Diffstat (limited to 'git-send-email.perl')
-rwxr-xr-xgit-send-email.perl19
1 files changed, 11 insertions, 8 deletions
diff --git a/git-send-email.perl b/git-send-email.perl
index 8ce6f1fe5..0700d80af 100755
--- a/git-send-email.perl
+++ b/git-send-email.perl
@@ -450,7 +450,6 @@ sub check_file_rev_conflict($) {
try {
$repo->command('rev-parse', '--verify', '--quiet', $f);
if (defined($format_patch)) {
- print "foo\n";
return $format_patch;
}
die(<<EOF);
@@ -654,13 +653,17 @@ if (!@to) {
}
sub expand_aliases {
- my @cur = @_;
- my @last;
- do {
- @last = @cur;
- @cur = map { $aliases{$_} ? @{$aliases{$_}} : $_ } @last;
- } while (join(',',@cur) ne join(',',@last));
- return @cur;
+ return map { expand_one_alias($_) } @_;
+}
+
+my %EXPANDED_ALIASES;
+sub expand_one_alias {
+ my $alias = shift;
+ if ($EXPANDED_ALIASES{$alias}) {
+ die "fatal: alias '$alias' expands to itself\n";
+ }
+ local $EXPANDED_ALIASES{$alias} = 1;
+ return $aliases{$alias} ? expand_aliases(@{$aliases{$alias}}) : $alias;
}
@to = expand_aliases(@to);