mirror of
https://github.com/clearlinux/common.git
synced 2026-05-13 18:44:07 +00:00
pullrebase: skip rebase if current branch is up-to-date
Any attempt at rebasing is unnecessary when the current branch is up-to-date with the remote, so skip the rebase in this case. Signed-off-by: Patrick McCarty <patrick.mccarty@intel.com>
This commit is contained in:
@@ -143,6 +143,10 @@ pullrebase:
|
||||
echo "No commits exist in remote. Continuing."; \
|
||||
exit 0; \
|
||||
fi; \
|
||||
if [ "$$(git rev-list FETCH_HEAD | head -n 1)" = "$$(git rev-list HEAD | head -n 1)" ]; then \
|
||||
echo "Current branch up-to-date. Continuing."; \
|
||||
exit 0; \
|
||||
fi; \
|
||||
echo "Rebasing to origin/master"; \
|
||||
if git status --porcelain | grep -q '^.[^?]'; \
|
||||
then \
|
||||
|
||||
Reference in New Issue
Block a user