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

Re: [PATCH] t5541: Improve push test

From
Junio C Hamano <gitster@pobox.com>
Date
Dec 9, 2013, 22:10 UTC
Message-ID
<xmqq61qxwu8f.fsf@gitster.dls.corp.google.com>
In-Reply-To
<201312092103.29047.tboegi@web.de>
Torsten Bögershausen <tboegi@web.de> writes:
Show 6 quoted lines
> The old log-line looked like this:
>  + 9d498b0...8598732 master -> master (forced update)
> And the new one like this:
>    9d498b0..8598732  master -> master
>
> - Loosen the grep pattern by not demanding "(forced update)"

Hmm, what is the reason for the change the output? The output this piece is testing is the result of this:

	git push origin master:retsam
	echo "change changed" > path2 &&
	git commit -a -m path2 --amend &&
	# push master too; this ensures there is at least one '"'push'"' command to
	# the remote helper and triggers interaction with the helper.
	test_must_fail git push -v origin +master master:retsam >output 2>&1'

This is run inside test_repo_clone, which has /smart/test_repo.git as its origin, which in turn has 'master' branch (and nothing else).

It
 - pushes master to another branch retsam;
 - amends its 'master';
 - attempts to push the updated master to force-update master, and
   also retsam without forcing.  The latter needs to be forced to
   succeed, and that is why we expect it to fail.
If the output from the push process says
  + 9d498b0...8598732 master -> master (forced update)
  ! [rejected]        master -> retsam (non-fast-forward)
  error: failed to push some refs to '../test_repo_copy/'

I think that is a good thing to do, no? After all, that is what we show with Git native transports.

Is this patch merely matching a test to a broken behaviour of some sort? Puzzled...

Previous: Torsten BögershausenNext: Torsten Bögershausen
Message 2 of 3 in “t5541: Improve push test”
  1. t5541: Improve push testTorsten Bögershausen, Dec 9, 2013
  2. Junio C HamanoDec 9, 2013
  3. Torsten BögershausenDec 11, 2013

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.