mirror of
https://github.com/zulip/zulip.git
synced 2025-10-28 18:43:52 +00:00
push-to-pull-request: Fix regex usage in parsing remote.
This replaces ad4617c95 with a different fix for the same issue:
instead of stripping the `.git` off separately, we can just correct
the regex, using `+?` to fix our stepping in a classic regex pitfall.
This commit is contained in:
@@ -28,9 +28,9 @@ fi
|
||||
remote_url="$(git config remote."$remote".url)"
|
||||
repo_fq="$(echo "$remote_url" | perl -lne 'print $1 if (
|
||||
m, ^ git\@github\.com:
|
||||
([^/]+ / [^/]+)
|
||||
(\.git)?
|
||||
$ ,x )' | sed 's/.git$//')"
|
||||
([^/]+ / [^/]+?)
|
||||
(?:\.git)?
|
||||
$ ,x )')"
|
||||
|
||||
if [ -z "$repo_fq" ]; then
|
||||
# We're pretty specific about what we expect the URL to look like;
|
||||
|
||||
Reference in New Issue
Block a user