git/list[1] front-page[2] threads[3] people[4] search[5] about
 

Re: [PATCH 1/5] git-remote-mediawiki: don't compute the diff when getting commit message

From
Junio C Hamano <gitster@pobox.com>
Date
Jun 26, 2012, 17:47 UTC
Message-ID
<7v8vfac6dn.fsf@alter.siamese.dyndns.org>
In-Reply-To
<1340726673-25496-2-git-send-email-Matthieu.Moy@imag.fr>
Matthieu Moy <Matthieu.Moy@imag.fr> writes:
> ---
Not signed off yet?
Show 8 quoted lines
>  contrib/mw-to-git/git-remote-mediawiki | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/contrib/mw-to-git/git-remote-mediawiki b/contrib/mw-to-git/git-remote-mediawiki
> index a34f53f..a8e6287 100755
> --- a/contrib/mw-to-git/git-remote-mediawiki
> +++ b/contrib/mw-to-git/git-remote-mediawiki
> @@ -874,8 +874,7 @@ sub mw_push_revision {

Curious. The hunk replaces an old line with a new one, but somehow claims to reduce 8 to 7 by one???

Show 8 quoted lines
>  		# 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];
> +		my $commit_msg = (split(/\n/, run_git("log -1 --format=\"%s\" $sha1_commit")))[0];
>  		chomp($commit_msg);
>  		# Push every blob
>  		while (@diff_info_list) {
Previous: Matthieu MoyNext: Matthieu Moy
Message 3 of 18 in “git-remote-mediawiki: support File: import and export”
  1. 0/5 git-remote-mediawiki: support File: import and exportMatthieu Moy, Jun 26, 2012
  2. 1/5 git-remote-mediawiki: don't compute the diff when getting commit messageMatthieu Moy, Jun 26, 2012
  3. Junio C HamanoJun 26, 2012
  4. Matthieu MoyJun 27, 2012
  5. 2/5 git-remote-mediawiki: don't "use encoding 'utf8';"Matthieu Moy, Jun 26, 2012
  6. 3/5 git-remote-mediawiki: send "File:" attachments to a remote wikiMatthieu Moy, Jun 26, 2012
  7. 4/5 git-remote-mediawiki: split get_mw_pages into smaller functionsMatthieu Moy, Jun 26, 2012
  8. 5/5 git-remote-mediawiki: import "File:" attachmentsMatthieu Moy, Jun 26, 2012
  9. 0/5 git-remote-mediawiki: support File: import and exportMatthieu Moy, Jun 27, 2012
  10. 1/5 git-remote-mediawiki: don't compute the diff when getting commit messageMatthieu Moy, Jun 27, 2012
  11. 2/5 git-remote-mediawiki: don't "use encoding 'utf8';"Matthieu Moy, Jun 27, 2012
  12. 3/5 git-remote-mediawiki: send "File:" attachments to a remote wikiMatthieu Moy, Jun 27, 2012
  13. 4/5 git-remote-mediawiki: split get_mw_pages into smaller functionsMatthieu Moy, Jun 27, 2012
  14. 5/5 git-remote-mediawiki: import "File:" attachmentsMatthieu Moy, Jun 27, 2012
  15. 5/5 git-remote-mediawiki: import "File:" attachmentsMatthieu Moy, Jun 27, 2012
  16. git-remote-mediawiki: import "File:" attachmentsMatthieu Moy, Jul 4, 2012
  17. Junio C HamanoJul 5, 2012
  18. Matthieu MoyJul 5, 2012

Read the whole thread, see it on lore, or plain text.

$ cat FOOTERMessages come from the public archive at lore.kernel.org/git, fetched every hour. The front page is chosen and written each morning by an AI editor and can be wrong; the threads themselves are the record. About and API. For agents: an MCP server at https://gitlist.dev/mcp, and any thread, story or person page as Markdown by adding .md to its URL (or sending Accept: text/markdown). Details in /llms.txt.