diff options
author | Matthieu Moy <Matthieu.Moy@imag.fr> | 2012-06-27 11:10:16 +0200 |
---|---|---|
committer | Junio C Hamano <gitster@pobox.com> | 2012-06-27 14:18:01 -0700 |
commit | 28c24bd7253c3c7a4f3134c5bae4d039b9838e87 (patch) | |
tree | 6d8c125bdc54b70cc21cee792c5348da8e7db6b2 /contrib | |
parent | git-remote-mediawiki: add credential support (diff) | |
download | tgif-28c24bd7253c3c7a4f3134c5bae4d039b9838e87.tar.xz |
git-remote-mediawiki: don't compute the diff when getting commit message
While we're there, simplify the code a bit: since log --format=%s anyway
shows the subject line as a single line, no need to split to take the
first line.
Signed-off-by: Matthieu Moy <Matthieu.Moy@imag.fr>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
Diffstat (limited to 'contrib')
-rwxr-xr-x | contrib/mw-to-git/git-remote-mediawiki | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/contrib/mw-to-git/git-remote-mediawiki b/contrib/mw-to-git/git-remote-mediawiki index 539718e243..e929b7a728 100755 --- a/contrib/mw-to-git/git-remote-mediawiki +++ b/contrib/mw-to-git/git-remote-mediawiki @@ -873,8 +873,8 @@ sub mw_push_revision { # TODO: we could detect rename, and encode them with a #redirect on the wiki. # TODO: for now, it's just a delete+add my @diff_info_list = split(/\0/, $diff_infos); - # Keep the first line of the commit message as mediawiki comment for the revision - my $commit_msg = (split(/\n/, run_git("show --pretty=format:\"%s\" $sha1_commit")))[0]; + # Keep the subject line of the commit message as mediawiki comment for the revision + my $commit_msg = run_git("log --no-walk --format=\"%s\" $sha1_commit"); chomp($commit_msg); # Push every blob while (@diff_info_list) { |