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

Don't add versions ignored by git #67

Merged
merged 2 commits into from
Jul 5, 2020
Merged

Don't add versions ignored by git #67

merged 2 commits into from
Jul 5, 2020

Conversation

klausenbusk
Copy link
Contributor

@klausenbusk klausenbusk commented Jul 3, 2020

autoupdate would panic as git add exit with a non-zero exit status if
the path is ignored.

Fix #58


This hasn't been tested, but the dirty fix was tested (https://github.com/klausenbusk/tools/compare/4268b20...5054f34), this is mostly a refactor of the dirty fix. Edit see: #67 (comment)

util/git.go Outdated Show resolved Hide resolved
@klausenbusk
Copy link
Contributor Author

klausenbusk commented Jul 5, 2020

Tested with getPackages() hard-coded to return a/agility.json:

2020/07/05 19:54:22 a/agility.json: run /usr/bin/git checkout 0.1.0-docs -f
2020/07/05 19:54:22 a/agility.json: /home/foobar/Hentet/cdnjs/cdnjs: run /usr/bin/git check-ignore --quiet --no-index ajax/libs/agility/0.1.0-docs
2020/07/05 19:54:22 a/agility.json: /home/foobar/Hentet/cdnjs/cdnjs: run /usr/bin/git check-ignore --quiet --no-index ajax/libs/agility/0.1.0-docs/
2020/07/05 19:54:22 a/agility.json: /home/foobar/Hentet/cdnjs/cdnjs/ajax/libs/agility/0.1.0-docs is ignored by git; aborting

@tc80 tc80 requested a review from xtuc July 5, 2020 20:19
tc80
tc80 previously approved these changes Jul 5, 2020
util/git.go Outdated Show resolved Hide resolved
util/git.go Show resolved Hide resolved
autoupdate would panic as `git add` exit with a non-zero exit status if
the path is ignored.

Fix #58
@klausenbusk
Copy link
Contributor Author

@tc80 both issue should be fixed now.

@tc80 tc80 merged commit 1928a3c into cdnjs:master Jul 5, 2020
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.

autoupdate tries to add ignored files and panic
2 participants