Re: [PATCH 1/2] Documentation/Makefile: clean up MAN*_TXT lists

2013-02-01 Thread Jeff King
On Fri, Feb 01, 2013 at 02:38:51PM -0500, Jeff King wrote:

> Junio, do you want to apply the patch below? I guess it conflicts with
> John's gitremote-helper.txt tweak, though.

Argh, it would help if I actually ran "git commit", and/or looked at
what I was sending out. Here it is with the actual change.

-- >8 --
Subject: [PATCH] Documentation/Makefile: clean up MAN*_TXT lists

We keep a list of the various files that end up as man1,
man5, etc. Let's break these single-line lists into sorted
multi-line lists, which makes diffs that touch them much
easier to read.

Reviewed-by: Jonathan Nieder 
Signed-off-by: Jeff King 
---
 Documentation/Makefile | 38 +-
 1 file changed, 29 insertions(+), 9 deletions(-)

diff --git a/Documentation/Makefile b/Documentation/Makefile
index 971977b..5d22e0e 100644
--- a/Documentation/Makefile
+++ b/Documentation/Makefile
@@ -1,13 +1,33 @@ MAN7_TXT += gitcredentials.txt
-MAN1_TXT= \
-   $(filter-out $(addsuffix .txt, $(ARTICLES) $(SP_ARTICLES)), \
-   $(wildcard git-*.txt)) \
-   gitk.txt gitweb.txt git.txt
-MAN5_TXT=gitattributes.txt gitignore.txt gitmodules.txt githooks.txt \
-   gitrepository-layout.txt gitweb.conf.txt
-MAN7_TXT=gitcli.txt gittutorial.txt gittutorial-2.txt \
-   gitcvs-migration.txt gitcore-tutorial.txt gitglossary.txt \
-   gitdiffcore.txt gitnamespaces.txt gitrevisions.txt gitworkflows.txt
+# Guard against environment variables
+MAN1_TXT =
+MAN5_TXT =
+MAN7_TXT =
+
+MAN1_TXT += $(filter-out \
+   $(addsuffix .txt, $(ARTICLES) $(SP_ARTICLES)), \
+   $(wildcard git-*.txt))
+MAN1_TXT += git.txt
+MAN1_TXT += gitk.txt
+MAN1_TXT += gitweb.txt
+
+MAN5_TXT += gitattributes.txt
+MAN5_TXT += githooks.txt
+MAN5_TXT += gitignore.txt
+MAN5_TXT += gitmodules.txt
+MAN5_TXT += gitrepository-layout.txt
+MAN5_TXT += gitweb.conf.txt
+
+MAN7_TXT += gitcli.txt
+MAN7_TXT += gitcore-tutorial.txt
 MAN7_TXT += gitcredentials.txt
+MAN7_TXT += gitcvs-migration.txt
+MAN7_TXT += gitdiffcore.txt
+MAN7_TXT += gitglossary.txt
+MAN7_TXT += gitnamespaces.txt
+MAN7_TXT += gitrevisions.txt
+MAN7_TXT += gittutorial-2.txt
+MAN7_TXT += gittutorial.txt
+MAN7_TXT += gitworkflows.txt
 
 MAN_TXT = $(MAN1_TXT) $(MAN5_TXT) $(MAN7_TXT)
 MAN_XML=$(patsubst %.txt,%.xml,$(MAN_TXT))
-- 
1.8.1.2.11.g1a2f572

--
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 1/2] Documentation/Makefile: clean up MAN*_TXT lists

2013-02-01 Thread Jeff King
On Fri, Feb 01, 2013 at 11:20:10AM -0800, Jonathan Nieder wrote:

> Jeff King wrote:
> 
> > We keep a list of the various files that end up as man1,
> > man5, etc. Let's break these single-line lists into sorted
> > multi-line lists, which makes diffs that touch them much
> > easier to read.
> 
> Independentally of the rest of the series, I think this is a good
> cleanup.

Yeah, I'd agree.

> > --- a/Documentation/Makefile
> > +++ b/Documentation/Makefile
> > @@ -1,13 +1,28 @@ MAN7_TXT += gitcredentials.txt
> > -MAN1_TXT= \
> > -   $(filter-out $(addsuffix .txt, $(ARTICLES) $(SP_ARTICLES)), \
> > -   $(wildcard git-*.txt)) \
> > -   gitk.txt gitweb.txt git.txt
> > +MAN1_TXT += git.txt
> > +MAN1_TXT += gitk.txt
> > +MAN1_TXT += gitweb.txt
> > +
> 
> If the user happens to have MAN[157]_TXT set in the environment, this
> would be affected by that.  How about:
> 
>   # Guard against environment variables
>   MAN1_TXT =
>   MAN5_TXT =
>   MAN7_TXT =
>   
>   MAN1_TXT += ...
>   ...
> 
> ?

Sure, not that likely, but no reason not to be careful. I notice the
rest of the file uses the:

  FOO = first
  FOO += second
  ...

pattern, though I prefer the style you showed myself.

Junio, do you want to apply the patch below? I guess it conflicts with
John's gitremote-helper.txt tweak, though.

