{"thread":{"id":"16073","subject":"[PATCH] Implement git-staged, an alias for 'git diff --cached'.","startedAt":"2008-10-28T23:39:05Z","lastAt":"2008-10-29T20:24:51Z","messageCount":25,"participants":["David Symonds","Jeff King","Johannes Schindelin","Stephan Beyer","Wincent Colaiuta","Brandon Casey","Pascal Obry","Teemu Likonen","Felipe Contreras","David Kågedal"],"isPatch":true,"patchVersion":1,"patchTotal":null},"messages":[{"id":"94148","messageId":"1225237145-95435-1-git-send-email-dsymonds@gmail.com","threadId":"16073","inReplyTo":null,"subject":"[PATCH] Implement git-staged, an alias for 'git diff --cached'.","fromName":"David Symonds","fromEmail":"dsymonds@gmail.com","sentAt":"2008-10-28T23:39:05Z","receivedAt":"2008-10-28T23:39:05Z","isPatch":true,"sender":{"key":"dsymonds@gmail.com","avatar":"https://gravatar.com/avatar/b22f5051cbfc11836e36cf7a690e6cde4e225d835e13295ff98d15c7a9ee3c0f?d=mp&s=160"},"body":"Signed-off-by: David Symonds <dsymonds@gmail.com>\n---\n  This isn't a particularly serious patch, but is very relevant to our\n  current discussion at GitTogether '08.\n\n .gitignore    |    1 +\n Makefile      |    1 +\n git-staged.sh |    8 ++++++++\n 3 files changed, 10 insertions(+), 0 deletions(-)\n create mode 100755 git-staged.sh\n\ndiff --git a/.gitignore b/.gitignore\nindex bbaf9de..9353d19 100644\n--- a/.gitignore\n+++ b/.gitignore\n@@ -118,6 +118,7 @@ git-show\n git-show-branch\n git-show-index\n git-show-ref\n+git-staged\n git-stash\n git-status\n git-stripspace\ndiff --git a/Makefile b/Makefile\nindex d6f3695..1b23e53 100644\n--- a/Makefile\n+++ b/Makefile\n@@ -262,6 +262,7 @@ SCRIPT_SH += git-rebase.sh\n SCRIPT_SH += git-repack.sh\n SCRIPT_SH += git-request-pull.sh\n SCRIPT_SH += git-sh-setup.sh\n+SCRIPT_SH += git-staged.sh\n SCRIPT_SH += git-stash.sh\n SCRIPT_SH += git-submodule.sh\n SCRIPT_SH += git-web--browse.sh\ndiff --git a/git-staged.sh b/git-staged.sh\nnew file mode 100755\nindex 0000000..bfd36e7\n--- /dev/null\n+++ b/git-staged.sh\n@@ -0,0 +1,8 @@\n+#!/bin/sh\n+\n+USAGE=''\n+SUBDIRECTORY_OK='Yes'\n+OPTIONS_SPEC=\n+. git-sh-setup\n+\n+git diff --cached\n-- \n1.6.0\n"},{"id":"94150","messageId":"20081028234648.GA4643@sigill.intra.peff.net","threadId":"16073","inReplyTo":"1225237145-95435-1-git-send-email-dsymonds@gmail.com","subject":"Re: [PATCH] Implement git-staged, an alias for 'git diff --cached'.","fromName":"Jeff King","fromEmail":"peff@peff.net","sentAt":"2008-10-28T23:46:48Z","receivedAt":"2008-10-28T23:46:48Z","isPatch":true,"sender":{"key":"peff@peff.net","avatar":"https://avatars.githubusercontent.com/u/45925?v=4"},"body":"On Tue, Oct 28, 2008 at 04:39:05PM -0700, David Symonds wrote:\n\n> --- /dev/null\n> +++ b/git-staged.sh\n> @@ -0,0 +1,8 @@\n> +#!/bin/sh\n> +\n> +USAGE=''\n> +SUBDIRECTORY_OK='Yes'\n> +OPTIONS_SPEC=\n> +. git-sh-setup\n> +\n> +git diff --cached\n\nDo you even need to do sh-setup? How about\n\n  #!/bin/sh\n  exec git diff --cached \"$@\"\n\n-Peff\n"},{"id":"94151","messageId":"1225238368-98594-1-git-send-email-dsymonds@gmail.com","threadId":"16073","inReplyTo":"1225237145-95435-1-git-send-email-dsymonds@gmail.com","subject":"[PATCH] Implement git-staged, an alias for 'git diff --cached'.","fromName":"David Symonds","fromEmail":"dsymonds@gmail.com","sentAt":"2008-10-28T23:59:28Z","receivedAt":"2008-10-28T23:59:28Z","isPatch":true,"sender":{"key":"dsymonds@gmail.com","avatar":"https://gravatar.com/avatar/b22f5051cbfc11836e36cf7a690e6cde4e225d835e13295ff98d15c7a9ee3c0f?d=mp&s=160"},"body":"Signed-off-by: David Symonds <dsymonds@gmail.com>\n---\n .gitignore    |    1 +\n Makefile      |    1 +\n git-staged.sh |    2 ++\n 3 files changed, 4 insertions(+), 0 deletions(-)\n create mode 100755 git-staged.sh\n\ndiff --git a/.gitignore b/.gitignore\nindex bbaf9de..9353d19 100644\n--- a/.gitignore\n+++ b/.gitignore\n@@ -118,6 +118,7 @@ git-show\n git-show-branch\n git-show-index\n git-show-ref\n+git-staged\n git-stash\n git-status\n git-stripspace\ndiff --git a/Makefile b/Makefile\nindex d6f3695..1b23e53 100644\n--- a/Makefile\n+++ b/Makefile\n@@ -262,6 +262,7 @@ SCRIPT_SH += git-rebase.sh\n SCRIPT_SH += git-repack.sh\n SCRIPT_SH += git-request-pull.sh\n SCRIPT_SH += git-sh-setup.sh\n+SCRIPT_SH += git-staged.sh\n SCRIPT_SH += git-stash.sh\n SCRIPT_SH += git-submodule.sh\n SCRIPT_SH += git-web--browse.sh\ndiff --git a/git-staged.sh b/git-staged.sh\nnew file mode 100755\nindex 0000000..85582ec\n--- /dev/null\n+++ b/git-staged.sh\n@@ -0,0 +1,2 @@\n+#!/bin/sh\n+exec git diff --cached $*\n-- \n1.6.0\n"},{"id":"94154","messageId":"20081029003931.GA7291@sigill.intra.peff.net","threadId":"16073","inReplyTo":"1225238368-98594-1-git-send-email-dsymonds@gmail.com","subject":"Re: [PATCH] Implement git-staged, an alias for 'git diff --cached'.","fromName":"Jeff King","fromEmail":"peff@peff.net","sentAt":"2008-10-29T00:39:32Z","receivedAt":"2008-10-29T00:39:32Z","isPatch":true,"sender":{"key":"peff@peff.net","avatar":"https://avatars.githubusercontent.com/u/45925?v=4"},"body":"On Tue, Oct 28, 2008 at 04:59:28PM -0700, David Symonds wrote:\n\n> --- /dev/null\n> +++ b/git-staged.sh\n> @@ -0,0 +1,2 @@\n> +#!/bin/sh\n> +exec git diff --cached $*\n\nThis is broken for arguments with spaces. Use \"$@\" instead.\n\nBut I think this isn't a serious patch anyway, so we are probably\nwasting too much time on it. ;P\n\n-Peff\n"},{"id":"94155","messageId":"1225241048-99267-1-git-send-email-dsymonds@gmail.com","threadId":"16073","inReplyTo":"20081029003931.GA7291@sigill.intra.peff.net","subject":"[PATCH] Implement git-staged, an alias for 'git diff --cached'.","fromName":"David Symonds","fromEmail":"dsymonds@gmail.com","sentAt":"2008-10-29T00:44:08Z","receivedAt":"2008-10-29T00:44:08Z","isPatch":true,"sender":{"key":"dsymonds@gmail.com","avatar":"https://gravatar.com/avatar/b22f5051cbfc11836e36cf7a690e6cde4e225d835e13295ff98d15c7a9ee3c0f?d=mp&s=160"},"body":"Signed-off-by: David Symonds <dsymonds@gmail.com>\n---\n .gitignore    |    1 +\n Makefile      |    1 +\n git-staged.sh |    2 ++\n 3 files changed, 4 insertions(+), 0 deletions(-)\n create mode 100755 git-staged.sh\n\ndiff --git a/.gitignore b/.gitignore\nindex bbaf9de..9353d19 100644\n--- a/.gitignore\n+++ b/.gitignore\n@@ -118,6 +118,7 @@ git-show\n git-show-branch\n git-show-index\n git-show-ref\n+git-staged\n git-stash\n git-status\n git-stripspace\ndiff --git a/Makefile b/Makefile\nindex d6f3695..1b23e53 100644\n--- a/Makefile\n+++ b/Makefile\n@@ -262,6 +262,7 @@ SCRIPT_SH += git-rebase.sh\n SCRIPT_SH += git-repack.sh\n SCRIPT_SH += git-request-pull.sh\n SCRIPT_SH += git-sh-setup.sh\n+SCRIPT_SH += git-staged.sh\n SCRIPT_SH += git-stash.sh\n SCRIPT_SH += git-submodule.sh\n SCRIPT_SH += git-web--browse.sh\ndiff --git a/git-staged.sh b/git-staged.sh\nnew file mode 100755\nindex 0000000..66a5e33\n--- /dev/null\n+++ b/git-staged.sh\n@@ -0,0 +1,2 @@\n+#!/bin/sh\n+exec git diff --cached \"$@\"\n-- \n1.6.0\n"},{"id":"94157","messageId":"20081029005814.GA8686@sigill.intra.peff.net","threadId":"16073","inReplyTo":"alpine.DEB.1.00.0810290201400.22125@pacific.mpi-cbg.de.mpi-cbg.de","subject":"Re: [PATCH] Implement git-staged, an alias for 'git diff --cached'.","fromName":"Jeff King","fromEmail":"peff@peff.net","sentAt":"2008-10-29T00:58:14Z","receivedAt":"2008-10-29T00:58:14Z","isPatch":true,"sender":{"key":"peff@peff.net","avatar":"https://avatars.githubusercontent.com/u/45925?v=4"},"body":"On Wed, Oct 29, 2008 at 02:02:29AM +0100, Johannes Schindelin wrote:\n\n> > +git-staged\n> \n> Would it not be better to teach \"git show --staged\" to do that, and to add \n> a command pair \"git stage <file>\" and \"git unstage <file>\" to do the \n> obvious?\n\nYes, I think half of the discussion went on IRC. But I don't think \"git\nstaged\" is a good idea. I think a \"--staged\" alias for \"--cached\" in\n\"git diff\" makes a lot more sense.\n\n-Peff\n"},{"id":"94158","messageId":"20081029010107.GB12065@leksak.fem-net","threadId":"16073","inReplyTo":"20081029003931.GA7291@sigill.intra.peff.net","subject":"Re: [PATCH] Implement git-staged, an alias for 'git diff --cached'.","fromName":"Stephan Beyer","fromEmail":"s-beyer@gmx.net","sentAt":"2008-10-29T01:01:07Z","receivedAt":"2008-10-29T01:01:07Z","isPatch":true,"sender":{"key":"s-beyer@gmx.net","avatar":"https://avatars.githubusercontent.com/u/143889?v=4"},"body":"Hi,\n\n> > --- /dev/null\n> > +++ b/git-staged.sh\n> > @@ -0,0 +1,2 @@\n> > +#!/bin/sh\n> > +exec git diff --cached $*\n> \n> This is broken for arguments with spaces. Use \"$@\" instead.\n> \n> But I think this isn't a serious patch anyway, so we are probably\n> wasting too much time on it. ;P\n\nI'm still not understanding, what it's for.\nUsability? Because doing\n\tgit config --global alias.staged 'diff --cached'\nis lame?\n\nRegards,\n  Stephan\n\nPS: Btw, if ever meant serious, it's missing an insertion into\n    command-list.txt and serious documentation.\n    But I think you know that. :-)\n\n-- \nStephan Beyer <s-beyer@gmx.net>, PGP 0x6EDDD207FCC5040F\n"},{"id":"94156","messageId":"alpine.DEB.1.00.0810290201400.22125@pacific.mpi-cbg.de.mpi-cbg.de","threadId":"16073","inReplyTo":"1225241048-99267-1-git-send-email-dsymonds@gmail.com","subject":"Re: [PATCH] Implement git-staged, an alias for 'git diff --cached'.","fromName":"Johannes Schindelin","fromEmail":"johannes.schindelin@gmx.de","sentAt":"2008-10-29T01:02:29Z","receivedAt":"2008-10-29T01:02:29Z","isPatch":true,"sender":{"key":"johannes.schindelin@gmx.de","avatar":"https://avatars.githubusercontent.com/u/127790?v=4"},"body":"Hi,\n\nOn Tue, 28 Oct 2008, David Symonds wrote:\n\n> diff --git a/.gitignore b/.gitignore\n> index bbaf9de..9353d19 100644\n> --- a/.gitignore\n> +++ b/.gitignore\n> @@ -118,6 +118,7 @@ git-show\n>  git-show-branch\n>  git-show-index\n>  git-show-ref\n> +git-staged\n\nWould it not be better to teach \"git show --staged\" to do that, and to add \na command pair \"git stage <file>\" and \"git unstage <file>\" to do the \nobvious?\n\nCiao,\nDscho\n"},{"id":"94161","messageId":"20081029010534.GA8833@sigill.intra.peff.net","threadId":"16073","inReplyTo":"20081029010107.GB12065@leksak.fem-net","subject":"Re: [PATCH] Implement git-staged, an alias for 'git diff --cached'.","fromName":"Jeff King","fromEmail":"peff@peff.net","sentAt":"2008-10-29T01:05:34Z","receivedAt":"2008-10-29T01:05:34Z","isPatch":true,"sender":{"key":"peff@peff.net","avatar":"https://avatars.githubusercontent.com/u/45925?v=4"},"body":"On Wed, Oct 29, 2008 at 02:01:07AM +0100, Stephan Beyer wrote:\n\n> I'm still not understanding, what it's for.\n> Usability? Because doing\n> \tgit config --global alias.staged 'diff --cached'\n> is lame?\n\nYou are missing some of the context, which is that we just had a big\nin-person debate about how the staged nomenclature is confusing. We call\nthings \"cached\", \"staged\", and \"index\", depending on the command.\n\nSo this is an attempt to rectify that.\n\n-Peff\n"},{"id":"94177","messageId":"C0BD1E4B-130F-4A16-8865-8EEABE1431FD@wincent.com","threadId":"16073","inReplyTo":"1225241048-99267-1-git-send-email-dsymonds@gmail.com","subject":"Re: [PATCH] Implement git-staged, an alias for 'git diff --cached'.","fromName":"Wincent Colaiuta","fromEmail":"win@wincent.com","sentAt":"2008-10-29T10:59:35Z","receivedAt":"2008-10-29T10:59:35Z","isPatch":true,"sender":{"key":"greg@hurrell.net","avatar":"https://avatars.githubusercontent.com/u/7074?v=4"},"body":"El 29/10/2008, a las 1:44, David Symonds escribió:\n\n> +SCRIPT_SH += git-staged.sh\n\nIsn't this exactly what aliases are for?\n   git config --global alias.staged \"diff --cached\"\n(Rather than adding yet another command...)\n\nWincent\n"},{"id":"94182","messageId":"HUCQtsE3HvgGu_KDktGNx0KyijzaFKOESHnzFagEbf4erQlMxjgVNQ@cipher.nrlssc.navy.mil","threadId":"16073","inReplyTo":"20081029010534.GA8833@sigill.intra.peff.net","subject":"Re: [PATCH] Implement git-staged, an alias for 'git diff --cached'.","fromName":"Brandon Casey","fromEmail":"casey@nrlssc.navy.mil","sentAt":"2008-10-29T14:33:08Z","receivedAt":"2008-10-29T14:33:08Z","isPatch":true,"sender":{"key":"drafnel@gmail.com","avatar":"https://avatars.githubusercontent.com/u/921167?v=4"},"body":"Jeff King wrote:\n> On Wed, Oct 29, 2008 at 02:01:07AM +0100, Stephan Beyer wrote:\n> \n>> I'm still not understanding, what it's for.\n>> Usability? Because doing\n>> \tgit config --global alias.staged 'diff --cached'\n>> is lame?\n> \n> You are missing some of the context,\n\nYeah, it would have been nice if there was audio.\nAnyone take minutes, possibly?\n\nbtw the term \"staged\" makes perfect sense to me, whereas \"cached\"\nwas not intuitively obvious to me.\n\n-brandon\n"},{"id":"94183","messageId":"49087A21.1080508@obry.net","threadId":"16073","inReplyTo":"1225237145-95435-1-git-send-email-dsymonds@gmail.com","subject":"Re: [PATCH] Implement git-staged, an alias for 'git diff --cached'.","fromName":"Pascal Obry","fromEmail":"pascal@obry.net","sentAt":"2008-10-29T14:58:41Z","receivedAt":"2008-10-29T14:58:41Z","isPatch":true,"sender":{"key":"pascal@obry.net","avatar":"https://avatars.githubusercontent.com/u/467069?v=4"},"body":"What about :\n\n   $ git config --global alias.staged \"diff --cached\"\n\nI'm using this since some time.\n\n-- \n\n--|------------------------------------------------------\n--| Pascal Obry                           Team-Ada Member\n--| 45, rue Gabriel Peri - 78114 Magny Les Hameaux FRANCE\n--|------------------------------------------------------\n--|              http://www.obry.net\n--| \"The best way to travel is by means of imagination\"\n--|\n--| gpg --keyserver wwwkeys.pgp.net --recv-key C1082595\n"},{"id":"94184","messageId":"alpine.DEB.1.00.0810291604200.22125@pacific.mpi-cbg.de.mpi-cbg.de","threadId":"16073","inReplyTo":"C0BD1E4B-130F-4A16-8865-8EEABE1431FD@wincent.com","subject":"Re: [PATCH] Implement git-staged, an alias for 'git diff --cached'.","fromName":"Johannes Schindelin","fromEmail":"johannes.schindelin@gmx.de","sentAt":"2008-10-29T15:08:58Z","receivedAt":"2008-10-29T15:08:58Z","isPatch":true,"sender":{"key":"johannes.schindelin@gmx.de","avatar":"https://avatars.githubusercontent.com/u/127790?v=4"},"body":"Hi,\n\nOn Wed, 29 Oct 2008, Wincent Colaiuta wrote:\n\n> El 29/10/2008, a las 1:44, David Symonds escribió:\n> \n> > +SCRIPT_SH += git-staged.sh\n> \n> Isn't this exactly what aliases are for?\n>   git config --global alias.staged \"diff --cached\"\n> (Rather than adding yet another command...)\n\nThe difference being, of course, that we do not ship default aliases (and \nneither do we plan to...).\n\nSo saying \"this is what aliases are for\" you ask for _newbies_ to add it \nfor themselves.  We are talking the same newbies who should be helped by \nthat command, and typically do not know that there are Git aliases yet.\n\nEven worse, just sum the times it takes everybody to make that alias, and \nthen compare with the time it would take to include something like David \nposted in git.git.  It should be obvious that the time balance is \nabsolutely horrible.\n\nCiao,\nDscho\n"},{"id":"94186","messageId":"20081029151956.GA28598@segfault.peff.net","threadId":"16073","inReplyTo":"HUCQtsE3HvgGu_KDktGNx0KyijzaFKOESHnzFagEbf4erQlMxjgVNQ@cipher.nrlssc.navy.mil","subject":"Re: [PATCH] Implement git-staged, an alias for 'git diff --cached'.","fromName":"Jeff King","fromEmail":"peff@peff.net","sentAt":"2008-10-29T15:19:57Z","receivedAt":"2008-10-29T15:19:57Z","isPatch":true,"sender":{"key":"peff@peff.net","avatar":"https://avatars.githubusercontent.com/u/45925?v=4"},"body":"On Wed, Oct 29, 2008 at 09:33:08AM -0500, Brandon Casey wrote:\n\n> > You are missing some of the context,\n> \n> Yeah, it would have been nice if there was audio.\n> Anyone take minutes, possibly?\n\nThere's no audio. Some of the slides will be available. I took notes on\nat least one of the discussions, which I will try to summarize and post.\nAnd I think some of the discussion will end up as patches, which will\nhopefully provide full justification in their commit messages. ;)\n\n-Peff\n"},{"id":"94188","messageId":"20081029152202.GA10029@leksak.fem-net","threadId":"16073","inReplyTo":"alpine.DEB.1.00.0810291604200.22125@pacific.mpi-cbg.de.mpi-cbg.de","subject":"Re: [PATCH] Implement git-staged, an alias for 'git diff --cached'.","fromName":"Stephan Beyer","fromEmail":"s-beyer@gmx.net","sentAt":"2008-10-29T15:22:02Z","receivedAt":"2008-10-29T15:22:02Z","isPatch":true,"sender":{"key":"s-beyer@gmx.net","avatar":"https://avatars.githubusercontent.com/u/143889?v=4"},"body":"Hi,\n\nJohannes Schindelin wrote:\n> So saying \"this is what aliases are for\" you ask for _newbies_ to add it \n> for themselves.  We are talking the same newbies who should be helped by \n> that command, and typically do not know that there are Git aliases yet.\n\nI'm not sure if yet more commands really help newbies.\n\nI *see* the problem that talking about the index, the cache and the staging\narea can be difficult to newbies.  But then I'd rather vote for \"git diff\n--staged\" (instead of --cached) or \"git show --staged\" (both make sense\nin some way).\nPerhaps it is even sufficient to add a help text to \"git status\", like\nthis:\n\n # Changes to be committed:\n #   (use \"git reset HEAD <file>...\" to unstage)\n+#   (use \"git diff --cached\" to see a diff of staged files)\n\nFor me, a \"git staged\" feels wrong without a \"git stage\" (alias for\n\"git add\") and \"git unstage <file>\" (alias for \"git reset <file>\").\nAnd I think the list of examples can easily be continued.\n\nRegards,\n  Stephan\n\n-- \nStephan Beyer <s-beyer@gmx.net>, PGP 0x6EDDD207FCC5040F\n"},{"id":"94190","messageId":"alpine.DEB.1.00.0810291647280.22125@pacific.mpi-cbg.de.mpi-cbg.de","threadId":"16073","inReplyTo":"20081029152202.GA10029@leksak.fem-net","subject":"Re: [PATCH] Implement git-staged, an alias for 'git diff --cached'.","fromName":"Johannes Schindelin","fromEmail":"johannes.schindelin@gmx.de","sentAt":"2008-10-29T15:48:09Z","receivedAt":"2008-10-29T15:48:09Z","isPatch":true,"sender":{"key":"johannes.schindelin@gmx.de","avatar":"https://avatars.githubusercontent.com/u/127790?v=4"},"body":"Hi,\n\nOn Wed, 29 Oct 2008, Stephan Beyer wrote:\n\n> For me, a \"git staged\" feels wrong without a \"git stage\" (alias for \"git \n> add\") and \"git unstage <file>\" (alias for \"git reset <file>\"). And I \n> think the list of examples can easily be continued.\n\nhttp://article.gmane.org/gmane.comp.version-control.git/99340\n\nThanks,\nDscho\n"},{"id":"94193","messageId":"08FC4756-8890-449D-BB55-90E4761C9B93@wincent.com","threadId":"16073","inReplyTo":"alpine.DEB.1.00.0810291604200.22125@pacific.mpi-cbg.de.mpi-cbg.de","subject":"Re: [PATCH] Implement git-staged, an alias for 'git diff --cached'.","fromName":"Wincent Colaiuta","fromEmail":"win@wincent.com","sentAt":"2008-10-29T16:16:44Z","receivedAt":"2008-10-29T16:16:44Z","isPatch":true,"sender":{"key":"greg@hurrell.net","avatar":"https://avatars.githubusercontent.com/u/7074?v=4"},"body":"El 29/10/2008, a las 16:08, Johannes Schindelin escribió:\n\n> Hi,\n>\n> On Wed, 29 Oct 2008, Wincent Colaiuta wrote:\n>\n>> El 29/10/2008, a las 1:44, David Symonds escribió:\n>>\n>>> +SCRIPT_SH += git-staged.sh\n>>\n>> Isn't this exactly what aliases are for?\n>>  git config --global alias.staged \"diff --cached\"\n>> (Rather than adding yet another command...)\n>\n> The difference being, of course, that we do not ship default aliases  \n> (and\n> neither do we plan to...).\n>\n> So saying \"this is what aliases are for\" you ask for _newbies_ to  \n> add it\n> for themselves.  We are talking the same newbies who should be  \n> helped by\n> that command, and typically do not know that there are Git aliases  \n> yet.\n>\n> Even worse, just sum the times it takes everybody to make that  \n> alias, and\n> then compare with the time it would take to include something like  \n> David\n> posted in git.git.  It should be obvious that the time balance is\n> absolutely horrible.\n\nGit already has too many commands. Adding more is not going to clear  \nup newbie confusion, and will only waste time because people will  \ncomplain about it and ask why there is this kind of duplication.\n\nW\n"},{"id":"94197","messageId":"alpine.DEB.1.00.0810291801580.22125@pacific.mpi-cbg.de.mpi-cbg.de","threadId":"16073","inReplyTo":"08FC4756-8890-449D-BB55-90E4761C9B93@wincent.com","subject":"Re: [PATCH] Implement git-staged, an alias for 'git diff --cached'.","fromName":"Johannes Schindelin","fromEmail":"johannes.schindelin@gmx.de","sentAt":"2008-10-29T17:03:46Z","receivedAt":"2008-10-29T17:03:46Z","isPatch":true,"sender":{"key":"johannes.schindelin@gmx.de","avatar":"https://avatars.githubusercontent.com/u/127790?v=4"},"body":"Hi,\n\nOn Wed, 29 Oct 2008, Wincent Colaiuta wrote:\n\n> Git already has too many commands. Adding more is not going to clear up \n> newbie confusion, and will only waste time because people will complain \n> about it and ask why there is this kind of duplication.\n\nI completely disagree.  If the existing set of commands causes confusion, \nwe need to deprecate those parts and add new commands.  Even if we have a \nton of commands already.\n\nIt does not need to hurt, either.  Just think of init-db.  Ever heard of \nit?  We still have it, yet it is not relevant.\n\nCiao,\nDscho\n"},{"id":"94202","messageId":"4908999F.4040208@obry.net","threadId":"16073","inReplyTo":"alpine.DEB.1.00.0810291801580.22125@pacific.mpi-cbg.de.mpi-cbg.de","subject":"Re: [PATCH] Implement git-staged, an alias for 'git diff --cached'.","fromName":"Pascal Obry","fromEmail":"pascal@obry.net","sentAt":"2008-10-29T17:13:03Z","receivedAt":"2008-10-29T17:13:03Z","isPatch":true,"sender":{"key":"pascal@obry.net","avatar":"https://avatars.githubusercontent.com/u/467069?v=4"},"body":"Johannes Schindelin a écrit :\n> I completely disagree.  If the existing set of commands causes confusion, \n> we need to deprecate those parts and add new commands.  Even if we have a \n> ton of commands already.\n> \n> It does not need to hurt, either.  Just think of init-db.  Ever heard of \n> it?  We still have it, yet it is not relevant.\n\nIn this specific case adding a new command as an alias for a\ncommand+option seems wrong! I much prefer adding the alias --staged for\n--cached - as proposed now - if it can make things easier for new comers.\n\nPascal.\n\n-- \n\n--|------------------------------------------------------\n--| Pascal Obry                           Team-Ada Member\n--| 45, rue Gabriel Peri - 78114 Magny Les Hameaux FRANCE\n--|------------------------------------------------------\n--|              http://www.obry.net\n--| \"The best way to travel is by means of imagination\"\n--|\n--| gpg --keyserver wwwkeys.pgp.net --recv-key C1082595\n"},{"id":"94203","messageId":"E4E10B61-FA92-417C-9046-F9DE3B48C2A6@wincent.com","threadId":"16073","inReplyTo":"alpine.DEB.1.00.0810291801580.22125@pacific.mpi-cbg.de.mpi-cbg.de","subject":"Re: [PATCH] Implement git-staged, an alias for 'git diff --cached'.","fromName":"Wincent Colaiuta","fromEmail":"win@wincent.com","sentAt":"2008-10-29T17:42:57Z","receivedAt":"2008-10-29T17:42:57Z","isPatch":true,"sender":{"key":"greg@hurrell.net","avatar":"https://avatars.githubusercontent.com/u/7074?v=4"},"body":"El 29/10/2008, a las 18:03, Johannes Schindelin escribió:\n\n> Hi,\n>\n> On Wed, 29 Oct 2008, Wincent Colaiuta wrote:\n>\n>> Git already has too many commands. Adding more is not going to  \n>> clear up\n>> newbie confusion, and will only waste time because people will  \n>> complain\n>> about it and ask why there is this kind of duplication.\n>\n> I completely disagree.  If the existing set of commands causes  \n> confusion,\n> we need to deprecate those parts and add new commands.  Even if we  \n> have a\n> ton of commands already.\n\nThe confusion isn't at the command level; it's at the switch/option  \nlevel. The solution isn't to add a new command.\n\n> It does not need to hurt, either.  Just think of init-db.  Ever  \n> heard of\n> it?  We still have it, yet it is not relevant.\n\nThe comparison isn't really valid. init-db is effectively invisible,  \nbut you're talking about adding a new \"in your face\" porcelain command.\n\nW\n"},{"id":"94204","messageId":"878ws7w8xc.fsf@iki.fi","threadId":"16073","inReplyTo":"E4E10B61-FA92-417C-9046-F9DE3B48C2A6@wincent.com","subject":"Re: [PATCH] Implement git-staged, an alias for 'git diff --cached'.","fromName":"Teemu Likonen","fromEmail":"tlikonen@iki.fi","sentAt":"2008-10-29T18:30:39Z","receivedAt":"2008-10-29T18:30:39Z","isPatch":true,"sender":{"key":"tlikonen@iki.fi","avatar":null},"body":"Wincent Colaiuta (2008-10-29 18:42 +0100) wrote:\n\n> El 29/10/2008, a las 18:03, Johannes Schindelin escribió:\n>> I completely disagree. If the existing set of commands causes\n>> confusion, we need to deprecate those parts and add new commands.\n>> Even if we have a ton of commands already.\n>\n> The confusion isn't at the command level; it's at the switch/option\n> level. The solution isn't to add a new command.\n\nI don't remember being confused in particular area but I think it's a\n_very_ good thing that the following three are behind the same \"diff\"\ncommand:\n\n    git diff\n    git diff --cached       (or --staged)\n    git diff HEAD\n\nIt's also good idea to pretty much always teach those three together.\n"},{"id":"94207","messageId":"alpine.DEB.1.00.0810292022480.22125@pacific.mpi-cbg.de.mpi-cbg.de","threadId":"16073","inReplyTo":"E4E10B61-FA92-417C-9046-F9DE3B48C2A6@wincent.com","subject":"Re: [PATCH] Implement git-staged, an alias for 'git diff --cached'.","fromName":"Johannes Schindelin","fromEmail":"johannes.schindelin@gmx.de","sentAt":"2008-10-29T19:23:49Z","receivedAt":"2008-10-29T19:23:49Z","isPatch":true,"sender":{"key":"johannes.schindelin@gmx.de","avatar":"https://avatars.githubusercontent.com/u/127790?v=4"},"body":"Hi,\n\nOn Wed, 29 Oct 2008, Wincent Colaiuta wrote:\n\n> El 29/10/2008, a las 18:03, Johannes Schindelin escribió:\n> \n> >On Wed, 29 Oct 2008, Wincent Colaiuta wrote:\n> >\n> > >Git already has too many commands. Adding more is not going to clear \n> > >up newbie confusion, and will only waste time because people will \n> > >complain about it and ask why there is this kind of duplication.\n> >\n> >I completely disagree.  If the existing set of commands causes \n> >confusion, we need to deprecate those parts and add new commands.  \n> >Even if we have a ton of commands already.\n> \n> The confusion isn't at the command level; it's at the switch/option \n> level. The solution isn't to add a new command.\n\nSeems that at leat one guy who does Git training disagrees with you, _in \naddition_ to me.\n\nCiao,\nDscho"},{"id":"94213","messageId":"C03E504F-50E8-4887-80CE-2C6B2F824B9E@wincent.com","threadId":"16073","inReplyTo":"alpine.DEB.1.00.0810292022480.22125@pacific.mpi-cbg.de.mpi-cbg.de","subject":"Re: [PATCH] Implement git-staged, an alias for 'git diff --cached'.","fromName":"Wincent Colaiuta","fromEmail":"win@wincent.com","sentAt":"2008-10-29T19:44:58Z","receivedAt":"2008-10-29T19:44:58Z","isPatch":true,"sender":{"key":"greg@hurrell.net","avatar":"https://avatars.githubusercontent.com/u/7074?v=4"},"body":"El 29/10/2008, a las 20:23, Johannes Schindelin escribió:\n\n> Hi,\n>\n> On Wed, 29 Oct 2008, Wincent Colaiuta wrote:\n>\n>> El 29/10/2008, a las 18:03, Johannes Schindelin escribió:\n>>\n>>> On Wed, 29 Oct 2008, Wincent Colaiuta wrote:\n>>>\n>>>> Git already has too many commands. Adding more is not going to  \n>>>> clear\n>>>> up newbie confusion, and will only waste time because people will\n>>>> complain about it and ask why there is this kind of duplication.\n>>>\n>>> I completely disagree.  If the existing set of commands causes\n>>> confusion, we need to deprecate those parts and add new commands.\n>>> Even if we have a ton of commands already.\n>>\n>> The confusion isn't at the command level; it's at the switch/option\n>> level. The solution isn't to add a new command.\n>\n> Seems that at leat one guy who does Git training disagrees with you,  \n> _in\n> addition_ to me.\n\nThat's what I call a \"zero value\" addition to the thread, seeing as  \nanyone reading the thread _already_ knows the opinions of the  \nparticipants who've posted.\n\nAdding a separate command to an already overwhelming command set in  \norder to address confusion about options to \"git diff\" is a case of  \n\"duct-tape UI design\".\n\nWincent\n"},{"id":"94214","messageId":"94a0d4530810291249x3a1c499xb5dde96de1ac39b3@mail.gmail.com","threadId":"16073","inReplyTo":"1225237145-95435-1-git-send-email-dsymonds@gmail.com","subject":"Re: [PATCH] Implement git-staged, an alias for 'git diff --cached'.","fromName":"Felipe Contreras","fromEmail":"felipe.contreras@gmail.com","sentAt":"2008-10-29T19:49:09Z","receivedAt":"2008-10-29T19:49:09Z","isPatch":true,"sender":{"key":"felipe.contreras@gmail.com","avatar":"https://avatars.githubusercontent.com/u/8358?v=4"},"body":"On Wed, Oct 29, 2008 at 1:39 AM, David Symonds <dsymonds@gmail.com> wrote:\n> Signed-off-by: David Symonds <dsymonds@gmail.com>\n> ---\n>  This isn't a particularly serious patch, but is very relevant to our\n>  current discussion at GitTogether '08.\n\nI've thought about some commands like:\ngit stage $file (git add $file)\ngit unstage $file (git reset $file)\n\nPerhaps\ngit stage add\ngit stage rm\n\nAnd then your proposal would fit with:\ngit stage diff\n\nOr something like that.\n\n-- \nFelipe Contreras\n"},{"id":"94217","messageId":"87abcnb14c.fsf@krank.kagedal.org","threadId":"16073","inReplyTo":"878ws7w8xc.fsf@iki.fi","subject":"Re: [PATCH] Implement git-staged, an alias for 'git diff --cached'.","fromName":"David Kågedal","fromEmail":"davidk@lysator.liu.se","sentAt":"2008-10-29T20:24:51Z","receivedAt":"2008-10-29T20:24:51Z","isPatch":true,"sender":{"key":"davidk@lysator.liu.se","avatar":"https://avatars.githubusercontent.com/u/60530?v=4"},"body":"Teemu Likonen <tlikonen@iki.fi> writes:\n\n> Wincent Colaiuta (2008-10-29 18:42 +0100) wrote:\n>\n>> El 29/10/2008, a las 18:03, Johannes Schindelin escribió:\n>>> I completely disagree. If the existing set of commands causes\n>>> confusion, we need to deprecate those parts and add new commands.\n>>> Even if we have a ton of commands already.\n>>\n>> The confusion isn't at the command level; it's at the switch/option\n>> level. The solution isn't to add a new command.\n>\n> I don't remember being confused in particular area but I think it's a\n> _very_ good thing that the following three are behind the same \"diff\"\n> command:\n>\n>     git diff\n>     git diff --cached       (or --staged)\n>     git diff HEAD\n\nOne irregularity hear is that there is no way to explicitly say what\nyou want to compare against the index (the staging area).  Diff\ncompares two things to each other, and a more regular and general way\nto express what it does would be something like\n\n    git diff STAGE WORKTREE   (like \"git diff\" today)\n    git diff HEAD WORKTREE    (like \"git diff HEAD\" today)\n    git diff WORKTREE HEAD    (like \"git diff -R HEAD\" today)\n    git diff HEAD STAGE       (like \"git diff --cached\" today)\n    git diff commit STAGE     (like \"git diff --cached commit\" today)\n\nTo me, it isn't obvious that --cached changes the thing you *compare*\nrather than the thing you compare *against*.  I think it would be\nuseful to have a way of explicitly stating what you compare, something\nlike what I wrote above, and then having useful shortcuts for common\ncases (like that no arguments compares the work tree against the\nstage).\n\n-- \nDavid Kågedal\n"}]}