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

Re: What's happening to the index

From
AAAndy Falanga (afalanga) <afalanga@micron.com>
Date
Jun 28, 2016, 22:49 UTC
Message-ID
<5772FF0E.6030503@micron.com>
In-Reply-To
<vpq60stuyv5.fsf@anie.imag.fr>
On 06/28/2016 09:17 AM, Matthieu Moy wrote:
Show 22 quoted lines
> "Andy Falanga (afalanga)" <afalanga@micron.com> writes:
>
>> After the line calling increlnum is executed, I often have issues with
>> make unable to spawn the next command because it can't read the current
>> directory info.
> This may happen if you delete the current directory, even if your
> re-create it afterwards. For example:
>
> /tmp/test$ rm -fr /tmp/test && mkdir /tmp/test
> /tmp/test$ touch foo
> touch: cannot touch ‘foo’: No such file or directory
> /tmp/test$ cd /tmp/test
> /tmp/test$ touch foo
> /tmp/test$
>
> This is unrelated from Git, but maybe you asked Git to delete a
> directory (by switching to a branch which doesn't contain a directory
> for example).
>
>> If I do: cd .. && cd -; all is well.
> This is a typical symptom of the issue above.
>

Thank you for the insight: very interesting. After asking another colleague how he solved this issue, I've re-written my increlnum script to, instead of working within my working tree, clone a temporary of this one branch only. Then, it increments the number and pushes back to the origin. Once completed, the temporary clone is deleted.

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! What gives? 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?

Andy
Previous: Matthieu MoyNext: Matthieu Moy
Message 3 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.