Re: [PATCHv6 2/4] Let core.excludesfile default to $XDG_CONFIG_HOME/git/ignore

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

 



Huynh Khoi Nguyen NGUYEN  <Huynh-Khoi-Nguyen.Nguyen@xxxxxxxxxxxxxxx>
writes:

> From: NGUYEN Huynh Khoi Nguyen <nguyenhu@xxxxxxxxxxxxxx>
>
> If core.excludesfile is not defined, its default value will be
> $XDG_CONFIG_HOME/git/ignore in order to follow XDG specification.

I find the above statement hard to understand and harder to agree
with.

Right now, when core.excludesfile is not defined, the user does not
have to worry about any "global" ignore file to get in the way while
working on a specific project.  With this change, if the user does
not want random paths in the project that happens to match a pattern
in this XDG_CONFIG_HOME/git/ignore file that is totally outside of
the project's control, the user needs to make sure core.excludesfile
is set to an empty file or something.

That sounds like a huge downside; does XDG specification mandates
such a regression?  Do they say "you must treat XDG_CONFIG_HOME/git/ignore
as your global ignore file"?  It is hard to believe.

Perhaps you are doing two or more unrelated things and stating what
you are doing poorly, which is what is confusing me?

Perhaps the problem you are solving is something like this (by the
way, you didn't state what problem you are trying to solve at all):

 - Use of core.excludesfile is an opt-in feature to keep ignore
   patterns in a file and use it across projects defined per user.
   To use this feature, the user needs to create such a file, and
   add configuration variable to point at it.  The feature needs two
   user actions to enable.

 - Instead, we can define a filename that is unlikely to already
   exist on the system, and use the presense of the file as a cue
   that the user wants to use that feature.  The user can simply
   create the file without adding configuration variable to point at
   it. Now the feature needs only one user action to enable, which
   is the primary problem I wanted to solve.

 - Now we need to decide what that magic filename should be.  We
   could pick any random filename that user can create, and no other
   user can create for the user, which means that it has to be under
   $HOME.  Let's use "${XDG_CONFIG_HOME:-$HOME/.config/git}/ignore";
   it is as good as any random filename in $HOME/ and follows the
   XDG guideline.

But that may not be what you meant to say.  I dunno.

--
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]