{"thread":{"id":"14576","subject":"[PATCH] checkout without arguments does not make sense","startedAt":"2008-07-21T20:06:32Z","lastAt":"2008-07-22T00:57:54Z","messageCount":6,"participants":["Johannes Sixt","Miklos Vajna","Avery Pennarun","Johannes Schindelin"],"isPatch":true,"patchVersion":1,"patchTotal":null},"messages":[{"id":"84234","messageId":"200807212206.32818.johannes.sixt@telecom.at","threadId":"14576","inReplyTo":null,"subject":"[PATCH] checkout without arguments does not make sense","fromName":"Johannes Sixt","fromEmail":"johannes.sixt@telecom.at","sentAt":"2008-07-21T20:06:32Z","receivedAt":"2008-07-21T20:06:32Z","isPatch":true,"sender":{"key":"j6t@kdbg.org","avatar":"https://avatars.githubusercontent.com/u/14810926?v=4"},"body":"Signed-off-by: Johannes Sixt <johannes.sixt@telecom.at>\n---\n builtin-checkout.c |    3 ++-\n 1 files changed, 2 insertions(+), 1 deletions(-)\n\ndiff --git a/builtin-checkout.c b/builtin-checkout.c\nindex fbd5105..669be0e 100644\n--- a/builtin-checkout.c\n+++ b/builtin-checkout.c\n@@ -487,7 +487,8 @@ int cmd_checkout(int argc, const char **argv, const char *prefix)\n \t\t}\n \n \t\treturn checkout_paths(source_tree, pathspec);\n-\t}\n+\t} else if (!new.name && !opts.new_branch)\n+\t\tusage_with_options(checkout_usage, options);\n \n \tif (new.name && !new.commit) {\n \t\tdie(\"Cannot switch branch to a non-commit.\");\n-- \n1.6.0.rc0.18.g6aef2\n"},{"id":"84239","messageId":"20080721204955.GI32057@genesis.frugalware.org","threadId":"14576","inReplyTo":"200807212206.32818.johannes.sixt@telecom.at","subject":"Re: [PATCH] checkout without arguments does not make sense","fromName":"Miklos Vajna","fromEmail":"vmiklos@frugalware.org","sentAt":"2008-07-21T20:49:55Z","receivedAt":"2008-07-21T20:49:55Z","isPatch":true,"sender":{"key":"vmiklos@frugalware.org","avatar":"https://gravatar.com/avatar/401c1cbbb3a5d13e650c691a2c71d6fd0b80df1a01bc74d9f1972675dd58f2bd?d=mp&s=160"},"body":"On Mon, Jul 21, 2008 at 10:06:32PM +0200, Johannes Sixt <johannes.sixt@telecom.at> wrote:\n> @@ -487,7 +487,8 @@ int cmd_checkout(int argc, const char **argv, const char *prefix)\n>  \t\t}\n>  \n>  \t\treturn checkout_paths(source_tree, pathspec);\n> -\t}\n> +\t} else if (!new.name && !opts.new_branch)\n> +\t\tusage_with_options(checkout_usage, options);\n>  \n>  \tif (new.name && !new.commit) {\n>  \t\tdie(\"Cannot switch branch to a non-commit.\");\n\nActually I think it _is_ useful, like this:\n\n$ git checkout\nYour branch is ahead of the tracked remote branch 'junio/next' by 1 commit.\n\nHow will it be possible to get that info easily after your patch?\n\nThanks.\n"},{"id":"84241","messageId":"200807212311.17612.johannes.sixt@telecom.at","threadId":"14576","inReplyTo":"20080721204955.GI32057@genesis.frugalware.org","subject":"Re: [PATCH] checkout without arguments does not make sense","fromName":"Johannes Sixt","fromEmail":"johannes.sixt@telecom.at","sentAt":"2008-07-21T21:11:17Z","receivedAt":"2008-07-21T21:11:17Z","isPatch":true,"sender":{"key":"j6t@kdbg.org","avatar":"https://avatars.githubusercontent.com/u/14810926?v=4"},"body":"On Montag, 21. Juli 2008, Miklos Vajna wrote:\n> Actually I think it _is_ useful, like this:\n>\n> $ git checkout\n> Your branch is ahead of the tracked remote branch 'junio/next' by 1 commit.\n\nAh, yes, indeed; that makes sense. Scrap the patch.\n\n-- Hannes\n"},{"id":"84243","messageId":"32541b130807211436h77bf5985xa61ed7b4941c47dc@mail.gmail.com","threadId":"14576","inReplyTo":"20080721204955.GI32057@genesis.frugalware.org","subject":"Re: [PATCH] checkout without arguments does not make sense","fromName":"Avery Pennarun","fromEmail":"apenwarr@gmail.com","sentAt":"2008-07-21T21:36:59Z","receivedAt":"2008-07-21T21:36:59Z","isPatch":true,"sender":{"key":"apenwarr@gmail.com","avatar":"https://avatars.githubusercontent.com/u/20592?v=4"},"body":"On 7/21/08, Miklos Vajna <vmiklos@frugalware.org> wrote:\n> Actually I think it _is_ useful, like this:\n>\n>  $ git checkout\n>  Your branch is ahead of the tracked remote branch 'junio/next' by 1 commit.\n>\n>  How will it be possible to get that info easily after your patch?\n\nEek, are we using \"checkout\" to get status information now?  If that\ngoes wrong, you could be blowing away your locally modified data by\naccident.\n\nI think \"git status\" reports this information in recent versions, doesn't it?\n\nThanks,\n\nAvery\n"},{"id":"84244","messageId":"20080721214459.GJ32057@genesis.frugalware.org","threadId":"14576","inReplyTo":"32541b130807211436h77bf5985xa61ed7b4941c47dc@mail.gmail.com","subject":"Re: [PATCH] checkout without arguments does not make sense","fromName":"Miklos Vajna","fromEmail":"vmiklos@frugalware.org","sentAt":"2008-07-21T21:44:59Z","receivedAt":"2008-07-21T21:44:59Z","isPatch":true,"sender":{"key":"vmiklos@frugalware.org","avatar":"https://gravatar.com/avatar/401c1cbbb3a5d13e650c691a2c71d6fd0b80df1a01bc74d9f1972675dd58f2bd?d=mp&s=160"},"body":"On Mon, Jul 21, 2008 at 05:36:59PM -0400, Avery Pennarun <apenwarr@gmail.com> wrote:\n> Eek, are we using \"checkout\" to get status information now?  If that\n> goes wrong, you could be blowing away your locally modified data by\n> accident.\n\nHm, let's say I have uncommitted changes to Makefile, then I'll get:\n\n$ git checkout\nM       Makefile\nYour branch is ahead of the tracked remote branch 'junio/next' by 1 commit.\n\nBut it will not drop my local changes.\n\n> I think \"git status\" reports this information in recent versions, doesn't it?\n\nRight. But that shows other infos as well, for example the untracked\nfiles, etc. So there are cases when git checkout is just better.\n\nHowever, you are right about it may not be the best habit from my side\nto use git checkout to get that info. ;-)\n"},{"id":"84258","messageId":"alpine.DEB.1.00.0807220256270.3407@eeepc-johanness","threadId":"14576","inReplyTo":"20080721214459.GJ32057@genesis.frugalware.org","subject":"Re: [PATCH] checkout without arguments does not make sense","fromName":"Johannes Schindelin","fromEmail":"johannes.schindelin@gmx.de","sentAt":"2008-07-22T00:57:54Z","receivedAt":"2008-07-22T00:57:54Z","isPatch":true,"sender":{"key":"johannes.schindelin@gmx.de","avatar":"https://avatars.githubusercontent.com/u/127790?v=4"},"body":"Hi,\n\nOn Mon, 21 Jul 2008, Miklos Vajna wrote:\n\n> On Mon, Jul 21, 2008 at 05:36:59PM -0400, Avery Pennarun <apenwarr@gmail.com> wrote:\n>\n> > I think \"git status\" reports this information in recent versions, \n> > doesn't it?\n> \n> Right. But that shows other infos as well, for example the untracked \n> files, etc. So there are cases when git checkout is just better.\n> \n> However, you are right about it may not be the best habit from my side \n> to use git checkout to get that info. ;-)\n\nI usually call \"git status\" for that information.  But Junio suggested \ncheckout recently on #git, for exactly that information, so you are not \nalone at all.\n\nCiao,\nDscho\n"}]}