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

Re: [PATCH] Use git-update-ref in scripts.

From
Junio C Hamano <junkio@cox.net>
Date
Sep 28, 2005, 18:17 UTC
Message-ID
<7vk6h1rr9l.fsf@assigned-by-dhcp.cox.net>
In-Reply-To
<Pine.LNX.4.58.0509281007200.3308@g5.osdl.org>
Linus Torvalds <torvalds@osdl.org> writes:
> On Wed, 28 Sep 2005, Junio C Hamano wrote:
>> 
> I don't like doing the diff before-hand, but it looked like the default 
> was to try just one strategy, and avoid the diff in that case.

By 'diff before-hand' I take it to mean the savestate for later rounds to keep the pre-merge state. You are correct that it is not done in a single strategy case, and 'git pull' by default would use only one of Daniel's git-merge-resolve or in the multi-remote case git-merge-octopus, depending on the number of heads being merged. BTW, I decided not to use diff, just in case somebody has binary blob we cannot reproduce with diff and patch.

Show 8 quoted lines
> Actually, my preference would be to have a unconditional simple case
> first. If there's only one possible base, and the trivial merge succeeds
> (ie no three-way merges needed at all, just a single git-read-tree), do
> that part unconditionally.
>
> That actually matches 90% of all merges I do, and I'd be much happier with 
> git-merge if it did that first and if it then does something more complex 
> (including diffs etc) afterwards, I'm much less likely to worry.

Hmph. That sort of makes sense but to make the unconditional simple case really fast it should use read-tree -m -u which _would_ smudge if things do not go well, which implies you need savestate before that which would make it slower -- wouldn't it?

I think using Daniel's git-merge-resolve and nothing else by default would be equivalent of having that unconditional simple case upfront.

Previous: Linus TorvaldsNext: Junio C Hamano
Message 12 of 19 in “Add "git-update-ref" to update the HEAD (or other) ref”
  1. Linus TorvaldsSep 25, 2005
  2. Linus TorvaldsSep 25, 2005
  3. Junio C HamanoSep 25, 2005
  4. Use git-update-ref in scripts.Junio C Hamano, Sep 28, 2005
  5. Linus TorvaldsSep 28, 2005
  6. Junio C HamanoSep 28, 2005
  7. Linus TorvaldsSep 28, 2005
  8. Junio C HamanoSep 28, 2005
  9. Linus TorvaldsSep 28, 2005
  10. Junio C HamanoSep 28, 2005
  11. Linus TorvaldsSep 29, 2005
  12. Junio C HamanoSep 28, 2005
  13. Junio C HamanoSep 28, 2005
  14. Fredrik KuivinenSep 28, 2005
  15. Linus TorvaldsSep 29, 2005
  16. Junio C HamanoSep 25, 2005
  17. Linus TorvaldsSep 26, 2005
  18. Junio C HamanoSep 26, 2005
  19. Linus TorvaldsSep 26, 2005

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.