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

Conflict editing

From
Johannes Schindelin <johannes.schindelin@gmx.de>
Date
Mar 4, 2007, 12:43 UTC
Message-ID
<Pine.LNX.4.63.0703041339350.22628@wbgn013.biozentrum.uni-wuerzburg.de>
Hi,

I often end up with conflicts, and I just want to edit the conflicting files, one after another. To make this easier, I wrote a script (yes, no builtin) to start the editor with the files having conflicts.

Of course, this script is dumb and has no way to edit files whose names contain spaces, it will choke on conflicting symlinks and it does not update the index after editing the files (to avoid erroneous updating). As usual, it did not really receive more testing than absolutely necessary.

Ciao, Dscho

-- snipsnap -- #!/bin/sh # # Copyright (c) 2006, Shawn O. Pearce # # Cleanup unreachable files and optimize the repository.

USAGE='' SUBDIRECTORY_OK=Yes . git-sh-setup cd_to_toplevel

test -z "$(git ls-files --unmerged)" && echo "Nothing to do" && exit

git ls-files --unmerged | cut -b51- | grep ' ' >/dev/null && die "filenames contain spaces"

"${VISUAL:-${EDITOR:-vi}}" $(git ls-files --unmerged | cut -b51- | uniq)
Next: Johannes Schindelin
Message 1 of 11 in “Conflict editing”
  1. Johannes SchindelinMar 4, 2007
  2. Johannes SchindelinMar 4, 2007
  3. Theodore TsoMar 4, 2007
  4. Martin LanghoffMar 4, 2007
  5. Theodore TsoMar 5, 2007
  6. Martin LanghoffMar 5, 2007
  7. Shawn O. PearceMar 4, 2007
  8. Brian GernhardtMar 5, 2007
  9. Johannes SchindelinMar 5, 2007
  10. Uwe Kleine-KönigMar 5, 2007
  11. Brian GernhardtMar 5, 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.