liquid-labs / liquid-labs/git-toolkit

'determineOriginAndMain' can fail after decolinization

Open
#7 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

bug
Dominant language
Shell
Stars
0
Forks
1
PR merge metrics
No merged PRs in 30d

Description

## Overview

If the `origin` remote has branch `master` and then switches to use `main` as the default branch, then the local view of `origin` branches will contain both as the general fetch/pull process is only additive and does not delete.

## Deliverables

- [ ] In the face of 'multiple main branches', run `git remote update ${origin} --prune` and re-try (and then really give up and throw an exception on the retry if the problem persists).

## Notes

https://stackoverflow.com/questions/36358265/when-does-git-refresh-the-list-of-remote-branches

Contributor guide

No contributing guide indexed for this repository

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Locate the `determineOriginAndMain` function and trace how it handles multiple main branches. Start by reproducing the stale remote-branch state described in the issue, then verify that `git remote update ${origin} --prune` is attempted once and that a persistent conflict raises an exception.

Written by the indexing model from the issue text.

Assessment

Tech stack
git, shell
Domain
cli
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
45/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.