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

fatal: ambiguous argument "": unknown revision or path not in the working tree. #61

Open
nikromen opened this issue Mar 28, 2023 · 2 comments

Comments

@nikromen
Copy link

This commit that allows configuring the different name of main branch does not have some default value. If no default_branch is specified in dist_git.conf then SRC_BRANCH expands to empty string which leads to this error:

Creating new module branch 'f37' for 'nikromen/test-that-dist-git-builds-from-forks-work-1679990637.4999745/hello'...
fatal: ambiguous argument '': unknown revision or path not in the working tree.
Use '--' to separate paths from revisions, like this:
'git <command> [<revision>...] -- [<file>...]'
fatal: not a valid object name: 'master'
ERROR: Branch nikromen/test-that-dist-git-builds-from-forks-work-1679990637.4999745/hello f37 could not be created
/usr/share/dist-git/mkbranch: line 151: popd: directory stack empty

some check like if default_branch is None then SRC_BRANCH="master" would be handy

@xsuchy
Copy link
Contributor

xsuchy commented Mar 29, 2023

some check like if default_branch is None then SRC_BRANCH="master" would be handy

I would argue for "main" as a default, but otherwise +1

@FrostyX
Copy link
Contributor

FrostyX commented Mar 29, 2023

In dist-git-1.16, the default was master, so if the default is going to be main now, we should probably mention it somewhere.

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

No branches or pull requests

3 participants