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

Re: Documentation/MyFirstObjectWalk: add #include "trace.h" to use trace_printf()

From
Emily Shaffer <nasamuffin@google.com>
Date
Jun 29, 2023, 16:35 UTC
Message-ID
<CAJoAoZnVAe3kvUdPZmanbKffG7cx3Tc-==H4+FH=L5qQP2smEg@mail.gmail.com>
In-Reply-To
<CAJoAoZ=OEfsgkqsag926tH4GEuafX26A09SGZ1vR1uLh2W_4TA@mail.gmail.com>
On Thu, Jun 29, 2023 at 9:33 AM Emily Shaffer <nasamuffin@google.com> wrote:
Show 21 quoted lines
>
> On Thu, Jun 29, 2023 at 9:06 AM Vinayak Dev <vinayakdev.sci@gmail.com> wrote:
> >
> > Hey there!
> > I was looking through Documentation/MyFirstObjectWalk.txt, and upon
> > building the branch containing the given code, I find that I get the
> > error that C99 does not allow implicit function declaration where
> > trace_printf() is encountered. However, upon including trace.h the
> > error disappears, and the build proceeds just fine.
> >
> > I did put DEVELOPER=1 in config.mak before building, but it doesn't
> > seem to work.
> >
> > Is the error pointing to a problem, or am I doing something wrong?
> > If it is the former, I would be very happy to send a patch fixing this.
>
> Yeah, it's almost certainly stale in MyFirstObjectWalk - there was
> very recently a patch to clean up some headers which probably were
> implicitly including trace.h when I wrote this walkthrough. Patches
> totally welcome - and if you were working from the reference code in
> https://github.com/nasamuffin/git/tree/myfirstrevwalk

bah, wrong link, the tutorial points to branch `revwalk` instead of `myfirstrevwalk`, but the offer stands :)

Show 8 quoted lines
> and it's on your
> way to rebase and fix that too, I'm happy to update my branch
> accordingly too. (If you weren't, don't worry about doing the extra
> work, though.)
>
> >
> > Thanks a lot!
> > Vinayak
Previous: Emily ShafferNext: Vinayak Dev
Message 3 of 10 in “Documentation/MyFirstObjectWalk: add #include "trace.h" to use trace_printf()”
  1. Vinayak DevJun 29, 2023
  2. Emily ShafferJun 29, 2023
  3. Emily ShafferJun 29, 2023
  4. Vinayak DevJun 29, 2023
  5. Emily ShafferJun 29, 2023
  6. Vinayak DevJun 30, 2023
  7. Vinayak DevJun 30, 2023
  8. Junio C HamanoJun 29, 2023
  9. Emily ShafferJun 29, 2023
  10. Junio C HamanoJun 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.