Conflict editing

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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)
-
To unsubscribe from this list: send the line "unsubscribe git" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html

[Index of Archives]     [Linux Kernel Development]     [Gcc Help]     [IETF Annouce]     [DCCP]     [Netdev]     [Networking]     [Security]     [V4L]     [Bugtraq]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux SCSI]     [Fedora Users]