X-Git-Url: http://git.jankratochvil.net/?p=nethome.git;a=blobdiff_plain;f=bin%2Fvi-git-both-modified;fp=bin%2Fvi-git-both-modified;h=8f478922242e505fd28e5b368ed995c51422f585;hp=0000000000000000000000000000000000000000;hb=7ce1484636644daf7e0974c17fc0b32581114d2c;hpb=dad452786a850180c4fa2897013bb56a681abfb3 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