On 03/15/2013 01:30 PM, Duy Nguyen wrote:
On Thu, Mar 14, 2013 at 10:05 PM, Junio C Hamano<gits...@pobox.com>  wrote:
"to speed up by stopping displaying untracked files" does not look
like giving a balanced suggestion.  It is increasing the risk of
forgetting about newly created files the user may want to add, but
the risk is not properly warned.
How about "It took X ms to collect untracked files.\nCheck out the
option -u for a potential speedup"? I deliberately hide "no" so that
the user cannot blindly type and run it without reading document
first. We can give full explanation and warning there in the document.
But it makes the advise much less useful to introduce more levels of
indirections, no?
To me the message's value is the pointer to -uno that not many people
know about. And I don't want it to be too verbose as there'll be false
positives (cold cache, busy disks, low memory..), 2-3 lines should be
max. So indirections are not a concern. You want to speed up, you need
to pay some time. Anyway how do you put it to suggest -uno in
git-status with all the implications?
I was thinking about the documentation, the best patch so far may look
like this:
What we think?

-- >8 --

[PATCH] git status: Document that git status -uno is faster

In some repostories users expere that "git status" command takes long time.
The command spends some time searching the file system for untracked files.
Document that searching for untracked file may take some time, and docuemnt
the option -uno better.

Signed-off-by: Torsten Bögershausen <tbo...@web.de>
 Documentation/git-status.txt | 7 +++++++
 1 file changed, 7 insertions(+)

diff --git a/Documentation/git-status.txt b/Documentation/git-status.txt
index 0412c40..fd36bbd 100644
--- a/Documentation/git-status.txt
+++ b/Documentation/git-status.txt
@@ -58,6 +58,13 @@ The possible options are:
 The default can be changed using the status.showUntrackedFiles
 configuration variable documented in linkgit:git-config[1].

+Note: Searching the file system for untracked files may take some time.
+git status -uno is faster than git status -uall.
+There is a trade-off around the use of -uno between safety and performance.
+The default is not to use -uno so that you will not forget to add a file you newly created (i.e safety). +You would pay for the safety with the cost to find such untracked files (i.e. performance).
     Ignore changes to submodules when looking for changes. <when> can be
     either "none", "untracked", "dirty" or "all", which is the default.

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

Reply via email to