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

Re: [RFC] Introduce git-xxdiff to invoke xxdiff for manual conflict resolution

From
Junio C Hamano <junkio@cox.net>
Date
Aug 4, 2006, 00:01 UTC
Message-ID
<7v64h9pdx4.fsf@assigned-by-dhcp.cox.net>
In-Reply-To
<11546492331601-git-send-email-martin@catalyst.net.nz>
Martin Langhoff <martin@catalyst.net.nz> writes:
Show 16 quoted lines
> diff --git a/git-xxdiff.sh b/git-xxdiff.sh
> new file mode 100755
> index 0000000..d562ab2
> --- /dev/null
> +++ b/git-xxdiff.sh
> @@ -0,0 +1,38 @@
> +#!/bin/sh
> +
> +USAGE='<path>'
> +SUBDIRECTORY_OK=No
> +. git-sh-setup
> +
> +FILE=$1
> +MERGE_HEAD=`git rev-parse MERGE_HEAD`
> +
> +# Sanity checks

We can have unmerged index without MERGE_HEAD (for example, think "rebase --merge" or "am -3"); drop check for that and instead check for stage 2 ("ours") for the path.

	git cat-file blob :2:$FILE
Can xxdiff take more than one file pairs?

If so you might want to list unmerged paths (ls-files -u) and iterate through it when no paths are given from the command line. If not, you might want to take the first unmerged path when no paths are given from the command line.

> +xxdiff -wbB --show-merged-pane --merged-filename $FILE~merged $FILE~HEAD $FILE~MERGE_HEAD
> \ No newline at end of file
;-).
Previous: Martin LanghoffNext: Martin Langhoff (CatalystIT)
Message 2 of 9 in “[RFC] Introduce git-xxdiff to invoke xxdiff for manual conflict resolution”
  1. Martin LanghoffAug 3, 2006
  2. Junio C HamanoAug 4, 2006
  3. Martin Langhoff (CatalystIT)Aug 4, 2006
  4. [RFC] Introduce git-xxdiff to invoke xxdiff for manual conflict resolution - take 2Martin Langhoff, Aug 4, 2006
  5. Alex RiesenAug 4, 2006
  6. Martin LanghoffAug 5, 2006
  7. Martin Langhoff (CatalystIT)Aug 4, 2006
  8. Jeff KingAug 4, 2006
  9. Martin Langhoff (CatalystIT)Aug 4, 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.