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

Re: gitignore design

From
Johannes Sixt <j.sixt@viscovery.net>
Date
Jul 29, 2011, 13:31 UTC
Message-ID
<4E32B637.1030201@viscovery.net>
In-Reply-To
<m3pqktql6s.fsf@localhost.localdomain>
Am 7/29/2011 15:19, schrieb Jakub Narebski:
> Are you sure?  It seems to work as I thought it would.
> [...]
> Notice that change to 'bar' didn't get comitted.

Of course, it didn't get committed, you promised not to change it, so why should git commit it?

However, your example does not show the dangerous part. git-commit is not dangerous. But you might run into trouble when git has to merge content into the worktree or index; in this case, git may decide to just read the file instead of to unpack an object - assuming that the content on disk is identical to the unpacked object (it will do so because with --assume-unchanged you promised not to change the file). If you broke your promise, you get to what you deserve ;)

No code reference, sorry, because I'm just parrotting what I've read elsewhere on the list, for example, http://thread.gmane.org/gmane.comp.version-control.git/146082/focus=146353

-- Hannes
Previous: Jakub NarebskiNext: Jakub Narebski
Message 13 of 20 in “gitignore design”
  1. llucianfJul 29, 2011
  2. Ferry HubertsJul 29, 2011
  3. llucianfJul 29, 2011
  4. Ferry HubertsJul 29, 2011
  5. llucianfJul 29, 2011
  6. Jakub NarebskiJul 29, 2011
  7. llucianfJul 29, 2011
  8. Jakub NarebskiJul 29, 2011
  9. Ferry HubertsJul 29, 2011
  10. Jakub NarebskiJul 29, 2011
  11. Johannes SixtJul 29, 2011
  12. Jakub NarebskiJul 29, 2011
  13. Johannes SixtJul 29, 2011
  14. Jakub NarebskiJul 29, 2011
  15. Nguyen Thai Ngoc DuyJul 30, 2011
  16. Piotr KrukowieckiJul 30, 2011
  17. Nguyen Thai Ngoc DuyJul 30, 2011
  18. Piotr KrukowieckiJul 30, 2011
  19. Clemens BuchacherJul 30, 2011
  20. Philip OakleyJul 29, 2011

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.