Re: merge-recursive, was Re: What's in git.git

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Junio C Hamano <junkio@xxxxxxx> 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.



-
To unsubscribe from this list: send the line "unsubscribe git" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html

[Index of Archives]     [Linux Kernel Development]     [Gcc Help]     [IETF Annouce]     [DCCP]     [Netdev]     [Networking]     [Security]     [V4L]     [Bugtraq]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux SCSI]     [Fedora Users]