-- >8 --
Subject: [PATCH] Documentation/Makefile: clean up MAN*_TXT lists

We keep a list of the various files that end up as man1,
man5, etc. Let's break these single-line lists into sorted
multi-line lists, which makes diffs that touch them much
easier to read.

Reviewed-by: Jonathan Nieder 
Signed-off-by: Jeff King 
---
 Documentation/Makefile | 33 -
 1 file changed, 24 insertions(+), 9 deletions(-)

diff --git a/Documentation/Makefile b/Documentation/Makefile
index 971977b..8e7939f 100644
--- a/Documentation/Makefile
+++ b/Documentation/Makefile
@@ -1,13 +1,28 @@ MAN7_TXT += gitcredentials.txt
-MAN1_TXT= \
-   $(filter-out $(addsuffix .txt, $(ARTICLES) $(SP_ARTICLES)), \
-   $(wildcard git-*.txt)) \
-   gitk.txt gitweb.txt git.txt
-MAN5_TXT=gitattributes.txt gitignore.txt gitmodules.txt githooks.txt \
-   gitrepository-layout.txt gitweb.conf.txt
-MAN7_TXT=gitcli.txt gittutorial.txt gittutorial-2.txt \
-   gitcvs-migration.txt gitcore-tutorial.txt gitglossary.txt \
-   gitdiffcore.txt gitnamespaces.txt gitrevisions.txt gitworkflows.txt
+MAN1_TXT += $(filter-out \
+   $(addsuffix .txt, $(ARTICLES) $(SP_ARTICLES)), \
+   $(wildcard git-*.txt))
+MAN1_TXT += git.txt
+MAN1_TXT += gitk.txt
+MAN1_TXT += gitweb.txt
+
+MAN5_TXT += gitattributes.txt
+MAN5_TXT += githooks.txt
+MAN5_TXT += gitignore.txt
+MAN5_TXT += gitmodules.txt
+MAN5_TXT += gitrepository-layout.txt
+MAN5_TXT += gitweb.conf.txt
+
+MAN7_TXT += gitcli.txt
+MAN7_TXT += gitcore-tutorial.txt
 MAN7_TXT += gitcredentials.txt
+MAN7_TXT += gitcvs-migration.txt
+MAN7_TXT += gitdiffcore.txt
+MAN7_TXT += gitglossary.txt
+MAN7_TXT += gitnamespaces.txt
+MAN7_TXT += gitrevisions.txt
+MAN7_TXT += gittutorial-2.txt
+MAN7_TXT += gittutorial.txt
+MAN7_TXT += gitworkflows.txt
 
 MAN_TXT = $(MAN1_TXT) $(MAN5_TXT) $(MAN7_TXT)
 MAN_XML=$(patsubst %.txt,%.xml,$(MAN_TXT))
-- 
1.8.1.2.11.g1a2f572

--
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 1/2] Documentation/Makefile: clean up MAN*_TXT lists

2013-02-01 Thread Junio C Hamano
Jonathan Nieder  writes:

>> --- a/Documentation/Makefile
>> +++ b/Documentation/Makefile
>> @@ -1,13 +1,28 @@ MAN7_TXT += gitcredentials.txt
>> -MAN1_TXT= \
>> -$(filter-out $(addsuffix .txt, $(ARTICLES) $(SP_ARTICLES)), \
>> -$(wildcard git-*.txt)) \
>> -gitk.txt gitweb.txt git.txt
>> +MAN1_TXT += git.txt
>> +MAN1_TXT += gitk.txt
>> +MAN1_TXT += gitweb.txt
>> +
>
> If the user happens to have MAN[157]_TXT set in the environment, this
> would be affected by that.  How about:
>
>   # Guard against environment variables
>   MAN1_TXT =
>   MAN5_TXT =
>   MAN7_TXT =
>   
>   MAN1_TXT += ...
>   ...
>
> With that change,
> Reviewed-by: Jonathan Nieder 

Sounds sensible.  Let's go in that direction.

Thanks.
--
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 1/2] Documentation/Makefile: clean up MAN*_TXT lists

2013-02-01 Thread Jonathan Nieder
Jeff King wrote:

> We keep a list of the various files that end up as man1,
> man5, etc. Let's break these single-line lists into sorted
> multi-line lists, which makes diffs that touch them much
> easier to read.

Independentally of the rest of the series, I think this is a good
cleanup.

> --- a/Documentation/Makefile
> +++ b/Documentation/Makefile
> @@ -1,13 +1,28 @@ MAN7_TXT += gitcredentials.txt
> -MAN1_TXT= \
> - $(filter-out $(addsuffix .txt, $(ARTICLES) $(SP_ARTICLES)), \
> - $(wildcard git-*.txt)) \
> - gitk.txt gitweb.txt git.txt
> +MAN1_TXT += git.txt
> +MAN1_TXT += gitk.txt
> +MAN1_TXT += gitweb.txt
> +

If the user happens to have MAN[157]_TXT set in the environment, this
would be affected by that.  How about:

# Guard against environment variables
MAN1_TXT =
MAN5_TXT =
MAN7_TXT =

MAN1_TXT += ...
...

?

With that change,
Reviewed-by: Jonathan Nieder 
--
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