mirror of
				https://github.com/zulip/zulip.git
				synced 2025-11-03 21:43:21 +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)"
 | 
					remote_url="$(git config remote."$remote".url)"
 | 
				
			||||||
repo_fq="$(echo "$remote_url" | perl -lne 'print $1 if (
 | 
					repo_fq="$(echo "$remote_url" | perl -lne 'print $1 if (
 | 
				
			||||||
    m, ^ git\@github\.com:
 | 
					    m, ^ git\@github\.com:
 | 
				
			||||||
         ([^/]+ / [^/]+)
 | 
					         ([^/]+ / [^/]+?)
 | 
				
			||||||
         (\.git)?
 | 
					         (?:\.git)?
 | 
				
			||||||
       $ ,x )' | sed 's/.git$//')"
 | 
					       $ ,x )')"
 | 
				
			||||||
 | 
					
 | 
				
			||||||
if [ -z "$repo_fq" ]; then
 | 
					if [ -z "$repo_fq" ]; then
 | 
				
			||||||
    # We're pretty specific about what we expect the URL to look like;
 | 
					    # We're pretty specific about what we expect the URL to look like;
 | 
				
			||||||
 
 | 
				
			|||||||
		Reference in New Issue
	
	Block a user