Summary: | git commit cannot rename files: instead it creates and deletes in a two-stage commit process. | ||
---|---|---|---|
Product: | [Developer tools] kdevplatform | Reporter: | Jeremy W. Murphy <jeremy.william.murphy> |
Component: | git | Assignee: | kdevelop-bugs-null |
Status: | RESOLVED FIXED | ||
Severity: | normal | CC: | aleixpol |
Priority: | NOR | ||
Version: | git master | ||
Target Milestone: | 1.3.0 | ||
Platform: | Gentoo Packages | ||
OS: | Linux | ||
Latest Commit: | http://commits.kde.org/kdevplatform/09d1eb16d35c2401dcf0fe2dcf5526efde31422b | Version Fixed In: | |
Sentry Crash Report: |
Description
Jeremy W. Murphy
2013-02-01 04:20:52 UTC
Can you explain a little more what you mean? How do you rename then? Right-click on a file in the Projects tab and choose Rename. Here it worked fine. Can you please describe how you do it...? I just tested it again, still happens. Create a file and Git->Add it to your project. Using KDevelop, Rename the file. At this point... * $ git status: Says that the old file is renamed to the new file. * Project->Git->Commit: the overview looks like it is deleting the old file and creating the new file, but only the new file is listed as Modified. Now if I go ahead with the Commit in KDevelop, afterwards... * $ git status: Deletion of the old file is listed as a change to be committed. I.e.: although it was deleted from the filesystem, KDevelop did not commit the change to the repository. So another commit has to be made to complete the rename, although now it hasn't been actually renamed, but files with different names and identical content were created and then deleted in consecutive commits. Git commit f07500c0a6e38cb5f32280f4bc7f116046eb9c67 by Aleix Pol. Committed on 01/03/2013 at 04:35. Pushed by apol into branch 'master'. Improve git status support When a file is renamed, report the name that has been removed too, so that when we commit it, the removed files are passed too. M +18 -13 plugins/git/gitplugin.cpp http://commits.kde.org/kdevplatform/f07500c0a6e38cb5f32280f4bc7f116046eb9c67 Git commit 09d1eb16d35c2401dcf0fe2dcf5526efde31422b by Aleix Pol. Committed on 01/03/2013 at 04:35. Pushed by apol into branch '1.5'. Improve git status support When a file is renamed, report the name that has been removed too, so that when we commit it, the removed files are passed too. M +18 -13 plugins/git/gitplugin.cpp http://commits.kde.org/kdevplatform/09d1eb16d35c2401dcf0fe2dcf5526efde31422b |