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

Re: Segmentation fault with latest git (070c57df)

From
Junio C Hamano <gitster@pobox.com>
Date
Feb 4, 2013, 09:29 UTC
Message-ID
<7vobg04ebe.fsf@alter.siamese.dyndns.org>
In-Reply-To
<7vsj5c4exz.fsf@alter.siamese.dyndns.org>
Junio C Hamano <gitster@pobox.com> writes:
Show 10 quoted lines
> As I understand how the current set-up works:
>
>  * Initially, we do not have foo.o but foo.c.  We automatically
>    build foo.o because it depends on foo.c via the "%.o : %.c" rule,
>    and as a side effect, we also build .depend/foo.o.d file;
>
>  * Then, if any real dependency used to build the existing foo.o
>    that is recorded in .depend/foo.o.d file changes, foo.o gets
>    rebuilt, which would update .depend/foo.o.d again for the next
>    invocation.

This is unrelated to the case you mentioned, but I wonder what happens if you did this:

 * You are on branch 'next', where foo.c includes (perhaps
   indirectly) frotz.h.  Compile and you get foo.o and also the
   dependency recorded for it, "foo.o: foo.c frotz.h", in the
   .depend/foo.o.d file.
 * You check out branch 'master', where foo.c does not include
   frotz.h.  Indeed, the include file does not even exist on the
   branch.

Do we get confused, because Makefile includes the depend file from the previous build, finds that you need foo.c and frotz.h up to date in order to get foo.o, but there is no rule to generate frotz.h?

Previous: Junio C HamanoNext: Jeff King
Message 5 of 13 in “Re: Re: Segmentation fault with latest git (070c57df)”
  1. Jongman HeoFeb 4, 2013
  2. Junio C HamanoFeb 4, 2013
  3. Jeff KingFeb 4, 2013
  4. Junio C HamanoFeb 4, 2013
  5. Junio C HamanoFeb 4, 2013
  6. Jeff KingFeb 4, 2013
  7. Jeff KingFeb 4, 2013
  8. Junio C HamanoFeb 4, 2013
  9. Jonathan NiederFeb 4, 2013
  10. samMay 15, 2013
  11. samMay 15, 2013
  12. Ramkumar RamachandraMay 16, 2013
  13. Ramkumar RamachandraMay 16, 2013

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.