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

What's happening to the index

From
AAAndy Falanga (afalanga) <afalanga@micron.com>
Date
Jun 28, 2016, 14:30 UTC
Message-ID
<57728A17.3010207@micron.com>
Hi,

I'm using git version 1.8.3.1. I have a process for building RPMs in my repository. The RPMs are versioned using a "build number". In order to maintain uniqueness for this build number, I have stored this number to a file which exists on only a unique branch.

The build process, for an actual release, is intended to be done by branching on a tag. During that process, a BASH script is called with checks out "rpm", fetches the repo from remote, merges with origin/rpm, increments the number and pushes back to origin. It then returns the branch to the original branch in which the script was called. The make recipe looks like this:

release:
     make clean
     cd ../..  && ../tools/increlnum && cd -
     if [[ $(TAG) = ......... ]]; then \
         git checkout -b rpm_build_$(TAG) $(TAG); \
     fi
     make rpm RPM_BUILD_NUM=$(shell git show rpm:./rpm_build_num)

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. Make stops with errors and I'm done. I have the branch name displayed in my PS1 prompt. I've noticed that, when make errors at this point, the branch isn't displayed. It's as if the index has become unstable (or something similar). If I do: cd .. && cd -; all is well.

What is the problem (I'd really like to understand) and what might I do to correct it?

Andy
Next: Matthieu Moy
Message 1 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.