git/list[1] front-page[2] threads[3] people[4] search[5] about
 

[PATCH] allow -t abbreviation for --track in git branch

From
Sitaram Chamarty <sitaramc@gmail.com>
Date
Apr 28, 2009, 15:21 UTC
Message-ID
<20090428152119.GA18935@atc.tcs.com>
also makes it consistent with git-checkout
---
 Documentation/git-branch.txt |    1 +
 builtin-branch.c             |    2 +-
 2 files changed, 2 insertions(+), 1 deletions(-)
diff --git a/Documentation/git-branch.txt b/Documentation/git-branch.txt
index cbd4275..ae201de 100644
--- a/Documentation/git-branch.txt
+++ b/Documentation/git-branch.txt
@@ -111,6 +111,7 @@ OPTIONS
 --no-abbrev::
 	Display the full sha1s in the output listing rather than abbreviating them.
 
+-t::
 --track::
 	When creating a new branch, set up configuration to mark the
 	start-point branch as "upstream" from the new branch. This
diff --git a/builtin-branch.c b/builtin-branch.c
index 91098ca..6aaa708 100644
--- a/builtin-branch.c
+++ b/builtin-branch.c
@@ -547,7 +547,7 @@ int cmd_branch(int argc, const char **argv, const char *prefix)
 	struct option options[] = {
 		OPT_GROUP("Generic options"),
 		OPT__VERBOSE(&verbose),
-		OPT_SET_INT( 0 , "track",  &track, "set up tracking mode (see git-pull(1))",
+		OPT_SET_INT('t', "track",  &track, "set up tracking mode (see git-pull(1))",
 			BRANCH_TRACK_EXPLICIT),
 		OPT_BOOLEAN( 0 , "color",  &branch_use_color, "use colored output"),
 		OPT_SET_INT('r', NULL,     &kinds, "act on remote-tracking branches",
-- 
1.6.2.4
Message 1 of 1 in “allow -t abbreviation for --track in git branch”
  1. allow -t abbreviation for --track in git branchSitaram Chamarty, Apr 28, 2009

Read the whole thread, see it on lore, or plain text.

$ cat FOOTERMessages come from the public archive at lore.kernel.org/git, fetched every hour. The front page is chosen and written each morning by an AI editor and can be wrong; the threads themselves are the record. About and API. For agents: an MCP server at https://gitlist.dev/mcp, and any thread, story or person page as Markdown by adding .md to its URL (or sending Accept: text/markdown). Details in /llms.txt.