dropbox / dropbox/git-rbr

Ignore, or warn softer, when a ref that'll be left behind is a remote-tracking branch

Open
#4 0 comments 0 reactions 0 assignees View on GitHub
Dominant language
Python
Stars
16
Forks
3
PR merge metrics
No merged PRs in 30d

Description

In general we're super careful not to do anything where we don't 100% understand what we're doing and what the user might expect, and in particular we balk when the relationships between the ref we're operating on and all the other related refs are in a situation we don't explicitly understand.

One situation that we currently don't have a provision for -- so we safely refuse to do anything -- but probably should support is when a ref we're going to leave behind is a remote-tracking branch `refs/remotes/...`. Example error message:
```
$ git rbr
Warning: Some refs based on branch 'docs' are not its descendants in the
Git "upstream" metadata! This means that a recursive rebase won't touch them,
and will leave them behind atop the old version of the commits we rewrite.

Specifically:
These refs are not branches:
refs/remotes/me/docs

Fix with 'git branch -u' aka '--set-upstream-to', and examine the situation
with 'git branch -vv'.

Or to proceed anyway, pass '--orphan' to 'git rbr' to skip this check.
```

I think it'd be fine to just proceed in this situation. Maybe print a one-line warning, preferably at the end so the user is most likely to see it.

Contributor guide

No contributing guide indexed for this repository

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.