git.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] Documentation: Clarify which paths git-clean will affect
@ 2009-05-05  9:13 Fredrik Skolmli
  2009-05-05  9:55 ` Thomas Rast
  0 siblings, 1 reply; 9+ messages in thread
From: Fredrik Skolmli @ 2009-05-05  9:13 UTC (permalink / raw)
  To: git; +Cc: Junio C Hamano


Signed-off-by: Fredrik Skolmli <fredrik@frsk.net>
---
 Documentation/git-clean.txt |    3 +++
 1 files changed, 3 insertions(+), 0 deletions(-)

diff --git a/Documentation/git-clean.txt b/Documentation/git-clean.txt
index 43b2de7..ec6f743 100644
--- a/Documentation/git-clean.txt
+++ b/Documentation/git-clean.txt
@@ -23,6 +23,9 @@ example, be useful to remove all build products.
 If any optional `<path>...` arguments are given, only those paths
 are affected.
 
+If no arguments are given, the cleaning is recursive, starting at the current
+path.
+
 OPTIONS
 -------
 -d::
-- 
1.6.3.rc4.106.g0303f

-- 
Fredrik Skolmli

^ permalink raw reply related	[flat|nested] 9+ messages in thread

* Re: [PATCH] Documentation: Clarify which paths git-clean will affect
  2009-05-05  9:13 [PATCH] Documentation: Clarify which paths git-clean will affect Fredrik Skolmli
@ 2009-05-05  9:55 ` Thomas Rast
  2009-05-05 10:05   ` Fredrik Skolmli
  0 siblings, 1 reply; 9+ messages in thread
From: Thomas Rast @ 2009-05-05  9:55 UTC (permalink / raw)
  To: Fredrik Skolmli; +Cc: git, Junio C Hamano

[-- Attachment #1: Type: text/plain, Size: 478 bytes --]

Fredrik Skolmli wrote:
> --- a/Documentation/git-clean.txt
> +++ b/Documentation/git-clean.txt
> @@ -23,6 +23,9 @@ example, be useful to remove all build products.
>  If any optional `<path>...` arguments are given, only those paths
>  are affected.
>  
> +If no arguments are given, the cleaning is recursive, starting at the current
> +path.

That makes it sound as if the <path> case was not recursive, but it
is!

-- 
Thomas Rast
trast@{inf,student}.ethz.ch

[-- Attachment #2: This is a digitally signed message part. --]
[-- Type: application/pgp-signature, Size: 197 bytes --]

^ permalink raw reply	[flat|nested] 9+ messages in thread

* Re: [PATCH] Documentation: Clarify which paths git-clean will affect
  2009-05-05  9:55 ` Thomas Rast
@ 2009-05-05 10:05   ` Fredrik Skolmli
  2009-05-05 11:17     ` [PATCH] " Nicolas Sebrecht
  2009-05-05 12:26     ` [PATCH] " Thomas Rast
  0 siblings, 2 replies; 9+ messages in thread
From: Fredrik Skolmli @ 2009-05-05 10:05 UTC (permalink / raw)
  To: Thomas Rast; +Cc: git, Junio C Hamano

On Tue, May 05, 2009 at 11:55:17AM +0200, Thomas Rast wrote:
> Fredrik Skolmli wrote:
> > --- a/Documentation/git-clean.txt
> > +++ b/Documentation/git-clean.txt
> > @@ -23,6 +23,9 @@ example, be useful to remove all build products.
> >  If any optional `<path>...` arguments are given, only those paths
> >  are affected.
> >  
> > +If no arguments are given, the cleaning is recursive, starting at the current
> > +path.
> 
> That makes it sound as if the <path> case was not recursive, but it
> is!

Auch, good point. Any suggestions on how to formulate it?

-- 
Fredrik Skolmli

^ permalink raw reply	[flat|nested] 9+ messages in thread

* [PATCH] Re: Documentation: Clarify which paths git-clean will affect
  2009-05-05 10:05   ` Fredrik Skolmli
@ 2009-05-05 11:17     ` Nicolas Sebrecht
  2009-05-05 12:26     ` [PATCH] " Thomas Rast
  1 sibling, 0 replies; 9+ messages in thread
From: Nicolas Sebrecht @ 2009-05-05 11:17 UTC (permalink / raw)
  To: Fredrik Skolmli; +Cc: Thomas Rast, git, Junio C Hamano

The 05/05/09, Fredrik Skolmli wrote:
> On Tue, May 05, 2009 at 11:55:17AM +0200, Thomas Rast wrote:
> > Fredrik Skolmli wrote:
> > > --- a/Documentation/git-clean.txt
> > > +++ b/Documentation/git-clean.txt
> > > @@ -23,6 +23,9 @@ example, be useful to remove all build products.
> > >  If any optional `<path>...` arguments are given, only those paths
> > >  are affected.
> > >  
> > > +If no arguments are given, the cleaning is recursive, starting at the current
> > > +path.
> > 
> > That makes it sound as if the <path> case was not recursive, but it
> > is!
> 
> Auch, good point. Any suggestions on how to formulate it?

