Re: [PATCH 0/3] tag: keep the message file in case ref transaction fails
- From
Eric Sunshine <sunshine@sunshineco.com>
- Date
- May 17, 2023, 17:52 UTC
- Message-ID
- <CAPig+cSxbsqqQ1qDAw5Mo_yT5u6wzgoXSvPc51=RDVV-EBPhvg@mail.gmail.com>
- In-Reply-To
- <20230517173709.GA535409@coredump.intra.peff.net>
On Wed, May 17, 2023 at 1:40 PM Jeff King <peff@peff.net> wrote:
Show 10 quoted lines
> One thing I wondered is whether the obvious command to retry: > > git tag -F .git/TAG_EDITMSG foo > > would work, or if we would overwrite the file before it is read. But it > does work, which is good. I wonder if we: > > b. want to tell users that is a good way to recover (though maybe that > is a rabbit hole of details as one subtlety is that it will be > overwritten by an unrelated tag command).
If that route is taken, then making the advice worktree-friendly would probably be a good idea:
git tag -F $(git rev-parse --git-path TAG_EDITMSG) foo