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

Re: git > 2.10.1 fails to update index on macOS 10.14.5

From
JSJonathan Smalls <jon@smalls.rocks>
Date
Mar 24, 2020, 01:36 UTC
Message-ID
<414a10db-18d4-0c19-eafe-fbb85811fffe@smalls.rocks>
In-Reply-To
<20200323231351.GD6499@camp.crustytoothpaste.net>
On 3/23/20 19:13, brian m. carlson wrote:
> What exactly do you mean by "doesn't recognize any file changes"?  Can
> you tell us what commands you ran and what you expected to see, and what
> you actually saw?  That information would be helpful for us to track
> down what might be happening.
In git-2.22:
I would write a change to a file. Running `git status` would return that 
the working directory was clean, and `git commit .` would show that 
there were no changes to commit.
	However I could target a specific file like `git commit test.txt`, and 
git would successfully recognize the change, and write the commit. I 
could also run `git reset --hard`, and that would update the index to 
reflect the change that I had just written rather than resetting the 
working directory to match the latest commit. If I ran `git reset 
--hard` a second time, that command would reset the working directory.

In normal operation, I would expect to `git status` to recognize a change in a file once it had already been added to the index. I would expect `git commit .` to commit all files in the current directory, and subdirectories without having to specify their file names. I would expect `git reset --hard` to revert the working directory to match the latest commit the first time.

In git-2.25
I would write a change to a file. `git status` would continue to show 
that the working directory was clean, but I was not longer able to 
target a particular file to force a commit. `git reset --hard` had no 
effect, and still showed that the working directory was clean without 
resetting the working directory.
	To successfully commit a file I would have to run `git rm --cached 
test.txt` to target a file, and then `git add test.txt` for git to 
update its index, and recognize the change.
I would expect the same normal operation in git-2.25.
> 
> Also, are you using any specific workflow or tool that might be related?
> Are you using an editor integration or GUI, and if so, does this happen
> without that editor integration or GUI as well?

I use git on the command line, so there should be no external interference with its normal function.

Previous: brian m. carlsonNext: brian m. carlson
Message 3 of 5 in “git > 2.10.1 fails to update index on macOS 10.14.5”
  1. Jonathan SmallsMar 23, 2020
  2. brian m. carlsonMar 23, 2020
  3. Jonathan SmallsMar 24, 2020
  4. brian m. carlsonMar 24, 2020
  5. Jonathan SmallsMar 30, 2020

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.