git.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* Conflict editing
@ 2007-03-04 12:43 Johannes Schindelin
  2007-03-04 13:29 ` Johannes Schindelin
                   ` (3 more replies)
  0 siblings, 4 replies; 11+ messages in thread
From: Johannes Schindelin @ 2007-03-04 12:43 UTC (permalink / raw)
  To: git

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)

^ permalink raw reply	[flat|nested] 11+ messages in thread

end of thread, other threads:[~2007-03-05 19:27 UTC | newest]

Thread overview: 11+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2007-03-04 12:43 Conflict editing Johannes Schindelin
2007-03-04 13:29 ` Johannes Schindelin
2007-03-04 18:10 ` Theodore Tso
2007-03-04 21:59   ` Martin Langhoff
2007-03-05  4:04     ` Theodore Tso
2007-03-05  4:48       ` Martin Langhoff
2007-03-04 23:40 ` Shawn O. Pearce
2007-03-05  6:25 ` Brian Gernhardt
2007-03-05 11:25   ` Johannes Schindelin
2007-03-05 15:07     ` Uwe Kleine-König
2007-03-05 19:27     ` Brian Gernhardt

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).