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

Re: Possible minor bug in Git

From
Torsten Bögershausen <tboegi@web.de>
Date
Feb 2, 2019, 06:38 UTC
Message-ID
<20190202063828.4kjtdmrsm7g4eyg3@tb-raspi4>
In-Reply-To
<CAHYHVPJdbEOPaAoyAhOtJ+wkeXZdowAVqe1Tp_=LOKzuuzA+wQ@mail.gmail.com>
On Fri, Feb 01, 2019 at 10:02:50AM +0200, Angelo Melonas wrote:
Show 71 quoted lines
> Hi Torsten,
>
> Thank you so much for getting back to me.
>
> Unfortunately, I believe there is a misunderstanding, as I may have
> explained what I found to be a possible bug incorrectly.
> The file that is originally added (and then later modified) is never
> renamed or moved.
> As you will see below, when a user attempts to add a file, but with
> the incorrect case, the Git CLI responds the same way it would if a
> file was correctly added (i.e., by displaying nothing).
> However, in the above case, when you enter "git status", you find that
> the file was never actually added, and remains unstaged.
> A possible solution to this can be a simple error message similar to
> attempting to add a file with its name misspelt.
>
> Using your example, I have illustrated this in the text below:
>
>     C:\Example>git init
>     Initialized empty Git repository in C:/Example/.git/
>
>     C:\Example>echo AAA > AA.txt
>
>     C:\Example>git add AA.txt
>
>     C:\Example>git commit -m AA.txt
>     [master (root-commit) d550af0] AA.txt
>      1 file changed, 1 insertion(+)
>      create mode 100644 AA.txt
>
>     C:\Example>echo BB > AA.txt
>
>     C:\Example>git status
>     On branch master
>     Changes not staged for commit:
>       (use "git add <file>..." to update what will be committed)
>       (use "git checkout -- <file>..." to discard changes in working directory)
>
>             modified:   AA.txt
>
>     no changes added to commit (use "git add" and/or "git commit -a")
>
>     C:\Example>git add Aa.txt
>
>     C:\Example>git status
>     On branch master
>     Changes not staged for commit:
>       (use "git add <file>..." to update what will be committed)
>       (use "git checkout -- <file>..." to discard changes in working directory)
>
>             modified:   AA.txt
>
>     no changes added to commit (use "git add" and/or "git commit -a")
>
>     C:\Example>git add A.txt
>     fatal: pathspec 'A.txt' did not match any files
>
>     C:\Example>git add AA.txt
>
>     C:\Example>git status
>     On branch master
>     Changes to be committed:
>       (use "git reset HEAD <file>..." to unstage)
>
>             modified:   AA.txt
>
> I am looking forward to hearing from you again.
>
> Kind regards,
> Angelo Melonas
>
Actually yes, you can call this a minor bug.

Does anybody want to work on it ? May be as a first-time-Git contribution ?

Previous: Angelo MelonasNext: Giuseppe Crinò
Message 5 of 10 in “Possible minor bug in Git”
  1. Angelo MelonasJan 31, 2019
  2. Angelo MelonasJan 31, 2019
  3. Torsten BögershausenJan 31, 2019
  4. Angelo MelonasFeb 1, 2019
  5. Torsten BögershausenFeb 2, 2019
  6. Giuseppe CrinòFeb 6, 2019
  7. Johannes SchindelinFeb 7, 2019
  8. Torsten BögershausenFeb 8, 2019
  9. Philip OakleyFeb 9, 2019
  10. Giuseppe Crino'Feb 10, 2019

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.