Re: [PATCH v2] build: add default configuration

2013-09-22 Thread David Aguilar
Felipe Contreras  wrote:
>David Aguilar wrote:
>> Felipe Contreras  wrote:
>> >On Sat, Sep 21, 2013 at 1:58 PM, Johannes Sixt  wrote:
>> >> Am 21.09.2013 13:47, schrieb Felipe Contreras:
>> >>> diff --git a/Makefile b/Makefile
>> >>> index 3588ca1..18081bf 100644
>> >>> --- a/Makefile
>> >>> +++ b/Makefile
>> >>> @@ -1010,7 +1010,7 @@ ifndef sysconfdir
>> >>>  ifeq ($(prefix),/usr)
>> >>>  sysconfdir = /etc
>> >>>  else
>> >>> -sysconfdir = etc
>> >>> +sysconfdir = $(prefix)/etc
>> >>
>> >> Not good: There is a reason why this is a relative path. Please
>dig
>> >the
>> >> history, it's pretty clear.
>> >
>> >It's pretty clear it's *not* a relative path.
>> >
>> >What is relative about 'sysconfdir = /etc'?
>> 
>> Thanks Johannes. Felipe, the history and this comment from the
>makefile should shed some light on it:
>> 
>> # Among the variables below, these:
>> #   gitexecdir
>> #   template_dir
>> #   sysconfdir
>> # can be specified as a relative path some/where/else;
>> # this is interpreted as relative to $(prefix) and "git" at
>> # runtime figures out where they are based on the path to the
>executable.
>
>They *can* be, but not necessarily so, and in particular sysconfig for
>probably
>99% of the users is not relative, it's /etc.

This makes Git relocatable. MsysGit has many more users then developers, and 
represents a pretty large chunk of users. 

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


Re: [PATCH v2] build: add default configuration

2013-09-21 Thread Felipe Contreras
David Aguilar wrote:
> Felipe Contreras  wrote:
> >On Sat, Sep 21, 2013 at 1:58 PM, Johannes Sixt  wrote:
> >> Am 21.09.2013 13:47, schrieb Felipe Contreras:
> >>> diff --git a/Makefile b/Makefile
> >>> index 3588ca1..18081bf 100644
> >>> --- a/Makefile
> >>> +++ b/Makefile
> >>> @@ -1010,7 +1010,7 @@ ifndef sysconfdir
> >>>  ifeq ($(prefix),/usr)
> >>>  sysconfdir = /etc
> >>>  else
> >>> -sysconfdir = etc
> >>> +sysconfdir = $(prefix)/etc
> >>
> >> Not good: There is a reason why this is a relative path. Please dig
> >the
> >> history, it's pretty clear.
> >
> >It's pretty clear it's *not* a relative path.
> >
> >What is relative about 'sysconfdir = /etc'?
> 
> Thanks Johannes. Felipe, the history and this comment from the makefile 
> should shed some light on it:
> 
> # Among the variables below, these:
> #   gitexecdir
> #   template_dir
> #   sysconfdir
> # can be specified as a relative path some/where/else;
> # this is interpreted as relative to $(prefix) and "git" at
> # runtime figures out where they are based on the path to the executable.

They *can* be, but not necessarily so, and in particular sysconfig for probably
99% of the users is not relative, it's /etc.

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


Re: [PATCH v2] build: add default configuration

2013-09-21 Thread David Aguilar
Felipe Contreras  wrote:
>On Sat, Sep 21, 2013 at 1:58 PM, Johannes Sixt  wrote:
>> Am 21.09.2013 13:47, schrieb Felipe Contreras:
>>> diff --git a/Makefile b/Makefile
>>> index 3588ca1..18081bf 100644
>>> --- a/Makefile
>>> +++ b/Makefile
>>> @@ -1010,7 +1010,7 @@ ifndef sysconfdir
>>>  ifeq ($(prefix),/usr)
>>>  sysconfdir = /etc
>>>  else
>>> -sysconfdir = etc
>>> +sysconfdir = $(prefix)/etc
>>
>> Not good: There is a reason why this is a relative path. Please dig
>the
>> history, it's pretty clear.
>
>It's pretty clear it's *not* a relative path.
>
>What is relative about 'sysconfdir = /etc'?

Thanks Johannes. Felipe, the history and this comment from the makefile should 
shed some light on it:

# Among the variables below, these:
#   gitexecdir
#   template_dir
#   sysconfdir
# can be specified as a relative path some/where/else;
# this is interpreted as relative to $(prefix) and "git" at
# runtime figures out where they are based on the path to the executable.
...
So it'll probably need another makefile variable to do this cleanly.

I hope that helps.
Cheers,


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


Re: [PATCH v2] build: add default configuration

2013-09-21 Thread Felipe Contreras
On Sat, Sep 21, 2013 at 1:58 PM, Johannes Sixt  wrote:
> Am 21.09.2013 13:47, schrieb Felipe Contreras:
>> diff --git a/Makefile b/Makefile
>> index 3588ca1..18081bf 100644
>> --- a/Makefile
>> +++ b/Makefile
>> @@ -1010,7 +1010,7 @@ ifndef sysconfdir
>>  ifeq ($(prefix),/usr)
>>  sysconfdir = /etc
>>  else
>> -sysconfdir = etc
>> +sysconfdir = $(prefix)/etc
>
> Not good: There is a reason why this is a relative path. Please dig the
> history, it's pretty clear.

It's pretty clear it's *not* a relative path.

What is relative about 'sysconfdir = /etc'?

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


Re: [PATCH v2] build: add default configuration

2013-09-21 Thread Johannes Sixt
Am 21.09.2013 13:47, schrieb Felipe Contreras:
> diff --git a/Makefile b/Makefile
> index 3588ca1..18081bf 100644
> --- a/Makefile
> +++ b/Makefile
> @@ -1010,7 +1010,7 @@ ifndef sysconfdir
>  ifeq ($(prefix),/usr)
>  sysconfdir = /etc
>  else
> -sysconfdir = etc
> +sysconfdir = $(prefix)/etc

Not good: There is a reason why this is a relative path. Please dig the
history, it's pretty clear.

-- Hannes

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


Re: [PATCH v2] build: add default configuration

2013-09-21 Thread David Aguilar
Felipe Contreras  wrote:
>For now simply add a few common aliases.
>
>  co = checkout
>  ci = commit
>  rb = rebase
>  st = status
>
>Signed-off-by: Felipe Contreras 
>---
> Documentation/git-checkout.txt | 5 +
> Documentation/git-commit.txt   | 5 +
> Documentation/git-rebase.txt   | 5 +
> Documentation/git-status.txt   | 5 +
> Makefile   | 5 -
> gitconfig  | 5 +
> 6 files changed, 29 insertions(+), 1 deletion(-)

The .spec.in file contains a manifest of all the files provided by the git 
package. We're adding a new file so there may be a %{sysconfdir}/gitconfig 
entry needed there.  

> create mode 100644 gitconfig
>
>diff --git a/Documentation/git-checkout.txt
>b/Documentation/git-checkout.txt
>index ca118ac..7597813 100644
>--- a/Documentation/git-checkout.txt
>+++ b/Documentation/git-checkout.txt
>@@ -14,6 +14,11 @@ SYNOPSIS
>'git checkout' [-f|--ours|--theirs|-m|--conflict=