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

Re: [PATCH] Add a testcase for the safety of pull-policy='pull'.

From
Yann Dirson <ydirson@altern.org>
Date
Feb 28, 2007, 21:48 UTC
Message-ID
<20070228214851.GC4149@nan92-1-81-57-214-146.fbx.proxad.net>
In-Reply-To
<b0943d9e0702271538q32e6a9d5y6ac73adfc4854ab6@mail.gmail.com>
On Tue, Feb 27, 2007 at 11:38:45PM +0000, Catalin Marinas wrote:
Show 8 quoted lines
> >> BTW, push --undo now requires a status --reset beforehand.
> >
> >Oh, I had not noticed that.  Why so ?  It's not like if "push --undo"
> >would lose any valuable data...
> 
> I added it so that one cannot remove the local changes by doing a
> "push --undo" in error. You would have to explicitly ask for local
> changes removing with status --reset.

At least, the message in that case should probably be made better, when undoing to avoid having to resolve a conflict: the message says I cannot undo because I have a conflict, whereas it is the exact reason why I want to undo. Especially, since the conflict markers are now auto-recorded, we could simply allow undo in that case.

Show 8 quoted lines
> >What strikes me most in this case is the difference in behaviour
> >between this type of conflict (conflict marked in index, so needs an
> >operation outside the current scope of stgit to proceed), with a
> >regular stgit conflict that occurs during a push (index clean,
> >conflict info not available to tools written for regular GIT).
> 
> I think this is a valid GIT conflict as the upstream tree re-wrote the
> history and git-pull will trigger a 3-way merge.

I do not discuss the validity of the conflict. I'm just emphasizing that it makes it hard to handle things in stgit, with *any* post-rebase processing being skipped. For now we seem to have nothing critical for that workflow (I'll surely end up with deactivating the orig-base check for pull-policy=pull), but that may cause more trouble later, eg. when implementing transactions.

> If you would always use git-fetch + stgit-rebase, there wouldn't be
> any problem.
Sure, that's why I'm lobbying for this policy to be the default :)
> (BTW, I just added a patch for a 2-way interactive merge as well).

Sounds great - I just had an add/add conflict today on 0.12.1 when trying to play with "resolved -i", and it loudly complained it had no ancestor to play with. Sounds like a perfect usage for 2-way merges.

Best regards,
-- 
Yann.
Previous: Catalin MarinasNext: Yann Dirson
Message 5 of 7 in “Add a testcase for the safety of pull-policy='pull'.”
  1. Add a testcase for the safety of pull-policy='pull'.Yann Dirson, Feb 25, 2007
  2. Catalin MarinasFeb 27, 2007
  3. Yann DirsonFeb 27, 2007
  4. Catalin MarinasFeb 27, 2007
  5. Yann DirsonFeb 28, 2007
  6. Yann DirsonMar 1, 2007
  7. Catalin MarinasMar 6, 2007

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.