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

possible bug for Git - Git incorrectly recognizes which file has been renamed.

From
TOTomasz Osak <tomasz.osak.80@gmail.com>
Date
Nov 28, 2022, 20:06 UTC
Message-ID
<01e70557-6f54-142c-a98b-f109f69648a3@gmail.com>

What were you doing before the error occurred? (Steps to reproduce the problem) I was doing the exercise "EXERCISE: A VERSIONED TODO APP" from the end of chapter 3 of M. Tsitoar's book "Beginning Git and GitHub":

Create two new files named DONE.txt and WORKING.txt Stage and commit those files Rename WORKING.txt to 'IN PROGRES.txt' Add some text to DONE.txt Stage 'IN PROGRESS.txt' and DONE.txt Unstage DONE.txt Git status You can see the information: renamed DONE.txt -> 'IN PROGRESS.txt' Git commit In the message file the comment is similar: renamed DONE.txt -> 'IN PROGRESS.txt'

What should happen? (Expected behavior) Git status You should see the message: renamed WORKING.txt -> 'IN PROGRESS.txt' Git commit Similarly, in the message file you should see a comment: renamed WORKING.txt -> 'IN PROGRESS.txt'

What happened instead? (Actual behavior) Git status Shows information: renamed DONE.txt -> 'IN PROGRESS.txt' Git commit In the message file also you can see the comment: renamed DONE.txt -> 'IN PROGRESS.txt'

What is the difference between what should happen and what happened? Git incorrectly recognizes which file has been renamed (DONE.txt instead of WORKING.txt).

Other valuable comments: Both files (DONE.txt and WORKING.txt) were empty during the first commit.

Regards
Tomasz Osak

Dziękujemy za wypełnienie zgłoszenia o błędzie Gita! Odpowiedz na następujące pytania, aby pomóc nam zrozumieć problem.

Co robiłeś/-aś zanim pojawił się błąd? (Kroki, aby odtworzyć problem) Wykonywałem ćwiczenie "EXERCISE: A VERSIONED TODO APP" z końca 3. rozdziału książki M. Tsitoara "Beginning Git and GitHub": Create two new files named DONE.txt and WORKING.txt Stage and commit those files Rename WORKING.txt to 'IN PROGRES.txt' Add some text to DONE.txt Stage 'IN PROGRESS.txt' and DONE.txt Unstage DONE.txt Git status Widać informację: zmieniono nazwę DONE.txt -> 'IN PROGRESS.txt' Git commit W pliku message podobnie jest komentarz: zmieniono nazwę DONE.txt -> 'IN PROGRESS.txt'

Co powinno się stać? (Oczekiwane zachowanie) Git status Powinno być widać informację: zmieniono nazwę WORKING.txt -> 'IN PROGRESS.txt' Git commit Podobnie w pliku message powinno być widać komentarz: zmieniono nazwę WORKING.txt -> 'IN PROGRESS.txt'

Co stało się zamiast tego? (Rzeczywiste zachowanie) Git status Pokazuje informację: zmieniono nazwę DONE.txt -> 'IN PROGRESS.txt' Git commit W pliku message widać komentarz: zmieniono nazwę DONE.txt -> 'IN PROGRESS.txt'

Jaka jest różnica między tym, co powinno się stać, a tym, co się stało? Git błędnie rozpoznaje którego pliku nazwę zmieniono (DONE.txt zamiast WORKING.txt).

Inne cenne uwagi: Oba pliki (DONE.txt i WORKING.txt) były puste podczas pierwszego commit.

Przejrzyj resztę zgłoszenia błędu poniżej. Możesz usunąć wiersze, którymi nie chcesz się dzielić.

[Informacje o systemie] wersja gita: git version 2.38.1 cpu: x86_64 no commit associated with this build sizeof-long: 8 sizeof-size_t: 8 shell-path: /bin/sh uname: Linux 6.0.9-200.fc36.x86_64 #1 SMP PREEMPT_DYNAMIC Wed Nov 16 17:50:45 UTC 2022 x86_64 informacje o kompilacji: gnuc: 12.2 informacje o bibliotece libc: glibc: 2.35 $SHELL (typically, interactive shell): /bin/bash

[Włączone skrypty Gita]
Message 1 of 1 in “possible bug for Git - Git incorrectly recognizes which file has been renamed.”
  1. Tomasz OsakNov 28, 2022

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.