Subject: Re: [RFH] GSoC 2015 application

From: Matthieu Moy <[email-masked]>
Date: Fri, 20 Feb 2015 11:06:53 +0100

Jeff King <[email-masked]> writes:

>> * Be nicer to the user on tracked/untracked merge conflicts
>> [...]
>
> Sounds OK to me, though I agree the merging of untracked files is a
> little controversial.

Yes. To me, part of the project is to identify cases where this is
actually not controversial (OTOH, it's a bit frustrating when I do a
trivial pull and Git complains because I already have the file).

>> +### Move ~/.git-credentials and ~/.git-credential-cache to ~/.config/git
>> +
>> +Most of git dotfiles can be located, at the user's option, in
>> +~/.<file> or in ~/.config/git/<file>, following the [XDG
>> +standard](http://standards.freedesktop.org/basedir-spec/basedir-spec-latest.html).
>> +~/.git-credentials and ~/.git-credential-cache are still hardcoded as
>> +~/.<file>, and should allow using the XDG directory layout too
>> +(~/.git-credentials could be allowed as ~/.config/git/credential and
>> +~/.git-credential-cache could be allowed as ~/.cache/git/credential,
>> +possibly modified by $XDG_CONFIG_HOME and $XDG_CACHE_HOME).
>> +
>> +Each of these files can be a microproject of its own. The suggested
>> +approach is:
>> +
>> +* See how XDG was implemented for other files (run "git log --grep
>> +  XDG" in Git's source code) and read the XDG specification.
>> +
>> +* Implement and test the new behavior, without breaking compatibility
>> +  with the old behavior.
>> +
>> +* Update the documentation
>
> I think these might be getting a little larger than "micro".

The ~/.git-credential-cache may be a bit harder, but the case of
~/.git-credentials should follow the same pattern as files for which
this is already done. So, doing it by mimicking existing code shouldn't
be too hard.

But maybe that's me being optimistic ;-).

>> +### Add configuration options for some commonly used command-line options
>> +
>> +This includes:
>> +
>> +* git am -3
>> +
>> +* git am -c
>> +
>> +Some people always run the command with these options, and would
>> +prefer to be able to activate them by default in ~/.gitconfig.
>
> The direction here seems reasonable, though I think we have
> mailinfo.scissors already, so "-c" may not be a good example.

Ah, indeed. The documentation makes it a bit hard to find, but I'll send
a patch.

>> +### Add more builtin patterns for userdiff
>> +
>> +"git diff" shows the function name corresponding to each hunk after
>> +the @@ ... @@ line. For common languages (C, HTML, Ada, Matlab, ...),
>> +the way to find the function name is built-in Git's source code as
>> +regular expressions (see userdiff.c). A few languages are common
>> +enough to deserve a built-in driver, but are not yet recognized. For
>> +example, CSS, shell.
>
> I am not sure that understanding the horrible regexes involved in some
> userdiff counts as "micro", but OK. :)

I agree the regexes are horrible, but here also the project is not about
doing something really new, but reproducing what has already been done
for others.

At least, students not fluent with regular expressions have a pointer to
userdiff.c and can quickly see that the microproject is not meant for
them ;-).

-- 
Matthieu Moy
http://www-verimag.imag.fr/~moy/