contrib: make editmerge look for merge markers at the beginning of the line
authorChristian Delahousse <cdelahousse@fb.com>
Fri, 16 Oct 2015 15:01:42 -0700
changeset 26743 58b04a538caa
parent 26742 bec1a579ebc4
child 26744 21e50e36de02
contrib: make editmerge look for merge markers at the beginning of the line This fix adds a caret to the start of the regex looking for merge markers. This avoids the issue arises when you've real merge conflicts in a file that tests for the existance of merge markers in test output. Editmerge will not open on the fake/tested merge markers because they'll be indented in.
contrib/editmerge
--- a/contrib/editmerge	Fri Oct 09 21:44:54 2015 -0700
+++ b/contrib/editmerge	Fri Oct 16 15:01:42 2015 -0700
@@ -13,7 +13,7 @@
 FILE=$1
 
 getlines() {
-  grep -n "<<<<<<" $FILE | cut -f1 -d:
+  grep -n "^<<<<<<" $FILE | cut -f1 -d:
 }
 
 # editor preference loosely based on https://mercurial-scm.org/wiki/editor