{"thread":{"id":"11207","subject":"[PATCH] don't mention index refreshing side effect in git-status docs","startedAt":"2007-12-09T08:21:34Z","lastAt":"2007-12-09T18:15:51Z","messageCount":5,"participants":["Jeff King","Junio C Hamano","Jonathan del Strother"],"isPatch":true,"patchVersion":1,"patchTotal":null},"messages":[{"id":"62465","messageId":"20071209082133.GA2257@coredump.intra.peff.net","threadId":"11207","inReplyTo":null,"subject":"[PATCH] don't mention index refreshing side effect in git-status docs","fromName":"Jeff King","fromEmail":"peff@peff.net","sentAt":"2007-12-09T08:21:34Z","receivedAt":"2007-12-09T08:21:34Z","isPatch":true,"sender":{"key":"peff@peff.net","avatar":"https://avatars.githubusercontent.com/u/45925?v=4"},"body":"The tip about speeding up subsequent operations is now\nobsolete; since aecbf914, git-diff now squelches empty diffs\nand performs an automatic refresh.\n\nSigned-off-by: Jeff King <peff@peff.net>\n---\nThis is on top of my other patches to the git-status docs.\n\nI don't see any reason to mention this side effect at all. Those who\nknow enough to set diff.autorefreshindex presumably know what they are\ndoing, and the removed paragraph is a bit confusing to those who don't.\n\nIf there is some desire to document the side effect, I think we should\nat least remove the mention of speeding up git-diff (which is just wrong\nnow).\n\n Documentation/git-status.txt |    7 -------\n 1 files changed, 0 insertions(+), 7 deletions(-)\n\ndiff --git a/Documentation/git-status.txt b/Documentation/git-status.txt\nindex a1bb9bd..5c5a480 100644\n--- a/Documentation/git-status.txt\n+++ b/Documentation/git-status.txt\n@@ -28,13 +28,6 @@ If there is no path that is different between the index file and\n the current HEAD commit (i.e., there is nothing to commit by running\n `git-commit`), the command exits with non-zero status.\n \n-If any paths have been touched in the working tree (that is,\n-their modification times have changed) but their contents and\n-permissions are identical to those in the index file, the command\n-updates the index file. Running `git-status` can thus speed up\n-subsequent operations such as `git-diff` if the working tree\n-contains many paths that have been touched but not modified.\n-\n \n OUTPUT\n ------\n-- \n1.5.3.7.2187.gb646\n"},{"id":"62468","messageId":"7vhciss1ww.fsf@gitster.siamese.dyndns.org","threadId":"11207","inReplyTo":"20071209082133.GA2257@coredump.intra.peff.net","subject":"Re: [PATCH] don't mention index refreshing side effect in git-status docs","fromName":"Junio C Hamano","fromEmail":"gitster@pobox.com","sentAt":"2007-12-09T08:33:19Z","receivedAt":"2007-12-09T08:33:19Z","isPatch":true,"sender":{"key":"gitster@pobox.com","avatar":"https://avatars.githubusercontent.com/u/54884?v=4"},"body":"Jeff King <peff@peff.net> writes:\n\n> If there is some desire to document the side effect, I think we should\n> at least remove the mention of speeding up git-diff (which is just wrong\n> now).\n\nWhy is it \"just wrong\"?  Having to squelch the false hits and to run\nauto-refresh are both unnecessary overhead if your index is fresh.\n"},{"id":"62470","messageId":"20071209084217.GA2377@coredump.intra.peff.net","threadId":"11207","inReplyTo":"7vhciss1ww.fsf@gitster.siamese.dyndns.org","subject":"Re: [PATCH] don't mention index refreshing side effect in git-status docs","fromName":"Jeff King","fromEmail":"peff@peff.net","sentAt":"2007-12-09T08:42:17Z","receivedAt":"2007-12-09T08:42:17Z","isPatch":true,"sender":{"key":"peff@peff.net","avatar":"https://avatars.githubusercontent.com/u/45925?v=4"},"body":"On Sun, Dec 09, 2007 at 12:33:19AM -0800, Junio C Hamano wrote:\n\n> Jeff King <peff@peff.net> writes:\n> \n> > If there is some desire to document the side effect, I think we should\n> > at least remove the mention of speeding up git-diff (which is just wrong\n> > now).\n> \n> Why is it \"just wrong\"?  Having to squelch the false hits and to run\n> auto-refresh are both unnecessary overhead if your index is fresh.\n\nI mean that this is not a useful technique for speeding up git-diff\nanymore (assuming you have not tinkered with autorefreshindex, in which\ncase I assume you know what you are doing and don't need this tip).\n\nDid you think I meant \"there is no speedup with autorefreshindex off\",\nor are you arguing that even with the new diff behavior there is still a\nspeedup in \"git status; git diff\" over just \"git status\"?\n\n-Peff\n"},{"id":"62489","messageId":"57518fd10712090816pa43cf97mbc1b8f5fbe81c66f@mail.gmail.com","threadId":"11207","inReplyTo":"20071209082133.GA2257@coredump.intra.peff.net","subject":"Re: [PATCH] don't mention index refreshing side effect in git-status docs","fromName":"Jonathan del Strother","fromEmail":"maillist@steelskies.com","sentAt":"2007-12-09T16:16:13Z","receivedAt":"2007-12-09T16:16:13Z","isPatch":true,"sender":{"key":"jon.delstrother@bestbefore.tv","avatar":"https://gravatar.com/avatar/754e21ab701c00e2d21fc261187254c34b2a1c0b959d9ee5be1a295990be3081?d=mp&s=160"},"body":"On Dec 9, 2007 8:21 AM, Jeff King <peff@peff.net> wrote:\n> The tip about speeding up subsequent operations is now\n> obsolete; since aecbf914, git-diff now squelches empty diffs\n> and performs an automatic refresh.\n>\n> Signed-off-by: Jeff King <peff@peff.net>\n> ---\n> This is on top of my other patches to the git-status docs.\n>\n> I don't see any reason to mention this side effect at all. Those who\n> know enough to set diff.autorefreshindex presumably know what they are\n> doing, and the removed paragraph is a bit confusing to those who don't.\n>\n\n\n...   I wasn't aware the index needed refreshing.  This might be\ntotally unrelated to the present conversation, but the GIT-VERSION-GEN\nscript occasionally gives me spurious 'dirty' results (eg when a file\ntimestamp changes despite the content having changed).  Should it\nperhaps be running \"git update-index --refresh\" before it runs \"git\ndiff-index --name-only HEAD\" ?\n"},{"id":"62503","messageId":"7vhcirpwdk.fsf@gitster.siamese.dyndns.org","threadId":"11207","inReplyTo":"57518fd10712090816pa43cf97mbc1b8f5fbe81c66f@mail.gmail.com","subject":"Re: [PATCH] don't mention index refreshing side effect in git-status docs","fromName":"Junio C Hamano","fromEmail":"gitster@pobox.com","sentAt":"2007-12-09T18:15:51Z","receivedAt":"2007-12-09T18:15:51Z","isPatch":true,"sender":{"key":"gitster@pobox.com","avatar":"https://avatars.githubusercontent.com/u/54884?v=4"},"body":"\"Jonathan del Strother\" <maillist@steelskies.com> writes:\n\n> ... the GIT-VERSION-GEN\n> script occasionally gives me spurious 'dirty' results (eg when a file\n> timestamp changes despite the content having changed).\n\nGood eyes.  Either refreshing before diff-index or using the \"git diff\"\nPorcelain would be more appropriate.\n"}]}