Thread (13 messages) read the whole thread 13 messages, 6 authors, 2023-06-08

Re: Automatically re-running commands during an interactive rebase or post commit

From: Paul Jolly <hidden>
Date: 2023-05-29 19:08:23

Hi Phillip,

Many thanks for your response.
I think you could get around this by using a script that wraps "git
rebase". Something like
That's an interesting thought. I will give this some thought, thank you.
I did wonder if you could use a custom merge driver (see man
gitattributes) for the file with the checksums but that would be run
before all the other files have been merged. Another alternative might
be to use a custom merge strategy that runs "git merge-ort" and then
cleans up the conflicts in the checksum file. You can specify a custom
strategy by naming your script "git-merge-foo" and passing "-s foo" to
git rebase.
This approach with a custom merge strategy is very much closer to what
feels like it will work best.

I just gave this a try, and I seem to be falling at somewhat the first hurdle.

I have a custom merge strategy working, insofar as I've written a
script that is being called. The script simply wraps "git merge-ort"
as you suggest.

But I can't seem to work out how to actually run 'git merge-ort'! I've
tried 'git merge -s "$@"' in my wrapper script, but doing so my custom
strategy behaves differently to if I use no strategy, which seems to
suggest I'm doing something wrong.

Do you have any suggestions/pointers?

Best,


Paul
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help