Allow passing in rev-sets to git sync
waylon-brown opened this issue · comments
Description of the bug
It looks like git sync
is all-or-nothing, with no options to control which commits/branches you're syncing.
It would be nice to be able to pass in a rev-set so that I can do something like git sync 'stack()'
and/or pass in a commit to sync a subtree. This would be nice for performance (for my repo, git sync
takes roughly 10min) plus to allow myself to keep some commits stale.
Though is the idea that we should just git sw main && git pull --rebase && git move -s <subtree commit> -d main
in this case?
EDIT: It looks like maybe this is actually supported, but the docs just need to be updated.
Expected behavior
No response
Actual behavior
No response
Version of rustc
No response
Automated bug report
No response
Version of git-branchless
No response
Version of git
No response
What version of brachless do you have installed? I ask because sync
already does this, at least back to v0.6.0 (current release is v0.7.1). Perhaps you have an old version installed?
❯ git sync -h
'sync' is aliased to 'branchless sync'
Move any local commit stacks on top of the main branch
Usage: git-branchless sync [OPTIONS] [REVSETS]...
Arguments:
[REVSETS]... The commits whose stacks will be moved on top of the main branch. If no commits are provided, all draft commits will be synced
Options:
...
I mentioned this in the edit, but I realized after that this is supported and the docs just need to be updated :)
The Wiki at https://github.com/arxanas/git-branchless/wiki/Command:-git-sync is not meant to be exhaustive, but feel free to add a section explaining how to pass revsets to git sync
.