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

Re: [RFC PATCH 2/2] rev-list: add --ours/--theirs options

From
Junio C Hamano <gitster@pobox.com>
Date
Nov 15, 2023, 13:03 UTC
Message-ID
<xmqqo7fvw4lx.fsf@gitster.g>
In-Reply-To
<20231115120417.1327259-2-vegard.nossum@oracle.com>
Vegard Nossum <vegard.nossum@oracle.com> writes:
> Add --ours and --theirs to view the commits from
>
>   $(git merge-base HEAD MERGE_HEAD)..HEAD and
>   $(git merge-base HEAD MERGE_HEAD)..MERGE_HEAD

The range you wrote with "merge-base" would not work well, when there are multiple merge bases between HEAD and MERGE_HEAD.

Just saying
	MERGE_HEAD..HEAD and
	HEAD..MERGE_HEAD
or even simpler, saying
	MERGE_HEAD.. and
	..MERGE_HEAD
would be sufficient, simpler, and more importantly, more correct.
Previous: Vegard Nossum
Message 3 of 3 in “diff: add tests for git diff --merge/--ours/--theirs”
  1. 1/2 diff: add tests for git diff --merge/--ours/--theirsVegard Nossum, Nov 15, 2023
  2. 2/2 rev-list: add --ours/--theirs optionsVegard Nossum, Nov 15, 2023
  3. Junio C HamanoNov 15, 2023

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.