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

Re: [PATCHv6 4/6] add tests of commit --fixup

From
Junio C Hamano <gitster@pobox.com>
Date
Oct 27, 2010, 22:35 UTC
Message-ID
<7vk4l3b6wl.fsf@alter.siamese.dyndns.org>
In-Reply-To
<1287689637-95301-5-git-send-email-patnotz@gmail.com>
"Pat Notz" <patnotz@gmail.com> writes:
Show 26 quoted lines
> diff --git a/t/t3900-i18n-commit.sh b/t/t3900-i18n-commit.sh
> index 256c4c9..f9a26c8 100755
> --- a/t/t3900-i18n-commit.sh
> +++ b/t/t3900-i18n-commit.sh
> @@ -133,4 +133,31 @@ do
>  	'
>  done
>  
> +test_commit_autosquash_flags () {
> +	H=$1
> +	flag=$2
> +	test_expect_success "commit --$flag with $H encoding" '
> +		git config i18n.commitencoding $H &&
> +		git checkout -b $H-$flag C0 &&
> +		echo $H >>F &&
> +		git commit -a -F "$TEST_DIRECTORY"/t3900/$H.txt &&
> +		test_tick &&
> +		echo intermediate stuff >>G &&
> +		git add G &&
> +		git commit -a -m "intermediate commit" &&
> +		test_tick &&
> +		echo $H $flag >>F &&
> +		git commit -a --$flag HEAD~1 $3 &&
> +		E=$(git cat-file commit '$H-$flag' | \
> +			sed -ne "s/^encoding //p") &&
> +		test "z$E" = "z'$H'" &&
A few nits.
 - You don't need that backslash after the pipe (with the vertical bar at
   the end of line the shell knows you haven't finished your statement).
 - I am not sure what the single-quote around only the last two occurrence
   of $H are about.  H and flag are used as part of branch name, so I
   suspect you do not need any quoting around them, no?
Previous: Pat NotzNext: Pat Notz
Message 8 of 11 in “[PATCHv6 0/6] Add commit message options for rebase --autosquash”
  1. Pat NotzOct 21, 2010
  2. 1/6 commit: helper methods to reduce redundant blocks of codePat Notz, Oct 21, 2010
  3. 2/6 pretty.c: teach format_commit_message() to reencode the outputPat Notz, Oct 21, 2010
  4. Junio C HamanoOct 27, 2010
  5. 3/6 commit: --fixup option for use with rebase --autosquashPat Notz, Oct 21, 2010
  6. Junio C HamanoOct 27, 2010
  7. 4/6 add tests of commit --fixupPat Notz, Oct 21, 2010
  8. Junio C HamanoOct 27, 2010
  9. 5/6 commit: --squash option for use with rebase --autosquashPat Notz, Oct 21, 2010
  10. Junio C HamanoOct 27, 2010
  11. 6/6 add tests of commit --squashPat Notz, Oct 21, 2010

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.