[MacPorts] #64050: sync over git: rebase with autostash only if fast-forwarding fails
MacPorts
noreply at macports.org
Tue Nov 23 19:59:27 UTC 2021
#64050: sync over git: rebase with autostash only if fast-forwarding fails
--------------------------+--------------------
Reporter: chrstphrchvz | Owner: (none)
Type: enhancement | Status: new
Priority: Normal | Milestone:
Component: base | Version: 2.7.1
Keywords: | Port:
--------------------------+--------------------
I sync the ports tree from GitHub (wiki:howto/SyncingWithGit). By default,
`port sync` relies on `git pull --rebase --autostash`, which touches every
uncommitted file—even when a fast-forward is possible. This causes ports
with local changes to be reparsed even if no remote changes were made.
Maybe my workflow is not very good, but I tend to have a lot of
uncommitted/unmerged changes, and I believe it would be nice if `port
sync` tried to fast-forward before trying to rebase with autostash, so
that parsing ports can take seconds rather than minutes to complete.
I think this should be possible, but to my knowledge `git pull` doesn’t
have an option to try fast forwarding before rebasing with autostash using
a single command, and so the trick seems to be figuring out how to do so
using exactly one command for `macports::GetVCSUpdateCmd` to return. Maybe
put it all in a string for `bash -c`?
--
Ticket URL: <https://trac.macports.org/ticket/64050>
MacPorts <https://www.macports.org/>
Ports system for macOS
More information about the macports-tickets
mailing list