git/list[1] front-page[2] threads[3] people[4] search[5] about
 

Re: What's cooking in git.git (Sep 2022, #02; Fri, 9)

From
Jeff King <peff@peff.net>
Date
Sep 12, 2022, 00:41 UTC
Message-ID
<Yx6AKkWKa5sCUJzM@coredump.intra.peff.net>
In-Reply-To
<xmqqo7vlh1pc.fsf@gitster.g>
On Sun, Sep 11, 2022 at 05:32:31PM -0700, Junio C Hamano wrote:
Show 24 quoted lines
> > I just want to double-check that the plan is to merge this to master as
> > noted above. I had thought you would revert jk/unused-annotation and
> > that I'd just re-roll it. I'm perfectly happy with either, but just
> > didn't want to add more confusion by posting that re-roll. ;)
> 
> Sorry for making a confusing move.  The thing is, the first patch in
> this two-patch series builds on top of your "UNUSED(var)" thing.
> Its patch text depends on "UNUSED(var)" being there, and it explains
> why we ended up using the "var UNUSED" syntax over "UNUSED(var)".
> It of course is the right thing to do because "UNUSED(var)" was
> already in 'next' when it was written.
> 
> We could rewrite it to pretend as if "UNUSED(var)" never happened;
> we prefer to keep experiments that turned out to be dead end and we
> are unlikely to revisit out of our history.  But I think it makes
> sense in this case to leave a record in our history that we consider
> that "UNUSED(var)" is a superiour implementation that we would have
> used and the only reason why we do not use it for now is Coccinelle.
> 
> So, 'next' has the merge of 'jk/unused-annotation' reverted, but when
> 'ab/unused-annotation' was merged, the revert was reverted ;-).
> When it graduates to 'master', it will pull 'jk/unused-annotation'
> along with it and keeps "UNUSED(var)" in our history, but at its
> tip, what we end up using will be "var UNUSED".

OK, I am happy with that. When I rewrote the initial commit to go to "var UNUSED" instead of "UNUSED(var)", I was going to explain the alternatives in the commit message. But doing it this way is less work for me. ;)

I've converted my further annotation patches to "var UNUSED" already, so those will appear that way from the get-go. If we ever go back to UNUSED(var), the initial ones are just a "git revert" away, but the new ones will have to be converted manually. It's not too bad to do it with a clever use of sed/perl, though.

-Peff
Previous: Junio C Hamano
Message 6 of 6 in “What's cooking in git.git (Sep 2022, #02; Fri, 9)”
  1. Junio C HamanoSep 9, 2022
  2. en/remerge-diff-fixesElijah Newren, Sep 10, 2022
  3. Junio C HamanoSep 10, 2022
  4. Jeff KingSep 11, 2022
  5. Junio C HamanoSep 12, 2022
  6. Jeff KingSep 12, 2022

Read the whole thread, see it on lore, or plain text.

$ cat FOOTERMessages come from the public archive at lore.kernel.org/git, fetched every hour. The front page is chosen and written each morning by an AI editor and can be wrong; the threads themselves are the record. About and API. For agents: an MCP server at https://gitlist.dev/mcp, and any thread, story or person page as Markdown by adding .md to its URL (or sending Accept: text/markdown). Details in /llms.txt.