[RFC/PATCH] git-branch: default to --track

!MAILaRCHIVE_VOTE_RePLACE
Previous message: [thread] [date] [author]
Next message: [thread] [date] [author]
To: <git@...>, <gitster@...>
Date: Friday, July 6, 2007 - 5:54 pm

"git branch --track" will setup config variables when branching from 
a remote branch, so that if you say "git pull" while being on that
branch, it automatically fetches the correct remote, and merges the
correct branch.

Often people complain that this is not the default for "git branch". 
Make it so.

Signed-off-by: Johannes Schindelin <Johannes.Schindelin@gmx.de>

---

	With 1.5.3 knocking at the door, maybe it is too late to include
	this. However, I am in favour of changing the default behaviour
	here.

 builtin-branch.c |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/builtin-branch.c b/builtin-branch.c
index ae450b0..507b47c 100644
--- a/builtin-branch.c
+++ b/builtin-branch.c
@@ -22,7 +22,7 @@ static const char builtin_branch_usage[] =
 static const char *head;
 static unsigned char head_sha1[20];
 
-static int branch_track_remotes;
+static int branch_track_remotes = 1;
 
 static int branch_use_color;
 static char branch_colors[][COLOR_MAXLEN] = {
-
To unsubscribe from this list: send the line "unsubscribe git" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Previous message: [thread] [date] [author]
Next message: [thread] [date] [author]

Messages in current thread:
[RFC/PATCH] git-branch: default to --track, Johannes Schindelin, (Fri Jul 6, 5:54 pm)
Re: [RFC/PATCH] git-branch: default to --track, Junio C Hamano, (Sun Jul 8, 4:59 am)
[PATCH] branch.autosetupmerge: allow boolean values, or "all", Johannes Schindelin, (Sun Jul 8, 8:41 am)
Re: [PATCH] branch.autosetupmerge: allow boolean values, or ..., Johannes Schindelin, (Mon Jul 9, 7:28 am)
[PATCH] branch --track: code cleanup and saner handling of l..., Johannes Schindelin, (Mon Jul 9, 7:35 am)
Re: [PATCH] branch --track: code cleanup and saner handling ..., Johannes Schindelin, (Mon Jul 9, 5:05 pm)
[PATCH 2/2] branch --track: code cleanup and saner handling ..., Johannes Schindelin, (Mon Jul 9, 11:05 pm)
[PATCH 1/2] Add for_each_remote() function, and extend remot..., Johannes Schindelin, (Mon Jul 9, 11:02 pm)
[PATCH v2 2/2] branch --track: code cleanup and saner handli..., Johannes Schindelin, (Tue Jul 10, 1:50 pm)
[PATCH v2 1/2] Add for_each_remote() function, and extend re..., Johannes Schindelin, (Tue Jul 10, 1:48 pm)
Re: [PATCH v2 1/2] Add for_each_remote() function, and exten..., Johannes Schindelin, (Tue Jul 10, 3:28 pm)
Re: [PATCH 1/2] Add for_each_remote() function, and extend r..., Johannes Schindelin, (Tue Jul 10, 10:11 am)
Re: [PATCH] branch.autosetupmerge: allow boolean values, or ..., Johannes Schindelin, (Sun Jul 8, 3:15 pm)