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

Re: Q. about usage of notes

From
Stefan Naewe <stefan.naewe@atlas-elektronik.com>
Date
Aug 31, 2010, 10:15 UTC
Message-ID
<4C7CD65F.10509@atlas-elektronik.com>
In-Reply-To
<4C7CD5B8.20602@atlas-elektronik.com>
On 8/31/2010 12:13 PM, Stefan Naewe wrote:
Show 23 quoted lines
> 
> But if I do:
> 
> $ touch file ; git add file ; git commit -m"add file"
> 
> and then 
> 
> $ for n in 1 2 3; do git rm file; git commit -m"rm file"; done
>  
> I get:
> 
> rm 'file'
> [master 5b24511] rm file
>  0 files changed, 0 insertions(+), 0 deletions(-)
>  delete mode 100644 file
> fatal: pathspec 'file' did not match any files
> # On branch master
> nothing to commit (working directory clean)
> fatal: pathspec 'file' did not match any files
> # On branch master
> nothing to commit (working directory clean)
> 
> I don't get 4 commits. That's the part I don't understand :-(
Just to be clear:

Of course I do understand why I don't get 4 commits here - I just don't understand why I get a commit for every 'git notes remove' even if there's nothing to remove.

Stefan
-- 
----------------------------------------------------------------
/dev/random says: This tagl ineh asto oman yfou rlet terw ords.
Previous: Stefan NaeweNext: Michael J Gruber
Message 4 of 16 in “Q. about usage of notes”
  1. Stefan NaeweAug 31, 2010
  2. Johan HerlandAug 31, 2010
  3. Stefan NaeweAug 31, 2010
  4. Stefan NaeweAug 31, 2010
  5. [RFC] notes: avoid recommitting identical treesMichael J Gruber, Aug 31, 2010
  6. Jeff KingAug 31, 2010
  7. Michael J GruberAug 31, 2010
  8. Junio C HamanoAug 31, 2010
  9. Michael J GruberAug 31, 2010
  10. Jeff KingAug 31, 2010
  11. Michael J GruberAug 31, 2010
  12. Junio C HamanoAug 31, 2010
  13. Johan HerlandAug 31, 2010
  14. Johan HerlandAug 31, 2010
  15. 1/2 notes: Don't create (empty) commit when removing non-existing notesJohan Herland, Aug 31, 2010
  16. 2/2 notes.h: Extend remove_note to return the SHA1 of the removed note, if anyJohan Herland, Aug 31, 2010

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.