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

Re: What's happening to the index

From
Matthieu Moy <matthieu.moy@grenoble-inp.fr>
Date
Jun 29, 2016, 07:43 UTC
Message-ID
<vpqoa6kh23u.fsf@anie.imag.fr>
In-Reply-To
<5772FF0E.6030503@micron.com>
"Andy Falanga (afalanga)" <afalanga@micron.com> writes:
Show 6 quoted lines
> The strange thing now is, after the script exits, I then call "git 
> fetch" in the recipe.  I can see from the output of make that the remote 
> db is fetched.  However, when I call "git show 
> origin/rpm:path/to/rpm_build_num" from the makefile I get the *previous* 
> number.  Yet, as soon as the make process exits, I call "git show 
> origin/rpm:path/to/rpm_build_num" and it shows the correct number!

My bet would be that you are running the commands in two different repositories. Try running

  pwd && git show origin/rpm:path/to/rpm_build_num

In the Makefile and after make completes, and check that pwd returns the same thing. Also, to avoid getting the issue you previously had, try

  cd $(pwd) && pwd && git show origin/rpm:path/to/rpm_build_num
too.
> Is there some sort of strange file caching that happening
> when make starts that, although the local db is updated, I don't get
> what I'm after?

Git can keep information either in RAM, hence not shared between git invocations (so running git within or outside the Makefile wouldn't matter), or on disk, but then inside or outside the Makefile doesn't matter either.

-- 
Matthieu Moy
http://www-verimag.imag.fr/~moy/
Previous: Andy Falanga (afalanga)Next: David
Message 4 of 5 in “What's happening to the index”
  1. Andy Falanga (afalanga)Jun 28, 2016
  2. Matthieu MoyJun 28, 2016
  3. Andy Falanga (afalanga)Jun 28, 2016
  4. Matthieu MoyJun 29, 2016
  5. DavidJul 3, 2016

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.