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

[PATCH 2/3] t1007-hash-object: add tests for verbose hash-object

From
Alexander Kuleshov <kuleshovmail@gmail.com>
Date
Mar 2, 2015, 13:55 UTC
Message-ID
<1425304523-14425-1-git-send-email-kuleshovmail@gmail.com>
In-Reply-To
<1425304500-14117-1-git-send-email-kuleshovmail@gmail.com>
Signed-off-by: Alexander Kuleshov <kuleshovmail@gmail.com>
---
 t/t1007-hash-object.sh | 11 +++++++++++
 1 file changed, 11 insertions(+)
diff --git a/t/t1007-hash-object.sh b/t/t1007-hash-object.sh
index f83df8e..fa957bf 100755
--- a/t/t1007-hash-object.sh
+++ b/t/t1007-hash-object.sh
@@ -201,4 +201,15 @@ test_expect_success 'corrupt tag' '
 	test_must_fail git hash-object -t tag --stdin </dev/null
 '
 
+filename="hello"
+hello_sha1_verbose="$hello_sha1\t$filename"
+
+test_expect_success 'hash-object verbose' '
+	test "$(echo $hello_sha1_verbose)" = "$(git hash-object -v $filename)"
+'
+
+test_expect_success "Can't use --verbose and --stdin together" '
+	echo example | test_must_fail git hash-object --verbose --stdin
+'
+
 test_done
-- 
2.3.1.167.g7f4ba4b.dirty
Previous: Alexander KuleshovNext: Alexander Kuleshov
Message 2 of 4 in “hash-object: add -v/--verbose option”
  1. 1/3 hash-object: add -v/--verbose optionAlexander Kuleshov, Mar 2, 2015
  2. 2/3 t1007-hash-object: add tests for verbose hash-objectAlexander Kuleshov, Mar 2, 2015
  3. 3/3 Documentation/git-hash-object.txt: add verbose option for hash-objectAlexander Kuleshov, Mar 2, 2015
  4. Michael J GruberMar 2, 2015

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.