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

Re: bug?: stgit creates (unneccessary?) conflicts when pulling

From
CMCatalin Marinas <catalin.marinas@gmail.com>
Date
Mar 3, 2006, 22:07 UTC
Message-ID
<4408BE2A.1060601@gmail.com>
In-Reply-To
<20060303142413.GB16456@diana.vm.bytemark.co.uk>
Karl Hasselström wrote:
Show 11 quoted lines
> On 2006-02-28 22:45:56 +0000, Catalin Marinas wrote:
>>I attached another patch that should work properly. It also pushes
>>empty patches on the stack if they were merged upstream (a 'stg
>>clean' is required to remove them). This is useful for the push
>>--undo command if you are not happy with the result.
> 
> It appears to work for me. I still had to fix things up manually when
> pulling the uncommit patch though, since you had made a minor change
> in "uncommit.py":
> 
>   Pushing patch "uncommit"...Error: File "stgit/commands/uncommit.py" added in branches but different
Yes, I made some minor modifications (one of them was the copyright).
> Is there a way to make stgit not fall on its face when faced with this
> situation? Surely it ought to be possible to create a merged file with
> conflict markers? (I realize this is harder when there is no common
> ancestor, but these files are 95% identical!)

I've been thinking about this but it's not straight-forward. I tried using /dev/null as the common ancestor but both diff3 and wiggle put the whole file text in the conflict regions. These tools are not smart enough to compare the conflict regions and reduce them.

Another approach would be to have a script that creates the common ancestor only with the common lines between the two files and pass this file as an argument to diff3. This wouldn't probably be that difficult, maybe some combination of diff and sed and apply the result to one of the files to remove the diff'ed lines.

Catalin
Previous: Karl HasselströmNext: Shawn Pearce
Message 12 of 22 in “bug?: stgit creates (unneccessary?) conflicts when pulling”
  1. Karl HasselströmFeb 27, 2006
  2. Sam VilainFeb 27, 2006
  3. Catalin MarinasFeb 27, 2006
  4. Catalin MarinasFeb 28, 2006
  5. Catalin MarinasFeb 28, 2006
  6. Catalin MarinasFeb 28, 2006
  7. Chuck LeverMar 1, 2006
  8. Catalin MarinasMar 1, 2006
  9. Karl HasselströmMar 3, 2006
  10. Catalin MarinasMar 3, 2006
  11. Karl HasselströmMar 3, 2006
  12. Catalin MarinasMar 3, 2006
  13. Shawn PearceFeb 27, 2006
  14. Catalin MarinasMar 1, 2006
  15. Shawn PearceMar 1, 2006
  16. Catalin MarinasMar 1, 2006
  17. Shawn PearceMar 1, 2006
  18. Catalin MarinasMar 9, 2006
  19. Junio C HamanoMar 9, 2006
  20. Catalin MarinasMar 10, 2006
  21. Junio C HamanoMar 11, 2006
  22. Shawn PearceMar 10, 2006

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.