All of lore.kernel.org
 help / color / mirror / Atom feed
From: Michael J Gruber <git@drmicha.warpmail.net>
To: git@vger.kernel.org
Cc: Daniel Barkalow <barkalow@iabervon.org>,
	Johannes Schindelin <Johannes.Schindelin@gmx.de>,
	Junio C Hamano <gitster@pobox.com>
Subject: [PATCH 1/2] Test for local branches being followed with --track
Date: Thu, 26 Mar 2009 21:53:24 +0100	[thread overview]
Message-ID: <1238100805-19619-2-git-send-email-git@drmicha.warpmail.net> (raw)
In-Reply-To: <1238100805-19619-1-git-send-email-git@drmicha.warpmail.net>

According to the documentation, it is perfectly okay to follow local
branches using the --track option. Introduce a test which checks whether
they behave the same. Currently 1 test fails.

Signed-off-by: Michael J Gruber <git@drmicha.warpmail.net>
---
 t/t6040-tracking-info.sh |   10 +++++++++-
 1 files changed, 9 insertions(+), 1 deletions(-)

diff --git a/t/t6040-tracking-info.sh b/t/t6040-tracking-info.sh
index ba90601..2a2b6b6 100755
--- a/t/t6040-tracking-info.sh
+++ b/t/t6040-tracking-info.sh
@@ -29,7 +29,9 @@ test_expect_success setup '
 		git checkout -b b4 origin &&
 		advance e &&
 		advance f
-	)
+	) &&
+	git checkout -b follower --track master &&
+	advance g
 '
 
 script='s/^..\(b.\)[	 0-9a-f]*\[\([^]]*\)\].*/\1 \2/p'
@@ -56,6 +58,12 @@ test_expect_success 'checkout' '
 	grep "have 1 and 1 different" actual
 '
 
+test_expect_failure 'checkout with local tracked branch' '
+	git checkout master &&
+	git checkout follower >actual
+	grep "is ahead of" actual
+'
+
 test_expect_success 'status' '
 	(
 		cd test &&
-- 
1.6.2.1.507.g0e68d

  reply	other threads:[~2009-03-26 20:55 UTC|newest]

Thread overview: 15+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2009-03-20 14:22 Tracking of local branches Michael J Gruber
2009-03-20 16:13 ` Michael J Gruber
2009-03-20 16:46 ` Junio C Hamano
2009-03-20 18:10   ` Daniel Barkalow
2009-03-26 20:53     ` [PATCH 0/2] Make local branches behave like remote branches when --tracked Michael J Gruber
2009-03-26 20:53       ` Michael J Gruber [this message]
2009-03-26 20:53         ` [PATCH 2/2] " Michael J Gruber
2009-03-27  8:08           ` Junio C Hamano
2009-03-27  8:47             ` Michael J Gruber
2009-03-27 16:20               ` Junio C Hamano
2009-03-27 16:52                 ` Michael J Gruber
2009-04-01 21:42                   ` [PATCHv2 0/2] " Michael J Gruber
2009-04-01 21:42                     ` [PATCHv2 1/2] Test for local branches being followed with --track Michael J Gruber
2009-04-01 21:42                       ` [PATCHv2 2/2] Make local branches behave like remote branches when --tracked Michael J Gruber
2009-03-26 20:57       ` [PATCH 0/2] " Michael J Gruber

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1238100805-19619-2-git-send-email-git@drmicha.warpmail.net \
    --to=git@drmicha.warpmail.net \
    --cc=Johannes.Schindelin@gmx.de \
    --cc=barkalow@iabervon.org \
    --cc=git@vger.kernel.org \
    --cc=gitster@pobox.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.