git.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] git checkout: add -t alias for --track
@ 2008-04-23 23:04 Miklos Vajna
  2008-04-27  6:10 ` Junio C Hamano
  0 siblings, 1 reply; 6+ messages in thread
From: Miklos Vajna @ 2008-04-23 23:04 UTC (permalink / raw)
  To: Junio C Hamano; +Cc: git

Signed-off-by: Miklos Vajna <vmiklos@frugalware.org>
---

Just like 'git checkout -q' is an alias for 'git checkout --quiet', I
often type 'git checkout -t -b newname master', then realize I need
'--track', but in fact '-t' is not used for anything else, so it can be
just a short name for --track.

 Documentation/git-checkout.txt |    2 +-
 builtin-checkout.c             |    2 +-
 2 files changed, 2 insertions(+), 2 deletions(-)

diff --git a/Documentation/git-checkout.txt b/Documentation/git-checkout.txt
index e11cddb..a644173 100644
--- a/Documentation/git-checkout.txt
+++ b/Documentation/git-checkout.txt
@@ -47,7 +47,7 @@ OPTIONS
 	by linkgit:git-check-ref-format[1].  Some of these checks
 	may restrict the characters allowed in a branch name.
 
---track::
+-t, --track::
 	When creating a new branch, set up configuration so that git-pull
 	will automatically retrieve data from the start point, which must be
 	a branch. Use this if you always pull from the same upstream branch
diff --git a/builtin-checkout.c b/builtin-checkout.c
index 7deb504..1a93d13 100644
--- a/builtin-checkout.c
+++ b/builtin-checkout.c
@@ -504,7 +504,7 @@ int cmd_checkout(int argc, const char **argv, const char *prefix)
 		OPT__QUIET(&opts.quiet),
 		OPT_STRING('b', NULL, &opts.new_branch, "new branch", "branch"),
 		OPT_BOOLEAN('l', NULL, &opts.new_branch_log, "log for new branch"),
-		OPT_SET_INT( 0 , "track",  &opts.track, "track",
+		OPT_SET_INT('t', "track",  &opts.track, "track",
 			BRANCH_TRACK_EXPLICIT),
 		OPT_BOOLEAN('f', NULL, &opts.force, "force"),
 		OPT_BOOLEAN('m', NULL, &opts.merge, "merge"),
-- 
1.5.5

^ permalink raw reply related	[flat|nested] 6+ messages in thread

* Re: [PATCH] git checkout: add -t alias for --track
  2008-04-23 23:04 [PATCH] git checkout: add -t alias for --track Miklos Vajna
@ 2008-04-27  6:10 ` Junio C Hamano
  2008-04-27  6:25   ` Junio C Hamano
  0 siblings, 1 reply; 6+ messages in thread
From: Junio C Hamano @ 2008-04-27  6:10 UTC (permalink / raw)
  To: git; +Cc: Miklos Vajna

I do not have anything against this, but I do not see how this is useful
in practice, given that branch.autosetupmerge is true by default these
days.

List?

^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: [PATCH] git checkout: add -t alias for --track
  2008-04-27  6:10 ` Junio C Hamano
@ 2008-04-27  6:25   ` Junio C Hamano
  2008-04-27 11:41     ` Miklos Vajna
  0 siblings, 1 reply; 6+ messages in thread
From: Junio C Hamano @ 2008-04-27  6:25 UTC (permalink / raw)
  To: git; +Cc: Miklos Vajna

Junio C Hamano <gitster@pobox.com> writes:

> I do not have anything against this, but I do not see how this is useful
> in practice,...

Oops, wrong wording from a drunken panda who is not used to alcoholic
beverage.  Sorry.

What I meant to say was that this may be useful to _some_ degree but
probably _not very much_.

I should go to bed now.

^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: [PATCH] git checkout: add -t alias for --track
  2008-04-27  6:25   ` Junio C Hamano
@ 2008-04-27 11:41     ` Miklos Vajna
  2008-04-27 11:48       ` Johannes Schindelin
  0 siblings, 1 reply; 6+ messages in thread
From: Miklos Vajna @ 2008-04-27 11:41 UTC (permalink / raw)
  To: Junio C Hamano; +Cc: git

[-- Attachment #1: Type: text/plain, Size: 407 bytes --]

On Sat, Apr 26, 2008 at 11:25:09PM -0700, Junio C Hamano <gitster@pobox.com> wrote:
> What I meant to say was that this may be useful to _some_ degree but
> probably _not very much_.

Yes, it's just about my "having short option aliases are good" idea.
Should I improve the commit message by mentioning that this is useful
"in case you don't want to have branch.autosetupmerge set to true for
some reason"?

[-- Attachment #2: Type: application/pgp-signature, Size: 197 bytes --]

^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: [PATCH] git checkout: add -t alias for --track
  2008-04-27 11:41     ` Miklos Vajna
@ 2008-04-27 11:48       ` Johannes Schindelin
  2008-04-27 17:33         ` Junio C Hamano
  0 siblings, 1 reply; 6+ messages in thread
From: Johannes Schindelin @ 2008-04-27 11:48 UTC (permalink / raw)
  To: Miklos Vajna; +Cc: Junio C Hamano, git

Hi,

On Sun, 27 Apr 2008, Miklos Vajna wrote:

> On Sat, Apr 26, 2008 at 11:25:09PM -0700, Junio C Hamano <gitster@pobox.com> wrote:
> > What I meant to say was that this may be useful to _some_ degree but 
> > probably _not very much_.
> 
> Yes, it's just about my "having short option aliases are good" idea. 
> Should I improve the commit message by mentioning that this is useful 
> "in case you don't want to have branch.autosetupmerge set to true for 
> some reason"?

AFAIR you still need to specify --track if you want to setup tracking 
information for local branches, and have branch.autosetupmerge different 
than "always", but as always, I might be mistaken.

Ciao,
Dscho

^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: [PATCH] git checkout: add -t alias for --track
  2008-04-27 11:48       ` Johannes Schindelin
@ 2008-04-27 17:33         ` Junio C Hamano
  0 siblings, 0 replies; 6+ messages in thread
From: Junio C Hamano @ 2008-04-27 17:33 UTC (permalink / raw)
  To: Johannes Schindelin; +Cc: Miklos Vajna, git

Johannes Schindelin <Johannes.Schindelin@gmx.de> writes:

> On Sun, 27 Apr 2008, Miklos Vajna wrote:
>
>> On Sat, Apr 26, 2008 at 11:25:09PM -0700, Junio C Hamano <gitster@pobox.com> wrote:
>> > What I meant to say was that this may be useful to _some_ degree but 
>> > probably _not very much_.
>> 
>> Yes, it's just about my "having short option aliases are good" idea. 
>> Should I improve the commit message by mentioning that this is useful 
>> "in case you don't want to have branch.autosetupmerge set to true for 
>> some reason"?
>
> AFAIR you still need to specify --track if you want to setup tracking 
> information for local branches, and have branch.autosetupmerge different 
> than "always", but as always, I might be mistaken.

Ah, you are right.  The change is fine as-is regardless of the
"autosetupmerge" thing.

^ permalink raw reply	[flat|nested] 6+ messages in thread

end of thread, other threads:[~2008-04-27 17:34 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2008-04-23 23:04 [PATCH] git checkout: add -t alias for --track Miklos Vajna
2008-04-27  6:10 ` Junio C Hamano
2008-04-27  6:25   ` Junio C Hamano
2008-04-27 11:41     ` Miklos Vajna
2008-04-27 11:48       ` Johannes Schindelin
2008-04-27 17:33         ` Junio C Hamano

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).