git.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Conrad Irwin <conrad.irwin@gmail.com>
To: Jonathan Nieder <jrnieder@gmail.com>
Cc: git@vger.kernel.org, "Soeren Sonnenburg" <sonne@debian.org>,
	"☂Josh Chia (谢任中)" <joshchia@gmail.com>,
	"Conrad Irwin" <conrad.irwin@gmail.com>
Subject: [PATCH] Test renaming a branch to itself
Date: Fri, 25 Nov 2011 22:52:44 -0800	[thread overview]
Message-ID: <1322290364-16207-1-git-send-email-conrad.irwin@gmail.com> (raw)
In-Reply-To: <20111126023002.GA17652@elie.hsd1.il.comcast.net>

Test for a regression introduced in v1.7.7-rc2~1^2~2.

Requested-by: Jonathan Nieder <jrnieder@gmail.com>
Signed-off-by: Conrad Irwin <conrad.irwin@gmail.com>
---
 t/t3200-branch.sh |   16 ++++++++++++++++
 1 files changed, 16 insertions(+), 0 deletions(-)

diff --git a/t/t3200-branch.sh b/t/t3200-branch.sh
index bc73c20..7690332 100755
--- a/t/t3200-branch.sh
+++ b/t/t3200-branch.sh
@@ -115,6 +115,22 @@ test_expect_success 'git branch -M baz bam should succeed when baz is checked ou
 	git branch -M baz bam
 '
 
+test_expect_success 'git branch -M master should work when master is checked out' '
+	git checkout master &&
+	git branch -M master
+'
+
+test_expect_success 'git branch -M master master should work when master is checked out' '
+	git checkout master &&
+	git branch -M master master
+'
+
+test_expect_success 'git branch -M master2 master2 should work when master is checked out' '
+	git checkout master &&
+	git branch master2 &&
+	git branch -M master2 master2
+'
+
 test_expect_success 'git branch -v -d t should work' '
 	git branch t &&
 	test_path_is_file .git/refs/heads/t &&
-- 
1.7.7.1.433.ga2d04a

  reply	other threads:[~2011-11-26  6:53 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-11-26  0:36 git branch -M" regression in 1.7.7? ☂Josh Chia (谢任中)
2011-11-26  2:30 ` Jonathan Nieder
2011-11-26  6:52   ` Conrad Irwin [this message]
2011-11-26  6:59     ` [PATCH] Test renaming a branch to itself Jonathan Nieder
2011-11-26  7:05   ` git branch -M" regression in 1.7.7? Conrad Irwin
2011-11-26  8:54     ` Jonathan Nieder
2011-11-26 22:38       ` Junio C Hamano
2011-11-26 23:09         ` Andreas Schwab
2011-11-28 19:38   ` Junio C Hamano

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=1322290364-16207-1-git-send-email-conrad.irwin@gmail.com \
    --to=conrad.irwin@gmail.com \
    --cc=git@vger.kernel.org \
    --cc=joshchia@gmail.com \
    --cc=jrnieder@gmail.com \
    --cc=sonne@debian.org \
    /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 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).