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

[PATCH v3 3/4] t7501: add test of "commit --dry-run --short"

From
SSStephen P. Smith <ischis2@cox.net>
Date
Sep 6, 2018, 00:53 UTC
Message-ID
<20180906005329.11277-4-ischis2@cox.net>
In-Reply-To
<20180906005329.11277-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 committable flag is broken.

Signed-off-by: Stephen P. Smith <ischis2@cox.net>
---
 t/t7501-commit.sh | 6 ++++++
 1 file changed, 6 insertions(+)
diff --git a/t/t7501-commit.sh b/t/t7501-commit.sh
index 4cae92804..cf2a4c539 100755
--- a/t/t7501-commit.sh
+++ b/t/t7501-commit.sh
@@ -682,4 +682,10 @@ test_expect_success '--dry-run with conflicts fixed from a merge' '
 	git commit -m "conflicts fixed from merge."
 '
 
+test_expect_failure '--dry-run --short' '
+	>test-file &&
+	git add test-file &&
+	git commit --dry-run --short
+'
+
 test_done
-- 
2.18.0
Previous: Stephen P. SmithNext: Stephen P. Smith
Message 3 of 25 in “wt-status.c: commitable flag”
  1. 0/4 wt-status.c: commitable flagStephen P. Smith, Sep 6, 2018
  2. 1/4 Move has_unmerged earlier in the file.Stephen P. Smith, Sep 6, 2018
  3. 3/4 t7501: add test of "commit --dry-run --short"Stephen P. Smith, Sep 6, 2018
  4. 2/4 wt-status: rename commitable to committableStephen P. Smith, Sep 6, 2018
  5. Junio C HamanoSep 7, 2018
  6. 4/4 wt-status.c: Set the committable flag in the collect phase.Stephen P. Smith, Sep 6, 2018
  7. Junio C HamanoSep 7, 2018
  8. Junio C HamanoSep 7, 2018
  9. 0/1 wt-status-state-cleanupStephen P. Smith, Sep 28, 2018
  10. 1/1 roll wt_status_state into wt_status and populate in the collect phaseStephen P. Smith, Sep 28, 2018
  11. Taylor BlauSep 28, 2018
  12. Junio C HamanoSep 28, 2018
  13. 0/1 wt-status-state-cleanupStephen P. Smith, Sep 29, 2018
  14. 1/1 roll wt_status_state into wt_status and populate in the collect phaseStephen P. Smith, Sep 29, 2018
  15. Eric SunshineSep 30, 2018
  16. 0/1 wt-status-state-cleanupStephen P. Smith, Sep 30, 2018
  17. 1/1 roll wt_status_state into wt_status and populate in the collect phaseStephen P. Smith, Sep 30, 2018
  18. Eric SunshineSep 30, 2018
  19. Stephen P. SmithSep 7, 2018
  20. Junio C HamanoSep 11, 2018
  21. Stephen SmithSep 24, 2018
  22. Junio C HamanoSep 24, 2018
  23. Ævar Arnfjörð BjarmasonSep 6, 2018
  24. Stephen & Linda SmithSep 6, 2018
  25. Junio C HamanoSep 7, 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.