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

git/libgit2: set CheckoutForce on branch strategy #589

Merged
merged 2 commits into from
Feb 22, 2022

Commits on Feb 22, 2022

  1. git/libgit2: set CheckoutForce on branch strategy

    In the recent update from libgit2 1.1.x to 1.3.x, something seems to
    have changed upstream. Resulting in the clone of a branch ending up
    with a semi-bare file system state (in other words: without any files
    present in the directory).
    
    This commit patches the clone behavior to set the `CheckoutForce`
    strategy as `CheckoutOption`, which mitigates the issue.
    
    In addition, test cases have been added to ensure we do not run into
    this again by asserting the state of the branch after cloning.
    
    Signed-off-by: Hidde Beydals <[email protected]>
    hiddeco committed Feb 22, 2022
    Configuration menu
    Copy the full SHA
    15c064a View commit details
    Browse the repository at this point in the history
  2. git/libgit2: assert proper test of default branch

    If there is no configuration set for `init.defaultBranch`, it does not
    return an error but an empty string. We now take this into account so
    we do not overwrite the default, and make the default `master` to match
    with libgit2 defaults.
    
    In addition, some comments have been added to not get confused about
    what commits we are checking against.
    
    Signed-off-by: Hidde Beydals <[email protected]>
    hiddeco committed Feb 22, 2022
    Configuration menu
    Copy the full SHA
    eff40e2 View commit details
    Browse the repository at this point in the history