From 7ce1484636644daf7e0974c17fc0b32581114d2c Mon Sep 17 00:00:00 2001 From: Jan Kratochvil Date: Fri, 10 Nov 2023 22:47:23 +0800 Subject: [PATCH] +bin/vi-git-both-modified --- bin/vi-git-both-modified | 15 +++++++++++++++ 1 file changed, 15 insertions(+) create mode 100755 bin/vi-git-both-modified diff --git a/bin/vi-git-both-modified b/bin/vi-git-both-modified new file mode 100755 index 0000000..8f47892 --- /dev/null +++ b/bin/vi-git-both-modified @@ -0,0 +1,15 @@ +#! /bin/bash +fis="" +for fi in $(git status|sed -n 's/^ both modified: *//p');do + if ! grep -q '^<<<<<<< ' $fi;then + git add $fi + continue + fi + fis="$fis $fi" +done +if [ -z "$fis" ];then + echo done + exit 0 +fi +set -x +exec vim $fis -- 1.8.3.1