Documentation: Clarify which paths git-clean will affect
PATCH 1/1 Documentation: Clarify which paths git-clean will affect
--- Documentation/git-clean.txt | 3 +++ 1 files changed, 3 insertions(+), 0 deletions(-)
Documentation/git-clean.txt +3 -0
@@ -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::
Signature · 4 lines
1.6.3.rc4.106.g0303f -- Fredrik Skolmli
Documentation/git-clean.txt example, be useful to remove all build products. · line 27
Quoted 8 lines · Fredrik Skolmli
Documentation/git-clean.txt +2
-0@@ -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!
Signature · 2 lines
Thomas Rast
trast@{inf,student}.ethz.chQuoted 7 lines · Thomas Rast
Quoted 6 lines · Fredrik Skolmli
Documentation/git-clean.txt +0
-0@@ -23,6 +23,9 @@ example, be useful to remove all build products. If any optional `<path>...` arguments are given, only those paths are affected.
Quoted 5 lines
Documentation/git-clean.txt example, be useful to remove all build products. · line 27
Quoted 2 lines
Documentation/git-clean.txt +2
-0+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?
Signature · 1 line
Fredrik Skolmli
Quoted 8 lines · Fredrik Skolmli
Quoted 7 lines · Thomas Rast
Quoted 6 lines · Fredrik Skolmli
Documentation/git-clean.txt +0
-0@@ -23,6 +23,9 @@ example, be useful to remove all build products. If any optional `<path>...` arguments are given, only those paths are affected.
Quoted 7 lines
Quoted 5 lines
Documentation/git-clean.txt example, be useful to remove all build products. · line 27
Quoted 2 lines
Documentation/git-clean.txt +2
-0+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.
Signature · 1 line
Nicolas Sebrecht
Quoted 5 lines · Fredrik Skolmli
Quoted 2 lines · Thomas Rast
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< --
Documentation/git-clean.txt +3 -3
@@ -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.
Signature · 2 lines
Thomas Rast
trast@{inf,student}.ethz.chDocumentation/git-clean.txt SYNOPSIS · line 24
Quoted 8 lines · Thomas Rast
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.
Documentation/git-clean.txt +2
-2-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:
Documentation/git-clean.txt SYNOPSIS · line 17
Quoted 11 lines
Documentation/git-clean.txt +1
-1@@ -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.
Quoted 10 lines · Junio C Hamano
Documentation/git-clean.txt SYNOPSIS · line 24
Quoted 4 lines · Thomas Rast
Documentation/git-clean.txt +2
-2-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.
Quoted 7 lines
I'd suggest not touching this paragraph at all, but instead say something like this at the beginning:
Quoted 1 line
-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.
Signature · 2 lines
Thomas Rast
trast@{inf,student}.ethz.chQuoted 9 lines · Thomas Rast
Quoted 7 lines
I'd suggest not touching this paragraph at all, but instead say something like this at the beginning:
Quoted 1 line
-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)
Signature · 1 line
Fredrik Skolmli
Quoted 7 lines · Fredrik Skolmli
Quoted 1 line · Thomas Rast
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.
--- Documentation/git-clean.txt | 4 ++-- 1 files changed, 2 insertions(+), 2 deletions(-)
Documentation/git-clean.txt +2 -2
@@ -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