git@vger.kernel.org mailing list mirror (one of many)
 help / color / mirror / code / Atom feed
From: Junio C Hamano <junkio@cox.net>
To: Johannes Schindelin <Johannes.Schindelin@gmx.de>
Cc: git@vger.kernel.org, Linus Torvalds <torvalds@osdl.org>
Subject: Re: merge-recursive, was Re: What's in git.git
Date: Thu, 26 Oct 2006 03:00:35 -0700	[thread overview]
Message-ID: <7v7iyno0qk.fsf@assigned-by-dhcp.cox.net> (raw)
In-Reply-To: <7v3b9bpgvs.fsf@assigned-by-dhcp.cox.net> (Junio C. Hamano's message of "Thu, 26 Oct 2006 02:26:31 -0700")

Junio C Hamano <junkio@cox.net> writes:

>> BTW what happened to the builtin shortlog? It is the last Perl script I 
>> use regularly... (should make people happy who are stuck with Activision 
>> Perl...)
>
> Yeah, I was wondering about it too, when I was looking for
> something readily mergeable to "next" today.  I must have
> misplaced it.

I looked at the code again.

This is a prime demonstration that it makes more sense to keep
script version until we flush out configurability issues.

The built-in mailmap list is easily overridden with ".mailmap"
which presumably projects would want to keep under version
control, so it is less of an issue, but not everybody would
necessarily want to name that file ".mailmap".

There is a "dot3" merge source shortening logic that is very
specific to the kernel, and this cannot be customized per
project.  If it were kept as Perl script, each project could
limp along with a copy of this script, modified for their needs,
without making the script itself customizable.  Rewriting it
into C does not _forbid_ that kind of use, but certainly it
makes it more cumbersome to do so.

First I'd probably ask kernel folks to maintain their own
copy of .mailmap at the toplevel of their source tree, so that
we can remove this kernel specific built-in mailmap from
shortlog (I'd even do so before switching from the Perl
version).

The dot3 logic is probably best substituted with config, a
version controllable file similar to .mailmap, or command line
parameters, but I am not sure which one is the best way to go.
Whatever mechanism is used, It essentially is to define a
mapping from a long string to its abbreviation (currently there
is one hardcoded one, that replaces /pub/scm/linux/kernel/git/
to /.../), to be applied to the first line of log message body.
Presumably other projects could have more than one "popular"
prefixes that appear often, so (if we take command line
approach, which I think is the worst of the three possibilities)
the "slightly more generalized" version would look something
like this perhaps?

  git-shortlog --mailmapfile=.mailmap \
  	--abbrev=/pub/scm/linux/kernel/git/,/.../ \
        --abbrev=/pub/scm/,/.../../

We could even define the --abbrev stuff as 's/from/to/' but that
would make it harder for us to shake Perl off, and in practice
this is to shorten the merge source repository name, so
deliberately limiting its feature to simple string replace like
the above might make more sense.



  reply	other threads:[~2006-10-26 10:00 UTC|newest]

Thread overview: 26+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2006-10-26  8:47 What's in git.git Junio C Hamano
2006-10-26  9:12 ` Jakub Narebski
2006-10-26  9:24   ` Junio C Hamano
2006-10-26 12:08   ` Petr Baudis
2006-10-26 12:17     ` Jakub Narebski
2006-10-26  9:18 ` merge-recursive, was " Johannes Schindelin
2006-10-26  9:25   ` Jakub Narebski
2006-10-26  9:35     ` Junio C Hamano
2006-10-26  9:47       ` Jakub Narebski
2006-10-26 13:23       ` Nicolas Pitre
2006-10-26 12:34     ` git-shortlog mailmap Petr Baudis
2006-10-26 12:41       ` Jakub Narebski
2006-10-26 12:43         ` Andreas Ericsson
2006-10-26 13:13           ` Jakub Narebski
2006-10-26 13:16             ` Johannes Schindelin
2006-10-26 13:29         ` Petr Baudis
2006-10-26  9:26   ` merge-recursive, was Re: What's in git.git Junio C Hamano
2006-10-26 10:00     ` Junio C Hamano [this message]
2006-10-26 10:56       ` Johannes Schindelin
2006-10-26 11:35   ` shortlog, was " Andreas Ericsson
2006-10-26 13:39     ` Nicolas Pitre
2006-10-26 13:45       ` Andreas Ericsson
2006-10-26  9:19 ` Jakub Narebski
2006-10-27  1:10   ` Petr Baudis
2006-10-26 12:22 ` Petr Baudis
2006-10-26 17:27 ` Andy Whitcroft

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: http://vger.kernel.org/majordomo-info.html

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=7v7iyno0qk.fsf@assigned-by-dhcp.cox.net \
    --to=junkio@cox.net \
    --cc=Johannes.Schindelin@gmx.de \
    --cc=git@vger.kernel.org \
    --cc=torvalds@osdl.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this public inbox

	https://80x24.org/mirrors/git.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).