Maybe:

If any optional `<path>...` arguments are given, only those paths are
affected. If no arguments are given, the cleaning starts at the current
path.

The cleaning are recursive.

-- 
Nicolas Sebrecht

^ permalink raw reply	[flat|nested] 9+ messages in thread

* Re: [PATCH] Documentation: Clarify which paths git-clean will affect
  2009-05-05 10:05   ` Fredrik Skolmli
  2009-05-05 11:17     ` [PATCH] " Nicolas Sebrecht
@ 2009-05-05 12:26     ` Thomas Rast
  2009-05-05 16:20       ` Junio C Hamano
  1 sibling, 1 reply; 9+ messages in thread
From: Thomas Rast @ 2009-05-05 12:26 UTC (permalink / raw)
  To: Fredrik Skolmli; +Cc: git, Junio C Hamano, Nicolas Sebrecht

[-- Attachment #1: Type: text/plain, Size: 1572 bytes --]

Fredrik Skolmli wrote:
> On Tue, May 05, 2009 at 11:55:17AM +0200, Thomas Rast wrote:
> > That makes it sound as if the <path> case was not recursive, but it
> > is!
> 
> Auch, good point. Any suggestions on how to formulate it?

I'm not entirely happy with it, but if we're going to change it, I'd
put the "recursive" near the top to make it more visible.  Maybe like
so:

-- 8< --
diff --git i/Documentation/git-clean.txt w/Documentation/git-clean.txt
index 43b2de7..3550fc0 100644
--- i/Documentation/git-clean.txt
+++ w/Documentation/git-clean.txt
@@ -13,15 +13,15 @@ SYNOPSIS
 DESCRIPTION
 -----------
 
-This allows cleaning the working tree by removing files that are not
+Cleans the working tree by recursively removing files that are not
 under version control.
 
 Normally, only files unknown to git are removed, but if the '-x'
 option is specified, ignored files are also removed. This can, for
 example, be useful to remove all build products.
 
-If any optional `<path>...` arguments are given, only those paths
-are affected.
+If any optional `<path>...` arguments are given, those paths are
+affected.  Otherwise, the cleaning starts at the current directory.
 
 OPTIONS
 -------
-- >8 --

As a side note, a random survey among a few other manpages did not
give any conclusive advice on the formulation of the first sentence.
I originally wanted to make it imperative ("clean the working
tree..."), but my perception may be skewed by the commit message
guidelines.

-- 
Thomas Rast
trast@{inf,student}.ethz.ch

[-- Attachment #2: This is a digitally signed message part. --]
[-- Type: application/pgp-signature, Size: 197 bytes --]

^ permalink raw reply related	[flat|nested] 9+ messages in thread

* Re: [PATCH] Documentation: Clarify which paths git-clean will affect
  2009-05-05 12:26     ` [PATCH] " Thomas Rast
@ 2009-05-05 16:20       ` Junio C Hamano
  2009-05-06 13:24         ` Thomas Rast
  0 siblings, 1 reply; 9+ messages in thread
From: Junio C Hamano @ 2009-05-05 16:20 UTC (permalink / raw)
  To: Thomas Rast; +Cc: Fredrik Skolmli, git, Nicolas Sebrecht

Thomas Rast <trast@student.ethz.ch> writes:

>  Normally, only files unknown to git are removed, but if the '-x'
>  option is specified, ignored files are also removed. This can, for
>  example, be useful to remove all build products.
>  
> -If any optional `<path>...` arguments are given, only those paths
> -are affected.
> +If any optional `<path>...` arguments are given, those paths are
> +affected.  Otherwise, the cleaning starts at the current directory.

With or without path limiters, clean does not look outside the current
directory; I think the "otherwise" makes things worse than the original.

I'd suggest not touching this paragraph at all, but instead say something
like this at the beginning:

> diff --git i/Documentation/git-clean.txt w/Documentation/git-clean.txt
> index 43b2de7..3550fc0 100644
> --- i/Documentation/git-clean.txt
> +++ w/Documentation/git-clean.txt
> @@ -13,15 +13,15 @@ SYNOPSIS
>  DESCRIPTION
>  -----------
>  
> -This allows cleaning the working tree by removing files that are not
> +Cleans the working tree by recursively removing files that are not
>  under version control.

    Cleans the working tree by recursively removing files that are not
    under version control, starting from the current directory.

^ permalink raw reply	[flat|nested] 9+ messages in thread

* Re: [PATCH] Documentation: Clarify which paths git-clean will affect
  2009-05-05 16:20       ` Junio C Hamano
@ 2009-05-06 13:24         ` Thomas Rast
  2009-05-06 16:31           ` Fredrik Skolmli
  0 siblings, 1 reply; 9+ messages in thread
From: Thomas Rast @ 2009-05-06 13:24 UTC (permalink / raw)
  To: Junio C Hamano; +Cc: Fredrik Skolmli, git, Nicolas Sebrecht

[-- Attachment #1: Type: text/plain, Size: 878 bytes --]

Junio C Hamano wrote:
> Thomas Rast <trast@student.ethz.ch> writes:
> 
> > -If any optional `<path>...` arguments are given, only those paths
> > -are affected.
> > +If any optional `<path>...` arguments are given, those paths are
> > +affected.  Otherwise, the cleaning starts at the current directory.
> 
> With or without path limiters, clean does not look outside the current
> directory; I think the "otherwise" makes things worse than the original.
> 
> I'd suggest not touching this paragraph at all, but instead say something
> like this at the beginning:
> 
> > -This allows cleaning the working tree by removing files that are not
> 
>     Cleans the working tree by recursively removing files that are not
>     under version control, starting from the current directory.

Indeed, yours is better.

-- 
Thomas Rast
trast@{inf,student}.ethz.ch

[-- Attachment #2: This is a digitally signed message part. --]
[-- Type: application/pgp-signature, Size: 197 bytes --]

^ permalink raw reply	[flat|nested] 9+ messages in thread

* Re: [PATCH] Documentation: Clarify which paths git-clean will affect
  2009-05-06 13:24         ` Thomas Rast
@ 2009-05-06 16:31           ` Fredrik Skolmli
  2009-05-06 17:57             ` Junio C Hamano
  0 siblings, 1 reply; 9+ messages in thread
From: Fredrik Skolmli @ 2009-05-06 16:31 UTC (permalink / raw)
  To: Thomas Rast, Junio C Hamano; +Cc: git, Nicolas Sebrecht

On Wed, May 06, 2009 at 03:24:47PM +0200, Thomas Rast wrote:

> > I'd suggest not touching this paragraph at all, but instead say something
> > like this at the beginning:
> > 
> > > -This allows cleaning the working tree by removing files that are not
> > 
> >     Cleans the working tree by recursively removing files that are not
> >     under version control, starting from the current directory.
> 
> Indeed, yours is better.

And I agree, it does looks better. Junio, would you like me to produce a
patch v2, or would you like do the honor? (After all, you came up with the
final suggestion)

-- 
Fredrik Skolmli

^ permalink raw reply	[flat|nested] 9+ messages in thread

* Re: [PATCH] Documentation: Clarify which paths git-clean will affect
  2009-05-06 16:31           ` Fredrik Skolmli
@ 2009-05-06 17:57             ` Junio C Hamano
  0 siblings, 0 replies; 9+ messages in thread
From: Junio C Hamano @ 2009-05-06 17:57 UTC (permalink / raw)
  To: Fredrik Skolmli; +Cc: Thomas Rast, Junio C Hamano, git, Nicolas Sebrecht

Fredrik Skolmli <fredrik@frsk.net> writes:

> On Wed, May 06, 2009 at 03:24:47PM +0200, Thomas Rast wrote:
>
>> Indeed, yours is better.
>
> And I agree, it does looks better. Junio, would you like me to produce a
> patch v2, or would you like do the honor? (After all, you came up with the
> final suggestion)

Ok, I'll queue this one.

-- >8 -- 
Date: Wed, 6 May 2009 10:48:26 -0700
Subject: [PATCH] git-clean doc: the command only affects paths under $(cwd)

Fredrik Skolmli and Thomas Rast noticed that it was left unstated that
"git clean" ran from a subdirectory will not affect anything outside it,
with or without path limiters.

Signed-off-by: Junio C Hamano <gitster@pobox.com>
---
 Documentation/git-clean.txt |    4 ++--
 1 files changed, 2 insertions(+), 2 deletions(-)

diff --git a/Documentation/git-clean.txt b/Documentation/git-clean.txt
index 43b2de7..be894af 100644
--- a/Documentation/git-clean.txt
+++ b/Documentation/git-clean.txt
@@ -13,8 +13,8 @@ SYNOPSIS
 DESCRIPTION
 -----------
 
-This allows cleaning the working tree by removing files that are not
-under version control.
+Cleans the working tree by recursively removing files that are not
+under version control, starting from the current directory.
 
 Normally, only files unknown to git are removed, but if the '-x'
 option is specified, ignored files are also removed. This can, for

^ permalink raw reply related	[flat|nested] 9+ messages in thread

end of thread, other threads:[~2009-05-06 17:58 UTC | newest]

Thread overview: 9+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2009-05-05  9:13 [PATCH] Documentation: Clarify which paths git-clean will affect Fredrik Skolmli
2009-05-05  9:55 ` Thomas Rast
2009-05-05 10:05   ` Fredrik Skolmli
2009-05-05 11:17     ` [PATCH] " Nicolas Sebrecht
2009-05-05 12:26     ` [PATCH] " Thomas Rast
2009-05-05 16:20       ` Junio C Hamano
2009-05-06 13:24         ` Thomas Rast
2009-05-06 16:31           ` Fredrik Skolmli
2009-05-06 17:57             ` Junio C Hamano

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).