{"thread":{"id":"13235","subject":"[PATCH] git checkout: add -t alias for --track","startedAt":"2008-04-23T23:04:48Z","lastAt":"2008-04-27T17:33:15Z","messageCount":6,"participants":["Miklos Vajna","Junio C Hamano","Johannes Schindelin"],"isPatch":true,"patchVersion":1,"patchTotal":null},"messages":[{"id":"75117","messageId":"20080423230448.GL4012@genesis.frugalware.org","threadId":"13235","inReplyTo":null,"subject":"[PATCH] git checkout: add -t alias for --track","fromName":"Miklos Vajna","fromEmail":"vmiklos@frugalware.org","sentAt":"2008-04-23T23:04:48Z","receivedAt":"2008-04-23T23:04:48Z","isPatch":true,"sender":{"key":"vmiklos@frugalware.org","avatar":"https://gravatar.com/avatar/401c1cbbb3a5d13e650c691a2c71d6fd0b80df1a01bc74d9f1972675dd58f2bd?d=mp&s=160"},"body":"Signed-off-by: Miklos Vajna <vmiklos@frugalware.org>\n---\n\nJust like 'git checkout -q' is an alias for 'git checkout --quiet', I\noften type 'git checkout -t -b newname master', then realize I need\n'--track', but in fact '-t' is not used for anything else, so it can be\njust a short name for --track.\n\n Documentation/git-checkout.txt |    2 +-\n builtin-checkout.c             |    2 +-\n 2 files changed, 2 insertions(+), 2 deletions(-)\n\ndiff --git a/Documentation/git-checkout.txt b/Documentation/git-checkout.txt\nindex e11cddb..a644173 100644\n--- a/Documentation/git-checkout.txt\n+++ b/Documentation/git-checkout.txt\n@@ -47,7 +47,7 @@ OPTIONS\n \tby linkgit:git-check-ref-format[1].  Some of these checks\n \tmay restrict the characters allowed in a branch name.\n \n---track::\n+-t, --track::\n \tWhen creating a new branch, set up configuration so that git-pull\n \twill automatically retrieve data from the start point, which must be\n \ta branch. Use this if you always pull from the same upstream branch\ndiff --git a/builtin-checkout.c b/builtin-checkout.c\nindex 7deb504..1a93d13 100644\n--- a/builtin-checkout.c\n+++ b/builtin-checkout.c\n@@ -504,7 +504,7 @@ int cmd_checkout(int argc, const char **argv, const char *prefix)\n \t\tOPT__QUIET(&opts.quiet),\n \t\tOPT_STRING('b', NULL, &opts.new_branch, \"new branch\", \"branch\"),\n \t\tOPT_BOOLEAN('l', NULL, &opts.new_branch_log, \"log for new branch\"),\n-\t\tOPT_SET_INT( 0 , \"track\",  &opts.track, \"track\",\n+\t\tOPT_SET_INT('t', \"track\",  &opts.track, \"track\",\n \t\t\tBRANCH_TRACK_EXPLICIT),\n \t\tOPT_BOOLEAN('f', NULL, &opts.force, \"force\"),\n \t\tOPT_BOOLEAN('m', NULL, &opts.merge, \"merge\"),\n-- \n1.5.5\n"},{"id":"75260","messageId":"7vmynfj0a4.fsf@gitster.siamese.dyndns.org","threadId":"13235","inReplyTo":"20080423230448.GL4012@genesis.frugalware.org","subject":"Re: [PATCH] git checkout: add -t alias for --track","fromName":"Junio C Hamano","fromEmail":"gitster@pobox.com","sentAt":"2008-04-27T06:10:27Z","receivedAt":"2008-04-27T06:10:27Z","isPatch":true,"sender":{"key":"gitster@pobox.com","avatar":"https://avatars.githubusercontent.com/u/54884?v=4"},"body":"I do not have anything against this, but I do not see how this is useful\nin practice, given that branch.autosetupmerge is true by default these\ndays.\n\nList?\n"},{"id":"75266","messageId":"7v1w4rizlm.fsf@gitster.siamese.dyndns.org","threadId":"13235","inReplyTo":"7vmynfj0a4.fsf@gitster.siamese.dyndns.org","subject":"Re: [PATCH] git checkout: add -t alias for --track","fromName":"Junio C Hamano","fromEmail":"gitster@pobox.com","sentAt":"2008-04-27T06:25:09Z","receivedAt":"2008-04-27T06:25:09Z","isPatch":true,"sender":{"key":"gitster@pobox.com","avatar":"https://avatars.githubusercontent.com/u/54884?v=4"},"body":"Junio C Hamano <gitster@pobox.com> writes:\n\n> I do not have anything against this, but I do not see how this is useful\n> in practice,...\n\nOops, wrong wording from a drunken panda who is not used to alcoholic\nbeverage.  Sorry.\n\nWhat I meant to say was that this may be useful to _some_ degree but\nprobably _not very much_.\n\nI should go to bed now.\n"},{"id":"75286","messageId":"20080427114152.GS4012@genesis.frugalware.org","threadId":"13235","inReplyTo":"7v1w4rizlm.fsf@gitster.siamese.dyndns.org","subject":"Re: [PATCH] git checkout: add -t alias for --track","fromName":"Miklos Vajna","fromEmail":"vmiklos@frugalware.org","sentAt":"2008-04-27T11:41:52Z","receivedAt":"2008-04-27T11:41:52Z","isPatch":true,"sender":{"key":"vmiklos@frugalware.org","avatar":"https://gravatar.com/avatar/401c1cbbb3a5d13e650c691a2c71d6fd0b80df1a01bc74d9f1972675dd58f2bd?d=mp&s=160"},"body":"On Sat, Apr 26, 2008 at 11:25:09PM -0700, Junio C Hamano <gitster@pobox.com> wrote:\n> What I meant to say was that this may be useful to _some_ degree but\n> probably _not very much_.\n\nYes, it's just about my \"having short option aliases are good\" idea.\nShould I improve the commit message by mentioning that this is useful\n\"in case you don't want to have branch.autosetupmerge set to true for\nsome reason\"?\n"},{"id":"75288","messageId":"alpine.DEB.1.00.0804271247030.16320@eeepc-johanness","threadId":"13235","inReplyTo":"20080427114152.GS4012@genesis.frugalware.org","subject":"Re: [PATCH] git checkout: add -t alias for --track","fromName":"Johannes Schindelin","fromEmail":"johannes.schindelin@gmx.de","sentAt":"2008-04-27T11:48:21Z","receivedAt":"2008-04-27T11:48:21Z","isPatch":true,"sender":{"key":"johannes.schindelin@gmx.de","avatar":"https://avatars.githubusercontent.com/u/127790?v=4"},"body":"Hi,\n\nOn Sun, 27 Apr 2008, Miklos Vajna wrote:\n\n> On Sat, Apr 26, 2008 at 11:25:09PM -0700, Junio C Hamano <gitster@pobox.com> wrote:\n> > What I meant to say was that this may be useful to _some_ degree but \n> > probably _not very much_.\n> \n> Yes, it's just about my \"having short option aliases are good\" idea. \n> Should I improve the commit message by mentioning that this is useful \n> \"in case you don't want to have branch.autosetupmerge set to true for \n> some reason\"?\n\nAFAIR you still need to specify --track if you want to setup tracking \ninformation for local branches, and have branch.autosetupmerge different \nthan \"always\", but as always, I might be mistaken.\n\nCiao,\nDscho\n"},{"id":"75309","messageId":"7v8wyzgq3o.fsf@gitster.siamese.dyndns.org","threadId":"13235","inReplyTo":"alpine.DEB.1.00.0804271247030.16320@eeepc-johanness","subject":"Re: [PATCH] git checkout: add -t alias for --track","fromName":"Junio C Hamano","fromEmail":"gitster@pobox.com","sentAt":"2008-04-27T17:33:15Z","receivedAt":"2008-04-27T17:33:15Z","isPatch":true,"sender":{"key":"gitster@pobox.com","avatar":"https://avatars.githubusercontent.com/u/54884?v=4"},"body":"Johannes Schindelin <Johannes.Schindelin@gmx.de> writes:\n\n> On Sun, 27 Apr 2008, Miklos Vajna wrote:\n>\n>> On Sat, Apr 26, 2008 at 11:25:09PM -0700, Junio C Hamano <gitster@pobox.com> wrote:\n>> > What I meant to say was that this may be useful to _some_ degree but \n>> > probably _not very much_.\n>> \n>> Yes, it's just about my \"having short option aliases are good\" idea. \n>> Should I improve the commit message by mentioning that this is useful \n>> \"in case you don't want to have branch.autosetupmerge set to true for \n>> some reason\"?\n>\n> AFAIR you still need to specify --track if you want to setup tracking \n> information for local branches, and have branch.autosetupmerge different \n> than \"always\", but as always, I might be mistaken.\n\nAh, you are right.  The change is fine as-is regardless of the\n\"autosetupmerge\" thing.\n"}]}