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

Re: [PATCH 01/23] Introduce git-test.sh and git-test-lib.sh

From
Drew Northup <drew.northup@maine.edu>
Date
Apr 27, 2011, 19:11 UTC
Message-ID
<1303931471.25134.54.camel@drew-northup.unet.maine.edu>
In-Reply-To
<1303543372-77843-2-git-send-email-jon.seymour@gmail.com>
On Sat, 2011-04-23 at 17:22 +1000, Jon Seymour wrote:
Show 7 quoted lines
> This command is intended provide a uniform command line interface
> to a suite of assertions that can be made about the state of
> the working tree, index and repository.
> 
> This commit introduces the core assert infrastructure. Subsequent
> commits will introduce check functions that extend the infrastructure
> in a modular way with additional tests.
.....
Show 18 quoted lines
> +'test_condition' [--<condition> [ arg ... ]] ...
> +'require_condition_libs'
> +
> +
> +DESCRIPTION
> +-----------
> +`git test` provides a uniform, extensible API for evaluating various conditions that
> +pertain to the state of a git working tree, index and repository.
> +
> +Specified conditions are evaluated from left to right. If any condition evaluates to false, 
> +the command conditionally prints a diagnostic message to stderr and sets a 
> +non-zero status code. Otherwise, sets a status code of zero. 
> +
> +The message used to report a assertion failure may be overidden by specifying the --message option.
> +
> +Diagnostic output resulting from an assertion failure may be suppressed with the -q option. 
> +Note that the -q option does not suppress diagnostic output that results from the failure to 
> +successfully parse the arguments that configure the test API.

..... Is this supposed to be a porcelain or plumbing?

The name could probably be better to avoid confusion with the "unit testing" code in t/.

Additionally, I'd like to know why this shouldn't be implemented as some sort of 'git status --assert="XXXX"' call...

-- 
-Drew Northup
________________________________________________
"As opposed to vegetable or mineral error?"
-John Pescatore, SANS NewsBites Vol. 12 Num. 59
Previous: Jon SeymourNext: Jon Seymour
Message 3 of 29 in “RFC: Introducing git-test, git-atomic, git-base and git-work”
  1. 00/23 RFC: Introducing git-test, git-atomic, git-base and git-workJon Seymour, Apr 23, 2011
  2. 01/23 Introduce git-test.sh and git-test-lib.shJon Seymour, Apr 23, 2011
  3. Drew NorthupApr 27, 2011
  4. 02/23 Introduce --unstaged.Jon Seymour, Apr 23, 2011
  5. 03/23 Introduce --stagedJon Seymour, Apr 23, 2011
  6. 04/23 Introduce --untracked.Jon Seymour, Apr 23, 2011
  7. 05/23 Introduce --conflictedJon Seymour, Apr 23, 2011
  8. 06/23 Introduce --rebasingJon Seymour, Apr 23, 2011
  9. 07/23 Introduce --detachedJon Seymour, Apr 23, 2011
  10. 08/23 Introduce --branch-existsJon Seymour, Apr 23, 2011
  11. 09/23 Introduce --tag-existsJon Seymour, Apr 23, 2011
  12. 10/23 Introduce --ref-existsJon Seymour, Apr 23, 2011
  13. 11/23 Introduce --commit-exists.Jon Seymour, Apr 23, 2011
  14. 12/23 Introduce --checked-outJon Seymour, Apr 23, 2011
  15. 13/23 Introduce --reachableJon Seymour, Apr 23, 2011
  16. 14/23 Introduce --tree-same.Jon Seymour, Apr 23, 2011
  17. 15/23 Introduce --sameJon Seymour, Apr 23, 2011
  18. 16/23 miscJon Seymour, Apr 23, 2011
  19. 17/23 whitespace fix.Jon Seymour, Apr 23, 2011
  20. 18/23 tests --conflicted.Jon Seymour, Apr 23, 2011
  21. 19/23 rebasing: add testsJon Seymour, Apr 23, 2011
  22. 20/23 test: git test cleanups.Jon Seymour, Apr 23, 2011
  23. 21/23 Introduce git-atomic.Jon Seymour, Apr 23, 2011
  24. 22/23 Introduce git base.Jon Seymour, Apr 23, 2011
  25. 23/23 Introduce support for the git-work command.Jon Seymour, Apr 23, 2011
  26. Peter BaumannApr 23, 2011
  27. Jon SeymourApr 23, 2011
  28. Jon SeymourApr 23, 2011
  29. Jon SeymourApr 24, 2011

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.