-
Notifications
You must be signed in to change notification settings - Fork 787
git: checkout.validate should set to branch only if both branch and hash are empty #1507
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
Conversation
…and hash are empty
@GaikwadPratik thanks for looking into this. Please add some tests to avoid future regressions. |
Hi @pjbgf, added couple of unit tests and comments in the code for easy understanding. Can you please re-review? |
Bumps [github.com/ProtonMail/go-crypto](https://github.com/ProtonMail/go-crypto) from 1.1.6 to 1.2.0. - [Release notes](https://github.com/ProtonMail/go-crypto/releases) - [Commits](ProtonMail/go-crypto@v1.1.6...v1.2.0) --- updated-dependencies: - dependency-name: github.com/ProtonMail/go-crypto dependency-version: 1.2.0 dependency-type: direct:production update-type: version-update:semver-minor ... Signed-off-by: dependabot[bot] <support@github.com>
e.g., the pattern `/a*/**` in `.gitignore` should not match a file `ab` in the project root. Fix a broken test that was enforcing the incorrect behavior. Fixes: Issue #154
this func could fail silently and couldn't be catch at higher level
remove unused result parameter and dead code
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@GaikwadPratik please squash your commits and name them in line with the contributing guidelines.
You can either have a single commit, or split it into two commits, one for the Force/Keep and once for the Branch/Hash check.
This appears to be rebasing of the fork... I'll open a new PR and close this so history stays clean |
@GaikwadPratik that's absolutely fine. For future reference, you can rebase with:
When the branch gets a bit messy, you can always reset it (taking note of the commits you are interested in first), then cherry picking your commits:
However, feel free to just close the PR and create a new one if that's more convenient. |
This would avoid the error condition where if
Hash
is provided onCheckoutOptions
but NOTbranch
and validate is called since per documentation: