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

[PATCH v2 2/3] Add test for commit --dry-run --short.

From
SSStephen P. Smith <ischis2@cox.net>
Date
Sep 1, 2018, 23:52 UTC
Message-ID
<20180901235256.4260-3-ischis2@cox.net>
In-Reply-To
<20180901235256.4260-1-ischis2@cox.net>

Add test for commit with --dry-run --short for a new file of zero length.

The test demonstrates that the setting of the commitable flag is broken.

Signed-off-by: Stephen P. Smith <ischis2@cox.net>
---
 t/t7501-commit.sh | 8 ++++++++
 1 file changed, 8 insertions(+)
diff --git a/t/t7501-commit.sh b/t/t7501-commit.sh
index 4cae92804..5812dc2f8 100755
--- a/t/t7501-commit.sh
+++ b/t/t7501-commit.sh
@@ -682,4 +682,12 @@ test_expect_success '--dry-run with conflicts fixed from a merge' '
 	git commit -m "conflicts fixed from merge."
 '
 
+test_expect_failure '--dry-run --short' '
+	# setup two branches with conflicting information
+	# in the same file, resolve the conflict
+	>test-file &&
+	git add test-file &&
+	git commit --dry-run --short
+'
+
 test_done
-- 
2.18.0
Previous: Stephen P. SmithNext: Eric Sunshine
Message 3 of 7 in “wt-status.c: commitable flag”
  1. 0/3 wt-status.c: commitable flagStephen P. Smith, Sep 1, 2018
  2. 1/3 wt-status.c: Move has_unmerged earlier in the file.Stephen P. Smith, Sep 1, 2018
  3. 2/3 Add test for commit --dry-run --short.Stephen P. Smith, Sep 1, 2018
  4. Eric SunshineSep 2, 2018
  5. Eric SunshineSep 2, 2018
  6. Stephen & Linda SmithSep 2, 2018
  7. 3/3 wt-status.c: Set the commitable flag in the collect phase.Stephen P. Smith, Sep 1, 2018

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.