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

Re: [PATCH] docs: include "trace.h" in MyFirstObjectWalk.txt

From
Vinayak Dev <vinayakdev.sci@gmail.com>
Date
Jun 30, 2023, 16:50 UTC
Message-ID
<CADE8NaqEEKx=oYgEnXH0Er8x8HbVay2S7mGtkRyVQXX1ktHQzQ@mail.gmail.com>
In-Reply-To
<xmqqsfa87w9o.fsf@gitster.g>
On Fri, 30 Jun 2023 at 21:55, Junio C Hamano <gitster@pobox.com> wrote:
Hello again, and thanks for replying!
Show 23 quoted lines
> Vinayak Dev <vinayakdev.sci@gmail.com> writes:
>
> > That is a good suggestion, but wouldn't the same argument apply to
> > including trace.h itself? It makes it necessary for the code to work
> > that any API changes must involve changing the included headers.
>
> Exactly.  That is exactly what I meant by "tone down 'defined in X'
> somehow to hint that these details may change".
>
> IOW, it may allow us to "cop out" of the problem to say "You'd add a
> new file like so, and call this API function, and include headers
> necessary to do so.  The codebase may have evolved since this
> tutorial was written, so some details (like names of the API
> functions and in which header files the functions are declared) may
> be different in the code you have."
>
> > Either way, I would be happy to fix my mistake. Should I send out a V2?
>
> Oh, sorry to see you took it that way.  I think the change you sent
> as-is is a fine fix for the immediate problem.  Everything you
> quoted above is "while the issue is fresh on our minds, what are the
> follow-up improvements we can make" material, so there is no "mistake"
> to fix.

That is certainly nice to hear! However, I must admit that I did make a mistake in the patch in that I missed to include "hex.h" down in the file. This is needed because the tutorial uses the function oid_to_hex(), which is defined there. I found this while fixing the code in Emily's branch to which the tutorial points. I have fixed that there, so maybe if you think a V2 would be alright, I would be happy to send it fixing both the problems.

Thanks a lot! Vinayak

Previous: Junio C Hamano
Message 5 of 5 in “docs: include "trace.h" in MyFirstObjectWalk.txt”
  1. docs: include "trace.h" in MyFirstObjectWalk.txtVinayak Dev, Jun 29, 2023
  2. Junio C HamanoJun 29, 2023
  3. Vinayak DevJun 30, 2023
  4. Junio C HamanoJun 30, 2023
  5. Vinayak DevJun 30, 2023

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.