From: Phillip Wood <phillip.wood123@gmail.com>
To: Paul Jolly <paul@myitcv.io>, phillip.wood@dunelm.org.uk
Cc: git@vger.kernel.org, Elijah Newren <newren@gmail.com>
Subject: Re: Automatically re-running commands during an interactive rebase or post commit
Date: Mon, 29 May 2023 20:48:53 +0100 [thread overview]
Message-ID: <cc93b0ed-1167-a017-2138-181a490d26e2@gmail.com> (raw)
In-Reply-To: <CACoUkn4TOGi7xojSatEowF0CcFJHJof+F5XR-QtPTL5iznZDKw@mail.gmail.com>
Hi Paul
On 29/05/2023 20:08, Paul Jolly wrote:
> 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?
Sorry, I'd assumed there was a merge-ort command in the same way as
there is a merge-recursive command but it does not exist. I think the
best you can do is run "git merge-recursive" rather than "git merge-ort"
in your script. I've cc'd Elijah in case he has a better suggestion.
Best Wishes
Phillip
> Best,
>
>
> Paul
next prev parent reply other threads:[~2023-05-29 19:49 UTC|newest]
Thread overview: 13+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-05-29 13:38 Automatically re-running commands during an interactive rebase or post commit Paul Jolly
2023-05-29 13:41 ` rsbecker
2023-05-29 14:01 ` Paul Jolly
2023-05-29 16:02 ` Paul Jolly
2023-05-29 17:53 ` Phillip Wood
2023-05-29 19:08 ` Paul Jolly
2023-05-29 19:48 ` Phillip Wood [this message]
2023-05-31 4:14 ` Elijah Newren
2023-06-02 9:57 ` Phillip Wood
2023-06-08 5:11 ` Paul Jolly
2023-05-30 7:22 ` Son Luong Ngoc
2023-05-30 9:44 ` Oswald Buddenhagen
2023-05-30 10:27 ` Paul Jolly
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=cc93b0ed-1167-a017-2138-181a490d26e2@gmail.com \
--to=phillip.wood123@gmail.com \
--cc=git@vger.kernel.org \
--cc=newren@gmail.com \
--cc=paul@myitcv.io \
--cc=phillip.wood@dunelm.org.uk \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).