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

[RFC/PATCH 1/2] t3200-branch: test -M

From
Michael J Gruber <git@drmicha.warpmail.net>
Date
Dec 4, 2014, 13:26 UTC
Message-ID
<4522a9a6606467e130c2430d717286c92c777b6f.1417699299.git.git@drmicha.warpmail.net>
In-Reply-To
<cover.1417699299.git.git@drmicha.warpmail.net>
Signed-off-by: Michael J Gruber <git@drmicha.warpmail.net>
---
 t/t3200-branch.sh | 9 +++++++++
 1 file changed, 9 insertions(+)
diff --git a/t/t3200-branch.sh b/t/t3200-branch.sh
index 432921b..0b3b8f5 100755
--- a/t/t3200-branch.sh
+++ b/t/t3200-branch.sh
@@ -97,6 +97,15 @@ test_expect_success 'git branch -m o/o o should fail when o/p exists' '
 	test_must_fail git branch -m o/o o
 '
 
+test_expect_success 'git branch -m o/q o/p should fail when o/p exists' '
+	git branch o/q &&
+	test_must_fail git branch -m o/q o/p
+'
+
+test_expect_success 'git branch -M o/q o/p should work when o/p exists' '
+	git branch -M o/q o/p
+'
+
 test_expect_success 'git branch -m q r/q should fail when r exists' '
 	git branch q &&
 	git branch r &&
-- 
2.2.0.rc3.286.g888a711
Previous: Michael J GruberNext: Michael J Gruber
Message 2 of 9 in “Make git branch -f forceful”
  1. 0/2 Make git branch -f forcefulMichael J Gruber, Dec 4, 2014
  2. 1/2 t3200-branch: test -MMichael J Gruber, Dec 4, 2014
  3. 2/2 branch: allow -f with -m and -dMichael J Gruber, Dec 4, 2014
  4. Junio C HamanoDec 4, 2014
  5. Michael J GruberDec 5, 2014
  6. Junio C HamanoDec 5, 2014
  7. 0/2 Make git branch -f forcefulMichael J Gruber, Dec 8, 2014
  8. 1/2 t3200-branch: test -MMichael J Gruber, Dec 8, 2014
  9. 2/2 branch: allow -f with -m and -dMichael J Gruber, Dec 8, 2014

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.