Opened 2 years ago

#64050 new enhancement

sync over git: rebase with autostash only if fast-forwarding fails

Reported by: chrstphrchvz (Christopher Chavez) Owned by:
Priority: Normal Milestone:
Component: base Version: 2.7.1
Keywords: Cc:
Port:

Description

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?

Change History (0)

Note: See TracTickets for help on using tickets.