{"thread":{"id":"19951","subject":"[PATCH] git status -q (similar to subversion)","startedAt":"2009-06-27T20:57:13Z","lastAt":"2009-07-01T08:37:37Z","messageCount":11,"participants":["Unknown","Jeff King","Martin Renold","David Aguilar","Paolo Bonzini"],"isPatch":true,"patchVersion":1,"patchTotal":null},"messages":[{"id":"117105","messageId":"Pine.LNX.4.64.0906272248570.11453@cube","threadId":"19951","inReplyTo":null,"subject":"[PATCH] git status -q (similar to subversion)","fromName":"Unknown","fromEmail":"borg@uu3.net","sentAt":"2009-06-27T20:57:13Z","receivedAt":"2009-06-27T20:57:13Z","isPatch":true,"sender":{"key":"borg@uu3.net","avatar":null},"body":"Here is a tiny patch adding -q option to git status.\nIt means -uno (Show no untracked files).\n\nNot sure where to add that in documentation.\nMaybe in git-commit man just below -u:\n-q (for git-status only, equals to -uno).\nOr something like this?\n\nRegards,\nBorg\n\ndiff --git a/builtin-commit.c b/builtin-commit.c\nindex 41e222d..e4e0074 100644\n--- a/builtin-commit.c\n+++ b/builtin-commit.c\n@@ -826,6 +826,8 @@ int cmd_status(int argc, const char **argv, const char *prefix)\n \t\tdiff_use_color_default = git_use_color_default;\n \n \targc = parse_and_validate_options(argc, argv, builtin_status_usage, prefix);\n+\tif(quiet)\n+\t\tshow_untracked_files = SHOW_NO_UNTRACKED_FILES;\n \n \tindex_file = prepare_index(argc, argv, prefix);\n \n"},{"id":"117138","messageId":"20090628185218.GB8634@sigio.peff.net","threadId":"19951","inReplyTo":"Pine.LNX.4.64.0906272248570.11453@cube","subject":"Re: [PATCH] git status -q (similar to subversion)","fromName":"Jeff King","fromEmail":"peff@peff.net","sentAt":"2009-06-28T18:52:18Z","receivedAt":"2009-06-28T18:52:18Z","isPatch":true,"sender":{"key":"peff@peff.net","avatar":"https://avatars.githubusercontent.com/u/45925?v=4"},"body":"On Sat, Jun 27, 2009 at 10:57:13PM +0200, Unknown wrote:\n\n> Here is a tiny patch adding -q option to git status.\n> It means -uno (Show no untracked files).\n> \n> Not sure where to add that in documentation.\n> Maybe in git-commit man just below -u:\n> -q (for git-status only, equals to -uno).\n> Or something like this?\n\nI'm not sure if this is a good idea. As you mention, there is already\n\"-uno\" to accomplish the same thing. So we are making the interface\nredundant.\n\nIt seems from the subject like you are trying to emulate a similar\noption in \"svn status\". But my understanding (and I was never a big\nsubversion user, so I am going off of things said on the git list) is\nthat there are quite a few differences between \"svn status\" and \"git\nstatus\".  Enough that we do not want users to really equate them (a\nsubject which has come up over and over on the list).\n\nIn other words, it seems like we are at best simply adding a redundant\noption, and at worst, confusing people even more about the equivalence\nbetween the \"status\" commands of the two systems.\n\n-Peff\n"},{"id":"117144","messageId":"20090628210117.GA7821@old.homeip.net","threadId":"19951","inReplyTo":"20090628185218.GB8634@sigio.peff.net","subject":"Re: [PATCH] git status -q (similar to subversion)","fromName":"Martin Renold","fromEmail":"martinxyz@gmx.ch","sentAt":"2009-06-28T21:01:17Z","receivedAt":"2009-06-28T21:01:17Z","isPatch":true,"sender":{"key":"martinxyz@gmx.ch","avatar":"https://gravatar.com/avatar/d7e48822e95974d46609fcbea9399ebe278d4be27496000352633767a19ac3c1?d=mp&s=160"},"body":"On Sun, Jun 28, 2009 at 02:52:18PM -0400, Jeff King wrote:\n> On Sat, Jun 27, 2009 at 10:57:13PM +0200, Unknown wrote:\n> > Here is a tiny patch adding -q option to git status.\n> > It means -uno (Show no untracked files).\n> \n> It seems from the subject like you are trying to emulate a similar\n> option in \"svn status\".\n\nAs a former svn user I also miss -q.  I like to keep untracked non-ignored\nfiles lying around as a short-term TODO list.\n\nI think the point is not SVN compatibility.  The point is that SVN just got\nthe commandline interface right here ;-) because -q easier to discover and\nremember (many programs have --quiet/-q).  And when you use it you will use\nit several times in a row.  For this -uno is already too much to bother\ntyping (assuming you have an alias 'git st').\n\nbye,\nMartin\n"},{"id":"117146","messageId":"20090628224447.GB1951@gmail.com","threadId":"19951","inReplyTo":"Pine.LNX.4.64.0906272248570.11453@cube","subject":"Re: [PATCH] git status -q (similar to subversion)","fromName":"David Aguilar","fromEmail":"davvid@gmail.com","sentAt":"2009-06-28T22:44:48Z","receivedAt":"2009-06-28T22:44:48Z","isPatch":true,"sender":{"key":"davvid@gmail.com","avatar":"https://avatars.githubusercontent.com/u/13196?v=4"},"body":"On Sat, Jun 27, 2009 at 10:57:13PM +0200, Unknown wrote:\n> Here is a tiny patch adding -q option to git status.\n> It means -uno (Show no untracked files).\n>\n> Not sure where to add that in documentation.\n> Maybe in git-commit man just below -u:\n> -q (for git-status only, equals to -uno).\n> Or something like this?\n>\n> Regards,\n> Borg\n\n\nHello\n\nPlease take a look at Documentation/SubmittingPatches\n(all of the documentation lives in Documentation/).\n\nIt doesn't seem like this patch was generated with\ngit format-patch.  You'll also want to submit your patch using\ngit send-email, as we require inline patches instead of\nattachments.\n\nYou'll need to include a signed-off-by line (which you can do\nby using `git commit -s`) and it seems like you need to\nintroduce yourself to git:\n\nhttp://book.git-scm.com/2_setup_and_initialization.html\n\nSorry, we cannot accept patches from \"Unknown\" for a number\nof reasons.\n\n\nThanks for your help and we look forward to hearing your\nresponse to the rest of the feedback received in this thread.\n\n\n> diff --git a/builtin-commit.c b/builtin-commit.c\n> index 41e222d..e4e0074 100644\n> --- a/builtin-commit.c\n> +++ b/builtin-commit.c\n> @@ -826,6 +826,8 @@ int cmd_status(int argc, const char **argv, const char *prefix)\n>  \t\tdiff_use_color_default = git_use_color_default;\n>  \n>  \targc = parse_and_validate_options(argc, argv, builtin_status_usage, prefix);\n> +\tif(quiet)\n> +\t\tshow_untracked_files = SHOW_NO_UNTRACKED_FILES;\n>  \n>  \tindex_file = prepare_index(argc, argv, prefix);\n>  \n\n\n-- \n\n\tDavid\n"},{"id":"117175","messageId":"Pine.LNX.4.64.0906292131330.27727@cube","threadId":"19951","inReplyTo":"20090628224447.GB1951@gmail.com","subject":"Re: [PATCH] git status -q (similar to subversion)","fromName":"Unknown","fromEmail":"borg@uu3.net","sentAt":"2009-06-29T19:39:18Z","receivedAt":"2009-06-29T19:39:18Z","isPatch":true,"sender":{"key":"borg@uu3.net","avatar":null},"body":"On Sun, 28 Jun 2009, David Aguilar wrote:\n\n> Hello\nHi and thanks for reply.\n\n> Please take a look at Documentation/SubmittingPatches\n> (all of the documentation lives in Documentation/).\n>\n> It doesn't seem like this patch was generated with\n> git format-patch.  You'll also want to submit your patch using\n> git send-email, as we require inline patches instead of\n> attachments.\nRight. I though such a small patch can be provided as is.\nAnyway, I will take necessary steps to peform better next time.\n\nThe question is, would that patch will be applied anyway?\nI already received some criticism about not applying it.\nI can only answer that where svn status and git status differ in many \ncases, there are also similar in some.\n\nFor now, I would rather want to see a discus about it (Pro vs Cons).\n\nOther solution I see is add extra config variable like:\nstatus.showUntrackedDefault = (no|normal|all)\nSo when you peform 'git status -u' it will be used.\n\nLooks better to me if we really want to have difference between\ngit status vs svn status.\n\nRegards,\nBorg\n"},{"id":"117206","messageId":"20090630053304.GB29643@sigio.peff.net","threadId":"19951","inReplyTo":"20090628210117.GA7821@old.homeip.net","subject":"Re: [PATCH] git status -q (similar to subversion)","fromName":"Jeff King","fromEmail":"peff@peff.net","sentAt":"2009-06-30T05:33:05Z","receivedAt":"2009-06-30T05:33:05Z","isPatch":true,"sender":{"key":"peff@peff.net","avatar":"https://avatars.githubusercontent.com/u/45925?v=4"},"body":"On Sun, Jun 28, 2009 at 11:01:17PM +0200, Martin Renold wrote:\n\n> As a former svn user I also miss -q.  I like to keep untracked non-ignored\n> files lying around as a short-term TODO list.\n> \n> I think the point is not SVN compatibility.  The point is that SVN just got\n> the commandline interface right here ;-) because -q easier to discover and\n> remember (many programs have --quiet/-q).  And when you use it you will use\n> it several times in a row.  For this -uno is already too much to bother\n> typing (assuming you have an alias 'git st').\n\nIf it is convenience you want, perhaps you would be even happier with:\n\n  git config status.showUntrackedFiles no\n\nAs far as \"SVN got it right\": that may well be the case, but we have to\ndeal with the fact that \"git status\" is really a dry-run version of \"git\ncommit\", which already has a \"-q\" option, which does something totally\ndifferent. So I am a little hesitant to endorse its use in \"git status\"\nfor something unrelated (and I am hesitant to have redundant command\nline options, as well).\n\n-Peff\n"},{"id":"117208","messageId":"20090630053325.GC29643@sigio.peff.net","threadId":"19951","inReplyTo":"Pine.LNX.4.64.0906292131330.27727@cube","subject":"Re: [PATCH] git status -q (similar to subversion)","fromName":"Jeff King","fromEmail":"peff@peff.net","sentAt":"2009-06-30T05:33:25Z","receivedAt":"2009-06-30T05:33:25Z","isPatch":true,"sender":{"key":"peff@peff.net","avatar":"https://avatars.githubusercontent.com/u/45925?v=4"},"body":"On Mon, Jun 29, 2009 at 09:39:18PM +0200, Unknown wrote:\n\n> Other solution I see is add extra config variable like:\n> status.showUntrackedDefault = (no|normal|all)\n> So when you peform 'git status -u' it will be used.\n\nIt exists, but is called showUntrackedFiles. See \"git help config\" for\ndetails.\n\n-Peff\n"},{"id":"117239","messageId":"20090630151442.GA20688@old.homeip.net","threadId":"19951","inReplyTo":"20090630053304.GB29643@sigio.peff.net","subject":"Re: [PATCH] git status -q (similar to subversion)","fromName":"Martin Renold","fromEmail":"martinxyz@gmx.ch","sentAt":"2009-06-30T15:14:42Z","receivedAt":"2009-06-30T15:14:42Z","isPatch":true,"sender":{"key":"martinxyz@gmx.ch","avatar":"https://gravatar.com/avatar/d7e48822e95974d46609fcbea9399ebe278d4be27496000352633767a19ac3c1?d=mp&s=160"},"body":"On Tue, Jun 30, 2009 at 01:33:05AM -0400, Jeff King wrote:\n> If it is convenience you want, perhaps you would be even happier with:\n>   git config status.showUntrackedFiles no\n\nNo, that doesn't help in my usecase. I want to be reminded about the\nuntracked files by default because I intend to clean them up later.\n\n> [...] but we have to deal with the fact that \"git status\" is really a\n> dry-run version of \"git commit\", which already has a \"-q\" option\n\nGood point. However I think those commands are similar only from an\nimplementation point of view.  As an user I think of them as being quite\ndifferent.  I would not be surprised about different meaning of options -\ncertainly less than about \"git commit -a\" vs \"git add -u\".\n\n> So I am a little hesitant to endorse its use in \"git status\" for something\n> unrelated (and I am hesitant to have redundant command line options, as\n> well).\n\nYes I understand that. I'm using a wrapper script for now, but if it was any\nother one-letter shortcut, I would prefer to learn that instead.\n\nbye,\nMartin\n"},{"id":"117240","messageId":"20090630153347.GA3547@sigio.peff.net","threadId":"19951","inReplyTo":"20090630151442.GA20688@old.homeip.net","subject":"Re: [PATCH] git status -q (similar to subversion)","fromName":"Jeff King","fromEmail":"peff@peff.net","sentAt":"2009-06-30T15:33:48Z","receivedAt":"2009-06-30T15:33:48Z","isPatch":true,"sender":{"key":"peff@peff.net","avatar":"https://avatars.githubusercontent.com/u/45925?v=4"},"body":"On Tue, Jun 30, 2009 at 05:14:42PM +0200, Martin Renold wrote:\n\n> > [...] but we have to deal with the fact that \"git status\" is really a\n> > dry-run version of \"git commit\", which already has a \"-q\" option\n> \n> Good point. However I think those commands are similar only from an\n> implementation point of view.  As an user I think of them as being quite\n> different.  I would not be surprised about different meaning of options -\n> certainly less than about \"git commit -a\" vs \"git add -u\".\n\nThe main difference that trips people, I think, is that they expect \"git\nstatus <file>\" to restrict status to a subset of the tree. But it is\nabout \"what would happen if I did 'git commit <file>'\", which is quite\ndifferent.\n\nThere has been much discussion about an alternate command that would be\nmore like \"svn status\", and even some partial implementations. But it\nneeds somebody who really cares about the feature to step up and\ncomplete it.\n\n-Peff\n"},{"id":"117243","messageId":"Pine.LNX.4.64.0906301854320.17614@cube","threadId":"19951","inReplyTo":"20090630053325.GC29643@sigio.peff.net","subject":"Re: [PATCH] git status -q (similar to subversion)","fromName":"Unknown","fromEmail":"borg@uu3.net","sentAt":"2009-06-30T16:56:54Z","receivedAt":"2009-06-30T16:56:54Z","isPatch":true,"sender":{"key":"borg@uu3.net","avatar":null},"body":"On Tue, 30 Jun 2009, Jeff King wrote:\n> It exists, but is called showUntrackedFiles. See \"git help config\" for\n> details.\nIts not what I meant. showUntrackedFiles is used when you do not specify \n'-u' option. showUnrackedDefault (not so good name, someone have better \nidea?) would be used if you specify '-u' option without argument.\nCurrently argument 'all' is used.\n\n-- \nBorg\n"},{"id":"117296","messageId":"4A4B2051.7020606@gnu.org","threadId":"19951","inReplyTo":"20090630153347.GA3547@sigio.peff.net","subject":"Re: [PATCH] git status -q (similar to subversion)","fromName":"Paolo Bonzini","fromEmail":"bonzini@gnu.org","sentAt":"2009-07-01T08:37:37Z","receivedAt":"2009-07-01T08:37:37Z","isPatch":true,"sender":{"key":"bonzini@gnu.org","avatar":"https://avatars.githubusercontent.com/u/42082?v=4"},"body":"\n> There has been much discussion about an alternate command that would be\n> more like \"svn status\", and even some partial implementations. But it\n> needs somebody who really cares about the feature to step up and\n> complete it.\n\nAn alias\n\n         changes=diff --name-status -r\n\nalready does almost the same function as \"svn status -q\".  If you wanted \nfull svn status with untracked files you could use this:\n\n\tchanges = \"!sh -c 'git status | sed -n \n\\\"/Untracked/N;//N;1,//d;s/^#/?/p\\\"; git diff --name-status -r \\\"$@\\\"' -\"\n\nPaolo\n"}]}