Description
It seems that there are a lot of source control dialog related bugs, many of them cause by the complexity of the various copy/move/refactor actions possible in FD and the way events are raised and processed. It would be hard to get rid of every such bug. It was discussed previously that there shouldn't even be an option to offer to create commits for actions: #1932 (comment)
I'm obviously going back to setting the "never create a commit for moving, deleting, ..." option to true (should be true
by default in my opinion).
Some of the issues I found:
-
I renamed a file in the project panel, and then I've got this excellent suggestion asking me if I would like to create a commit for this action, with this as a message:
Moved src\Foo.hx$renaming$ to src\foo.hx
Doesn't look right, does it?
It's worth to mention that this only happens when the rename involves only a case change, and the strange message comes from this line inRenameFile.cs
:string tmpPath = oldPath + "$renaming$";
Same cause as Renaming class: avoid replace existing file warning if only case is changed (on Windows). #1288 -
Another case of wrong message: Just adding a new folder
foo
via the project panel, commit dialog offers to create a commit with this message: "Moved src\New Folder to src\foo". -
A freshly created directory
src/foo/
contains several source files (not under source control yet). Movingsrc/foo/
into/src/bar/
.
Answer yes to update references dialog.
A commit dialog shows this message: "Moved src\bar\foo\Client.hx to src\bar\foo\Client.hx" (note the old path is wrong - equal to the new path). If I answeryes
, a similar dialog pops up for each of the source files. If I answerno
, no more dialogs appear. -
Move
src/bar/foo/
back tosrc/
(assuming in the previous step I answeredyes
to all the commit dialogs, so all the files are now committed).
Answer yes to update references dialog.
A commit dialog shows this unexpected message: "Deleted src\bar\foo\Client.hx". If I answeryes
, a similar dialog pops up for each of the source files. After I answeryes
to all of them, an exception occurs in ProcessRunner, when it tries to rungit commit -m \"Deleted ...\"
. Theprocess.StartInfo.WorkingDirectory
is set to"C:\\...\\src\\bar\\foo" - a directory which no longer exists since it was already moved into
src/, therefore the "The directory name is invalid" exception from
process.Start()`. -
Reset --hard the repo back to beginning (no more
src/foo/
,src/bar/
).
Createsrc/foo/bar/
(empty). The icons in the project panel show these directories as if they are under source control and up to date (green mark). This is debatable but I think they should show as not under source control (and that's how TortoiseGit shows them - with no icon).
Now copy some source files fromsrc/
tosrc/foo/bar/
.
Movesrc/foo/bar/
tosrc/
.
No source control commit dialogs are shown, even though this case is quite similar to case 3 described above.
It's worth to also test what happens in all those cases when answering No to "update references" dialog.