git-sync icon indicating copy to clipboard operation
git-sync copied to clipboard

WIP: Add support for extra-sync - extra branches to sync with.

Open jamezpolley opened this issue 6 years ago • 2 comments

(this builds on my earlier PR - let's land that and then I'll rebase this on top of it. I'm only creating this now in order to give a preview of where this is going)

I've got a repo of text files that I edit from many machines.

Each machine has its own branch that only it edits. For that branch, the usual sync operation should always succeed.

I also try to keep origin/master up-to-date with whichever branch was edited most recently. Sometimes this fails - usually because I've made conflicting edits on two machines while they were offline, and so manual intervention is needed to resolve the conflict.

This change adds this ability into git-sync. It looks for a list of extra branches to sync with in branch.$branch_name.extra-sync. If this is found, the same sync logic is used for each of those in turn, after the main upstream branch is synced

jamezpolley avatar Jan 01 '19 07:01 jamezpolley

If no extra-sync option is specified, the behaviour here should be identical to the existing script.

Which means that this needs to split into two changes: one to incorporate the "-q"s I've added, and a second to add extra-sync

I'm thinking that the -qs should be toggleable; either default-on (to preserve current behaviour) or default-off (to make the output more human-useful), but with the option to flip to the other setting (because even if you don't normally want to see all the output, sometimes it's handy)

jamezpolley avatar Jan 01 '19 07:01 jamezpolley

Hi James,

I just noticed we never got back to this. Your earlier changes did indeed land, you may rebase now ;)

More seriously, I still think this would be a great contribution. Let me know if you intend to pick up on this!

simonthum avatar Feb 11 '22 14:02 simonthum