changeset 26743:58b04a538caa

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.
author Christian Delahousse <cdelahousse@fb.com>
date Fri, 16 Oct 2015 15:01:42 -0700
parents bec1a579ebc4
children 21e50e36de02
files contrib/editmerge
diffstat 1 files changed, 1 insertions(+), 1 deletions(-) [+]
line wrap: on
line diff
--- 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