Re: [PATCH 1/7] path.c: implement xdg_config_home()

2015-04-14 Thread Stefan Beller
I need to learn to read the whole sentence. :( Apologies. On Tue, Apr 14, 2015 at 3:30 PM, Junio C Hamano wrote: > Stefan Beller writes: > >> On Tue, Apr 14, 2015 at 1:39 PM, Junio C Hamano wrote: >> >>> It is OK to omit the name in the extern declaration here. >> >> It is OK, but I think this

Re: [PATCH 1/7] path.c: implement xdg_config_home()

2015-04-14 Thread Junio C Hamano
Stefan Beller writes: > On Tue, Apr 14, 2015 at 1:39 PM, Junio C Hamano wrote: > >> It is OK to omit the name in the extern declaration here. > > It is OK, but I think this is bad practice. Take a special note on the word "here", meaning "in this particular case." It is perfectly fine when the

Re: [PATCH 1/7] path.c: implement xdg_config_home()

2015-04-14 Thread Stefan Beller
On Tue, Apr 14, 2015 at 1:39 PM, Junio C Hamano wrote: > Johannes Schindelin writes: > >>> diff --git a/cache.h b/cache.h >>> index 3d3244b..7f9bab0 100644 >>> --- a/cache.h >>> +++ b/cache.h >>> @@ -836,6 +836,13 @@ char *strip_path_suffix(const char *path, const >>> char *suffix); >>> int daem

Re: [PATCH 1/7] path.c: implement xdg_config_home()

2015-04-14 Thread Junio C Hamano
Johannes Schindelin writes: >> diff --git a/cache.h b/cache.h >> index 3d3244b..7f9bab0 100644 >> --- a/cache.h >> +++ b/cache.h >> @@ -836,6 +836,13 @@ char *strip_path_suffix(const char *path, const >> char *suffix); >> int daemon_avoid_alias(const char *path); >> extern int is_ntfs_dotgit(co

Re: [PATCH 1/7] path.c: implement xdg_config_home()

2015-04-13 Thread Stefan Beller
On Mon, Apr 13, 2015 at 2:43 PM, Matthieu Moy wrote: > Paul Tan writes: > >> As such, implement a simpler function xdg_config_home() for constructing >> the XDG base dir spec configuration file path. This function, together >> with expand_user_path(), can replace all uses of home_config_paths().

Re: [PATCH 1/7] path.c: implement xdg_config_home()

2015-04-13 Thread Matthieu Moy
Paul Tan writes: > As such, implement a simpler function xdg_config_home() for constructing > the XDG base dir spec configuration file path. This function, together > with expand_user_path(), can replace all uses of home_config_paths(). Indeed. The code looks much better after your patch series

Re: [PATCH 1/7] path.c: implement xdg_config_home()

2015-04-13 Thread Johannes Schindelin
Hi Paul, maybe it would be a good idea to add a `0/7` mail that describes the overall goal of this patch series, much like a Pull Request? I found it very useful -- even for myself -- to set a description via `git branch --edit-description` and to let `git format-patch` use that via the `--cove

[PATCH 1/7] path.c: implement xdg_config_home()

2015-04-12 Thread Paul Tan
The XDG base dir spec[1] specifies that configuration files be stored in a subdirectory in $XDG_CONFIG_HOME. To construct such a configuration file path, home_config_paths() can be used. However, home_config_paths() combines distinct functionality: 1. Retrieve the home git config file path ~/.gitc