Skip to content

Commit f29cda6

Browse files
committed
git-synchronizer: allow for ref names with a dot in them
We should not use them in regexes verbatim... Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de>
1 parent 8ee0be9 commit f29cda6

1 file changed

Lines changed: 2 additions & 1 deletion

File tree

git-synchronizer.sh

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -156,8 +156,9 @@ for ref in $(echo "$remote_branches" |
156156
uniq)
157157
do
158158
echo "$todo" | grep " $ref$" > /dev/null 2>&1 && continue
159+
quoted_ref="$(echo "$ref" | sed 's/\./\\&/g')"
159160
sha1="$(echo "$remote_branches" |
160-
sed -n "s|^[^ ]* \([^ ]*\) [^ ]* $ref$|\1|p" |
161+
sed -n "s|^[^ ]* \([^ ]*\) [^ ]* $quoted_ref$|\1|p" |
161162
sort |
162163
uniq)"
163164
sha1=$(eval get_common_fast_forward $sha1)

0 commit comments

Comments
 (0)