From 386a727e9c1db6f925c1190f6b549c1b4b16e82f Mon Sep 17 00:00:00 2001 From: Johannes Schindelin Date: Tue, 9 Mar 2010 17:56:24 +0100 Subject: [PATCH] Add a simple conflict helper Signed-off-by: Johannes Schindelin --- bin/edit-conflicts.sh | 20 ++++++++++++++++++++ 1 file changed, 20 insertions(+) create mode 100644 bin/edit-conflicts.sh diff --git a/bin/edit-conflicts.sh b/bin/edit-conflicts.sh new file mode 100644 index 00000000..d9e46ec5 --- /dev/null +++ b/bin/edit-conflicts.sh @@ -0,0 +1,20 @@ +#!/bin/sh +# +# Copyright (c) 2007 Johannes E. Schindelin +# +# Cleanup unreachable files and optimize the repository. + +USAGE='my-edit-conflicts' +SUBDIRECTORY_OK=Yes +. "$(git --exec-path)"/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" + +opt= +test vi = "${VISUAL:-${EDITOR:-vi}}" && opt="+/<<<<<<<" +"${VISUAL:-${EDITOR:-vi}}" $opt $(git ls-files --unmerged | cut -b51- | uniq) +git add $(git ls-files --unmerged | cut -b51- | uniq) -- 2.11.4.GIT