Updated diff-sha.sh
This commit is contained in:
		
							parent
							
								
									6ea66cc129
								
							
						
					
					
						commit
						61fac4da4b
					
				| @ -193,7 +193,7 @@ else | |||||||
|         PREVIOUS_SHA=$(git rev-parse $(git branch -r --sort=-committerdate | head -1) 2>&1) && exit_status=$? || exit_status=$? |         PREVIOUS_SHA=$(git rev-parse $(git branch -r --sort=-committerdate | head -1) 2>&1) && exit_status=$? || exit_status=$? | ||||||
|       fi |       fi | ||||||
|     else |     else | ||||||
|       PREVIOUS_SHA=$GITHUB_EVENT_PULL_REQUEST_BASE_SHA && exit_status=$? || exit_status=$? |       PREVIOUS_SHA=$(git merge-base --fork-point "$CURRENT_BRANCH" "$TARGET_BRANCH" 2>&1) && exit_status=$? || exit_status=$? | ||||||
|     fi |     fi | ||||||
| 
 | 
 | ||||||
|     if [[ -z "$PREVIOUS_SHA" || "$PREVIOUS_SHA" == "$CURRENT_SHA" ]]; then |     if [[ -z "$PREVIOUS_SHA" || "$PREVIOUS_SHA" == "$CURRENT_SHA" ]]; then | ||||||
| @ -217,7 +217,9 @@ else | |||||||
|         echo "Fetching $depth commits..." |         echo "Fetching $depth commits..." | ||||||
| 
 | 
 | ||||||
|         # shellcheck disable=SC2086 |         # shellcheck disable=SC2086 | ||||||
|         git fetch -u --progress $EXTRA_ARGS --depth="$depth" origin +refs/heads/"$CURRENT_BRANCH":refs/remotes/origin/"$CURRENT_BRANCH" |         git fetch -u --progress $EXTRA_ARGS --deepen="$depth" origin +refs/heads/"$CURRENT_BRANCH":refs/remotes/origin/"$CURRENT_BRANCH" | ||||||
|  |         # set up branch tracking | ||||||
|  |         git branch --track "$GITHUB_REF" origin/"$CURRENT_BRANCH" 2>/dev/null || true | ||||||
| 
 | 
 | ||||||
|         if [[ $depth -gt $max_depth ]]; then |         if [[ $depth -gt $max_depth ]]; then | ||||||
|           echo "::error::Unable to locate a common ancestor between $TARGET_BRANCH and $CURRENT_SHA" |           echo "::error::Unable to locate a common ancestor between $TARGET_BRANCH and $CURRENT_SHA" | ||||||
|  | |||||||
		Loading…
	
	
			
			x
			
			
		
	
		Reference in New Issue
	
	Block a user
	 Tonye Jack
						Tonye Jack