Open Nemo157 opened 5 years ago
(For now I'm working around this with an alias abs = absorb -b origin/HEAD
which should cover most of my uses correctly)
hmm, very interesting. just to make sure i understand - that commit tree you mentioned, it's a linear sequence? you have travis
checked out right now, but you also have local branches that are descendants of travis
, so git-absorb hides those branches from the commit stack and there's nothing to commute into.
let me noodle on this a bit. i think you have at least two (non-mutually-exclusive) suggestions that are interesting here:
travis
branch, we should be able to infer the default push remote's default branch and maybe the base should default to that. i've written a lot of weird push/pull default manipulating code in a past project that i can probably reuse herethat commit tree you mentioned, it's a linear sequence? you have
travis
checked out right now, but you also have local branches that are descendants oftravis
, so git-absorb hides those branches from the commit stack and there's nothing to commute into.
Yep
I have the current commit tree in my repository
I have changed the
.travis.yml
file and staged it, which should be absorbed into37b490a
, runninggit-absorb -v -n
givesBecause it has hidden commits from
min-version
, a downstream branch from the one I'm currently fixing up, there are no commits available to absorb the change into. Deletingmin-version
and runninggit absorb -v -n
again gives:I'm not sure of the best solution here to support all usecases, I think personally what I would want is for
git-absorb
to walk down the first parent line from the current commit until it encounters any branch (local or remote) and hide commits from that point, you might notice I don't use a localmaster
branch so the current behaviour of only hiding local branches would fail to correctly identify the point at which to stop anyway.(EDIT: Sorry, accidentally submitted this with an old issue I was writing before I managed to debug where this was actually going wrong)