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

Re: [PATCH v2 4/4] buitin-status: Add tests for submodule summary

From
Junio C Hamano <gitster@pobox.com>
Date
Mar 13, 2008, 18:04 UTC
Message-ID
<7vprtyxzzd.fsf@gitster.siamese.dyndns.org>
In-Reply-To
<47D93875.1050407@viscovery.net>
Johannes Sixt <j.sixt@viscovery.net> writes:
Show 11 quoted lines
> Ping Yin schrieb:
>> +cd sm &&
>> +head=$(git rev-parse --verify HEAD | cut -c1-7) &&
>> +cd ..
>
> I think you can make these three lines into:
>
> test_expect_success 'get short SHA1 of submodule HEAD' '
>
> 	head=$(cd sm && git rev-parse --verify HEAD | cut -c1-7)
> '

"git rev-parse --short=12 --verify HEAD" or whatever minimum length you would want would free you from an ugly "pipe to cut".

Previous: Johannes SixtNext: Ping Yin
Message 7 of 15 in “builtin-status submodule summary”
  1. Ping YinMar 13, 2008
  2. 1/4 git-submodule summary: --for-status optionPing Yin, Mar 13, 2008
  3. 2/4 builtin-status: submodule summary supportPing Yin, Mar 13, 2008
  4. 3/4 builtin-status: configurable submodule summary sizePing Yin, Mar 13, 2008
  5. 4/4 buitin-status: Add tests for submodule summaryPing Yin, Mar 13, 2008
  6. Johannes SixtMar 13, 2008
  7. Junio C HamanoMar 13, 2008
  8. Ping YinMar 13, 2008
  9. Ping YinMar 13, 2008
  10. Johannes SixtMar 13, 2008
  11. Johannes SixtMar 13, 2008
  12. Ping YinMar 13, 2008
  13. Ping YinMar 14, 2008
  14. Junio C HamanoMar 14, 2008
  15. Ping YinMar 14, 2008

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.