Skip to content

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

@nikromen

Description

@nikromen

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions