Skip to content

error: unknown option `--initial-branch=master' with git version 2.25.1 #1969

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

Closed
aryairani opened this issue May 17, 2021 · 6 comments · Fixed by #1985
Closed

error: unknown option `--initial-branch=master' with git version 2.25.1 #1969

aryairani opened this issue May 17, 2021 · 6 comments · Fixed by #1985
Assignees
Milestone

Comments

@aryairani
Copy link
Contributor

aryairani commented May 17, 2021

In #1834 we added this flag to suppress a warning that appeared in the newest versions of git, but it's not backwards-compatible with even fairly recent versions of git, which will instead exit with an error.

This came up on a digital ocean box running Ubuntu 20.04.1 LTS.

Possible solutions:

  • Revert Tests: explicit branch name in git init #1834 and live with the warnings
  • Find a way to disable or suppress the warnings and revert Tests: explicit branch name in git init #1834
  • Programmatically run git --version, parse the result, and issue different commands depending on the outcome
  • Use a git library rather than a git executable to manipulate the repo; I don't know whether there are any such suitable libraries, but I'd start by investigating gitlib. The good news is that as of v2, we are really only committing one file now, which means less work with the git library; but I suppose we want to preserve whatever README.md or other supplemental files a publisher has stored in their repo.
  • Stop using Git 😁
@aryairani aryairani added this to the M2 milestone May 17, 2021
@aryairani
Copy link
Contributor Author

@pchiusano
Copy link
Member

I'd say reverting that change and living with the warnings is okay for M2, if that's the easiest thing, and then one of the other options is better for the beta.

@aryairani
Copy link
Contributor Author

/cc @ceedubs

@ceedubs
Copy link
Contributor

ceedubs commented May 17, 2021

Sorry for the trouble. I don't really have capacity to help with a change at the moment, but I would have no heartburn about reverting the change for now. At some point relying on a global git version might be a problem that we want to address in the various distributions. Or maybe at some point with the new code base format git won't be needed at all?

@aryairani
Copy link
Contributor Author

@ceedubs No worries (it seemed like a good idea at the time) and thanks for the input.

Yes, at some point git won't be needed at all, because we'll want our own transfer protocol (inspired by git-pack) instead of shipping around full databases anyway; or some other efficient thing.

@pchiusano
Copy link
Member

For M2 we're just going to revert this and people will see this annoying warning until it's fixed in a more robust way.

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 a pull request may close this issue.

3 participants