Alexandre Julliard : git-notify: Add rename information in CIA notices.
Module: tools Branch: master Commit: fffa24869eed8a035530bccddbc1caa1b9c9d2bf URL: http://source.winehq.org/git/?p=tools.git;a=commit;h=fffa24869eed8a035530bcc... Author: Alexandre Julliard <julliard(a)winehq.org> Date: Tue Sep 12 20:06:06 2006 +0200 git-notify: Add rename information in CIA notices. --- git-notify | 7 ++++++- 1 files changed, 6 insertions(+), 1 deletions(-) diff --git a/git-notify b/git-notify index 794f4b2..8301824 100755 --- a/git-notify +++ b/git-notify @@ -289,7 +289,7 @@ sub send_cia_notice($$) " <log>" . xml_escape(join "\n", @{$info{"log"}}) . "</log>", " <files>"; - open COMMIT, "git-diff-tree --name-status -r $commit |" or die "cannot run git-diff-tree"; + open COMMIT, "-|" or exec "git", "diff-tree", "--name-status", "-r", "-M", $commit or die "cannot run git-diff-tree"; while (<COMMIT>) { chomp; @@ -300,6 +300,11 @@ sub send_cia_notice($$) next unless defined $actions{$action}; push @cia_text, " <file action=\"$actions{$action}\">" . xml_escape($file) . "</file>"; } + elsif (/^R\d+\t(.*)\t(.*)$/) + { + my ($old, $new) = ($1, $2); + push @cia_text, " <file action=\"rename\" to=\"" . xml_escape($new) . "\">" . xml_escape($old) . "</file>"; + } } close COMMIT;
participants (1)
-
Alexandre Julliard