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

Add out-of-sync subcommand #4

Open
ErichDonGubler opened this issue Jun 15, 2023 · 0 comments
Open

Add out-of-sync subcommand #4

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

Comments

@ErichDonGubler
Copy link
Owner

ErichDonGubler commented Jun 15, 2023

I'd really like to be able to triage local work for not yet being sync'd with upstream or push remotes. I want a subcommand called out-of-sync that will do it for me!

  1. For each local branch, determine whether it is "out of sync":
    1. Get the hash of the local, upstream, and push refs' commits, where applicable, probably using something like git rev-parse.
    2. If there's only a local commit, then
  2. Let all hashes associated with branches determined to be "out of sync" from the previous step be called $branches.
  3. If $branches is empty, exit with a return status of 0.
  4. Otherwise, run the equivalent of git-glimpse select $branches, and exit with a return status of 0.

This seems to overlap slightly with tools like brandon-rhodes/uncommitted, though they focus on crawling filesystems for repositories and indicating that something is out-of-sync. Here, we only focus on a single repository, like all other subcommands.

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

No branches or pull requests

1 participant