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

Re: [PATCHv2 1/2] t5520-pull: Add testcases showing spurious conflicts from git pull --rebase

From
Johannes Sixt <j6t@kdbg.org>
Date
Aug 8, 2010, 21:36 UTC
Message-ID
<201008082336.18270.j6t@kdbg.org>
In-Reply-To
<1281294286-27709-2-git-send-email-newren@gmail.com>
On Sonntag, 8. August 2010, Elijah Newren wrote:
Show 5 quoted lines
> +test_expect_success 'setup for detecting upstreamed changes' '
> +	mkdir src &&
> +	(cd src &&
> +	 git init &&
> +	 for i in $(seq 1 10); do echo $i; done > stuff &&

We don't have seq on Windows. The sequence is short enough to list it explicitly.

Show 6 quoted lines
> +	 git add stuff &&
> +	 git commit -m "Initial revision"
> +	) &&
> +	git clone src dst &&
> +	(cd src &&
> +	 perl -pi -e s/5/43/ stuff &&

perl -pi is no better than sed -i; it does not work on Windows because it tries to remove an open file (and that is a no-go on Windows). perl -pi.bak does work though.

Show 5 quoted lines
> +	 git commit -a -m "5->43" &&
> +	 perl -pi -e s/6/42/ stuff &&
> +	 git commit -a -m "Make it bigger" &&
> +	 correct=$(git rev-parse HEAD)
> +	) &&
This assignment at the end of the subshell is pointless.
> +test_expect_success 'setup for avoiding reapplying old patches' '
> +	(cd dst &&
> +	 (git rebase --abort || true) &&
Perhaps:
	test_might_fail git rebase --abort &&
but I'm not sure whether that's the intended use of test_might_fail.
> +	 git reset --hard origin/master
> +	) &&
...
> +test_expect_failure 'git pull --rebase does not reapply old patches' '
> +	(cd dst &&
> +	 (git pull --rebase || true) &&
Ditto.
Show 5 quoted lines
> +	 test 1 = $(find .git/rebase-apply -name "000*" | wc -l)
> +	)
> +'
> +
>  test_done
-- Hannes
Previous: Ævar Arnfjörð BjarmasonNext: Jonathan Nieder
Message 6 of 8 in “[PATCHv2 0/2] Fix spurious conflicts with pull --rebase”
  1. Elijah NewrenAug 8, 2010
  2. 1/2 t5520-pull: Add testcases showing spurious conflicts from git pull --rebaseElijah Newren, Aug 8, 2010
  3. Ævar Arnfjörð BjarmasonAug 8, 2010
  4. Elijah NewrenAug 8, 2010
  5. Ævar Arnfjörð BjarmasonAug 8, 2010
  6. Johannes SixtAug 8, 2010
  7. Jonathan NiederAug 8, 2010
  8. 2/2 pull --rebase: Avoid spurious conflicts and reapplying unnecessary patchesElijah Newren, Aug 8, 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.