Skip to content
This repository has been archived by the owner on Dec 12, 2024. It is now read-only.

Deduce base fallback from repo's branches #11

Open
ErichDonGubler opened this issue Jul 13, 2023 · 0 comments
Open

Deduce base fallback from repo's branches #11

ErichDonGubler opened this issue Jul 13, 2023 · 0 comments
Labels
enhancement New feature or request good first issue Good for newcomers

Comments

@ErichDonGubler
Copy link
Owner

Right now, git-glimpse determines a base value for subcommands like stack using the following steps:

  1. If --base was specified (is Some), then use that.
  2. Consult glimpse.base in Git configuration. If set, then use that.
  3. Otherwise, use main.

We should add a step between (2) and (3) where we attempt to deduce a mainline branch. Shelling out to git br -l main origin/main master origin/master is likely to be useful, since it will only output the branches that exist in the order specified.

@ErichDonGubler ErichDonGubler added enhancement New feature or request good first issue Good for newcomers labels Jul 13, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
enhancement New feature or request good first issue Good for newcomers
Projects
None yet
Development

No branches or pull requests

1 participant