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

Fix submodule handling when the current branch is named after a tag #113371

Merged
merged 1 commit into from
Jul 6, 2023

Commits on Jul 5, 2023

  1. Fix submodule handling when the current branch is named after a tag

    If:
    1. The current branch has the same name as git tag, and
    2. The current branch is set to track a remote other than `origin`, and
    3. We try to update a submodule
    
    then we'll get the following error:
    ```
    ; x c
    Updating submodule src/doc/reference
    remote: Total 0 (delta 0), reused 0 (delta 0), pack-reused 0
    fatal: 'personal' does not appear to be a git repository
    fatal: Could not read from remote repository.
    ```
    
    The problem is that 1. causes `git symbolic-ref --short HEAD` to try and disambiguate the branch
    from the tag using `heads/branch-name`, which breaks a previous workaround for a bug in `git
    submodule update` that uses the wrong remote.
    
    Adapt the workaround to strip `heads/` from the output.
    jyn514 committed Jul 5, 2023
    Configuration menu
    Copy the full SHA
    6c7017f View commit details
    Browse the repository at this point in the history