Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: unshallow clone for plugin checkout #153

Merged
merged 2 commits into from
May 15, 2023
Merged

Conversation

AntPeixe
Copy link
Contributor

This will unshallow the clone otherwise no checkout can be done for commits older than head.

fixes #151

Copy link
Member

@mamaraddio mamaraddio left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Just a little tip.
Edit lines 43 and 44 and change it with

[[ -n "$git_ref" ]] && {
  git -C "$plugin_dir" pull --unshallow &> /dev/null
  git -C "$plugin_dir" checkout "$git_ref" &> /dev/null || { echo "❌ Failed to checkout $git_ref"; return 13 }
}

This is way more cleaner to read and the double failure message is useless

@AntPeixe
Copy link
Contributor Author

Thanks for the tip, it's done

@AntPeixe AntPeixe requested a review from mamaraddio May 15, 2023 07:00
Copy link
Member

@mamaraddio mamaraddio left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

👍

@mamaraddio mamaraddio merged commit ee62285 into zap-zsh:master May 15, 2023
mamaraddio added a commit that referenced this pull request May 15, 2023
* docs: make it more obvious the image is a video link

* feat: update README (#150)

* feat: update README

* fix: update README with the new video thumbnail

* fix: update README with updated uninstall text

* fix: unshallow clone for plugin checkout (#153)

* fix: unshallow clone for plugin checkout

fixes #151

* refactor: address PR comments

---------

Co-authored-by: Matthew Winter <[email protected]>
Co-authored-by: Christian Chiarulli <[email protected]>
Co-authored-by: António Peixe <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

failed to checkout specific commit of plugin
2 participants