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

Re: StGIT and conflicts

From
Karl Hasselström <kha@treskal.com>
Date
May 25, 2007, 12:45 UTC
Message-ID
<20070525124558.GA11096@diana.vm.bytemark.co.uk>
In-Reply-To
<b0943d9e0705250300o419d1d7ld175b273dbed2429@mail.gmail.com>
On 2007-05-25 11:00:33 +0100, Catalin Marinas wrote:
Show 15 quoted lines
> On 24/05/07, Karl Hasselström <kha@treskal.com> wrote:
>
> > The current behavior of StGIT is to not use the index for
> > conflicts like git does. What advantages does this have that are
> > great enough to motivate a deviation from the git behavior?
>
> I don't think there are any advantages in deviating from the git
> behaviour, only that when I first implementing it, git didn't have
> any smarter behaviour and I used diff3 (or other external merger,
> which can be used right now as well).
>
> I'm not sure if git-diff still works when there are conflicts in the
> index. The current stg behaviour is to reset the index to the base
> of the patch and a stg diff would show the diff (including the
> config markers) to the base. I find this quite handy.

To be honest, I'm not very well versed in how git handles merge conflicts -- with all the nontrivial projects I touch, I use StGIT for everything that can conflict. :-) Grepping for "conflict" in the user manual brings up a very good explanation, though; and to answer your question: it seems to work very well indeed, surprise surprise. You can make the diff show anything you want, including between the patch base and the working dir. Though, as the manual points out, the most important view is probably between index and working tree, which shows you just the not-yet-fixed conflicts.

Step one would be to simply stop messing with the index after merges, and just let "stg resolved" mean "git add".

Step two (somewhat more ambitious) might be to stop trying to hide the index, by providing a flag to "stg refresh" to make it refresh only what's in the index, and not everything -- that is, to make it do what "git commit" does when _not_ given the -a flag. And once we stop hiding the index, there's no point in having StGIT commands to do things like add, remove, and so on -- we could just use what git provides.

-- 
Karl Hasselström, kha@treskal.com
      www.treskal.com/kalle
Previous: Catalin Marinas
Message 3 of 3 in “StGIT and conflicts”
  1. Karl HasselströmMay 24, 2007
  2. Catalin MarinasMay 25, 2007
  3. Karl HasselströmMay 25, 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.