Skip to content

Saving settings screen with repository that does not contain embedded-git-config.json renders repository unusable #780

Closed
@raymond-rebbeck

Description

@raymond-rebbeck

Occurs on latest main branch, git bisect suggests 347b104 is the offending commit.

I am evaluating a move from git-source-control 2.7.1 to a later version. My repository does not yet contain embedded-git-config.json

When I save the settings screen an embedded-git-config.json is generated but my Remote Repository setting is wiped and my underlying repository has .git/config modified such that it is no longer usable. Can no longer pull, fetch, switch branches, etc.

If I do the same but have an embedded-git-config.json there, the Remote Repository is not wiped and the repo is fine. My initial thoughts when this happened was that it might be related to using Microsoft Azure DevOps but seems to not be the case.

Before
Settings
Image

.git/config

[core]
        repositoryformatversion = 0
        filemode = true
        bare = false
        logallrefupdates = true
[remote "origin"]
        url = https://********@dev.azure.com/********/***********/_git/****************
        fetch = +refs/heads/*:refs/remotes/origin/*
[branch "develop"]
        remote = origin
        merge = refs/heads/develop

After
Settings:
Image

.git/config

[core]
        repositoryformatversion = 0
        filemode = true
        bare = false
        logallrefupdates = true

I notice while putting this issue together too that the username is not actually redacted, perhaps an issue with HTTPS remotes. Not enough of a concern for me to raise a separate issue for at this very moment though.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions