Git Mailing List Archive mirror
 help / color / mirror / Atom feed
From: Paul Jolly <paul@myitcv.io>
To: phillip.wood@dunelm.org.uk
Cc: git@vger.kernel.org
Subject: Re: Automatically re-running commands during an interactive rebase or post commit
Date: Mon, 29 May 2023 20:08:07 +0100	[thread overview]
Message-ID: <CACoUkn4TOGi7xojSatEowF0CcFJHJof+F5XR-QtPTL5iznZDKw@mail.gmail.com> (raw)
In-Reply-To: <198eea19-fc40-de0c-8854-3cdc94925f32@gmail.com>

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

  reply	other threads:[~2023-05-29 19:08 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 [this message]
2023-05-29 19:48       ` Phillip Wood
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=CACoUkn4TOGi7xojSatEowF0CcFJHJof+F5XR-QtPTL5iznZDKw@mail.gmail.com \
    --to=paul@myitcv.io \
    --cc=git@vger.kernel.org \
    --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).