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

Re: [PATCH] show_one_mergetag: print non-parent in hex form.

From
brian m. carlson <sandals@crustytoothpaste.net>
Date
Mar 1, 2020, 02:01 UTC
Message-ID
<20200301020119.GE9290@camp.crustytoothpaste.net>
In-Reply-To
<pull.568.git.1582981677312.gitgitgadget@gmail.com>
On 2020-02-29 at 13:07:57, Harald van Dijk via GitGitGadget wrote:
Show 5 quoted lines
> From: Harald van Dijk <harald@gigawatt.nl>
> 
> When a mergetag names a non-parent, which can occur after a shallow
> clone, its hash was previously printed as raw data. Print it in hex form
> instead.
Seems like a good idea.
Show 18 quoted lines
> +test_expect_success GPG 'log --graph --show-signature for merged tag in shallow clone' '
> +	test_when_finished "git reset --hard && git checkout master" &&
> +	git checkout -b plain-shallow master &&
> +	echo aaa >bar &&
> +	git add bar &&
> +	git commit -m bar_commit &&
> +	git checkout --detach master &&
> +	echo bbb >baz &&
> +	git add baz &&
> +	git commit -m baz_commit &&
> +	git tag -s -m signed_tag_msg signed_tag_shallow &&
> +	hash=$(git rev-parse HEAD) &&
> +	git checkout plain-shallow &&
> +	git merge --no-ff -m msg signed_tag_shallow &&
> +	git clone --depth 1 --no-local . shallow &&
> +	test_when_finished "rm -rf shallow" &&
> +	git -C shallow log --graph --show-signature -n1 plain-shallow >actual &&
> +	grep "tag signed_tag_shallow names a non-parent $hash" actual
I appreciate you computing this value with git rev-parse.
-- 
brian m. carlson: Houston, Texas, US
OpenPGP: https://keybase.io/bk2204
Previous: Harald van Dijk via GitGitGadgetNext: Martin Ågren
Message 2 of 5 in “show_one_mergetag: print non-parent in hex form.”
  1. show_one_mergetag: print non-parent in hex form.Harald van Dijk via GitGitGadget, Feb 29, 2020
  2. brian m. carlsonMar 1, 2020
  3. Martin ÅgrenMar 1, 2020
  4. Harald van DijkMar 1, 2020
  5. Martin ÅgrenMar 2, 2020

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.