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

remove '--depth 1' from git clone when 'commit' is specified in git_config #3871

Merged

Conversation

branfosj
Copy link
Member

@branfosj branfosj commented Oct 26, 2021

(created using eb --new-pr)

fixes #3870

The --depth 1 breaks any git download where we want to switch to a commit, as that commit will not be in the git history that we've downloaded.

edit (by @boegel): for reference: this problem was introduced in commit 956fa9c which is a part of #3795 that was merged for EasyBuild v4.4.2

@branfosj branfosj added this to the 4.5.0 (next release) milestone Oct 26, 2021
@ocaisa
Copy link
Member

ocaisa commented Oct 26, 2021

Rather than remove this optimisation, can't we just add an or not commit to the condition?

@branfosj
Copy link
Member Author

Rather than remove this optimisation, can't we just add an or not commit to the condition?

Yes, that makes sense. Though it has to be and not commit, which I've done in 0aae4d7.

@branfosj branfosj changed the title remove '--depth 1' from git clone remove '--depth 1' from git clone when 'commit' specified Oct 26, 2021
@ocaisa
Copy link
Member

ocaisa commented Oct 26, 2021

LGTM, going in! Thanks @branfosj

@ocaisa ocaisa merged commit e8e70a0 into easybuilders:develop Oct 26, 2021
@branfosj branfosj deleted the 20211026104834_new_pr_bnCPLsBukV branch October 26, 2021 11:15
@boegel
Copy link
Member

boegel commented Oct 26, 2021

@branfosj How difficult would it be to add a test that triggers the bug being fixed here?

@boegel
Copy link
Member

boegel commented Oct 26, 2021

@branfosj We're actually testing this already, but the bug was left unnoticed because we're using the latest available commit, so using --depth 1 was not a problem... Test fixed in #3872

@boegel boegel changed the title remove '--depth 1' from git clone when 'commit' specified remove '--depth 1' from git clone when 'commit' is specified in git_config Oct 27, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

error: pathspec ... did not match any file(s) known to git
3 participants