vss2git icon indicating copy to clipboard operation
vss2git copied to clipboard

Add and delete of the same file in one changeset causes GIT error: the following files have changes staged in the index

Open rustyx opened this issue 8 years ago • 0 comments

If a file was added and then immediately deleted from VSS (using the same comment), vss2git fails with an error:

error: the following files have changes staged in the index

Logfile contains:

Replaying changeset 9178 from 12/11/2012 11:49:47
C:\2\git\Projects\WebServices\SearchService\SearchService\SearchService.csproj: Edit revision 2
Executing: C:\Program Files\Git\cmd\git.exe add -- C:\2\git\Projects\WebServices\SearchService\SearchService\SearchService.csproj
C:\2\git\Projects\WebServices\SearchService\SearchService\obj\Debug\SearchService.dll: Edit revision 2
Executing: C:\Program Files\Git\cmd\git.exe add -- C:\2\git\Projects\WebServices\SearchService\SearchService\obj\Debug\SearchService.dll
C:\2\git\Projects\WebServices\SearchService\SearchService\obj\Debug\SearchService.pdb: Edit revision 2
Executing: C:\Program Files\Git\cmd\git.exe add -- C:\2\git\Projects\WebServices\SearchService\SearchService\obj\Debug\SearchService.pdb
C:\2\git\Projects\WebServices\SearchService\SearchService: Delete obj
Executing: C:\Program Files\Git\cmd\git.exe rm -r -- C:\2\git\Projects\WebServices\SearchService\SearchService\obj
!error: the following files have changes staged in the index:
!    Projects/WebServices/SearchService/SearchService/obj/Debug/SearchService.dll
!    Projects/WebServices/SearchService/SearchService/obj/Debug/SearchService.pdb
!(use --cached to keep the file, or -f to force removal)
ERROR: git returned exit code 1
Executable: C:\Program Files\Git\cmd\git.exe
Arguments: rm -r -- C:\2\git\Projects\WebServices\SearchService\SearchService\obj
Stdout:
Stderr: error: the following files have changes staged in the index:
    Projects/WebServices/SearchService/SearchService/obj/Debug/SearchService.dll
    Projects/WebServices/SearchService/SearchService/obj/Debug/SearchService.pdb
(use --cached to keep the file, or -f to force removal)
Hpdi.Vss2Git.ProcessExitException: git returned exit code 1
   at Hpdi.Vss2Git.GitWrapper.FailExitCode(String exec, String args, String stdout, String stderr, Int32 exitCode) in c:\Projects\vss2git\Vss2Git\GitWrapper.cs:line 301
   at Hpdi.Vss2Git.GitWrapper.ExecuteUnless(ProcessStartInfo startInfo, String unless) in c:\Projects\vss2git\Vss2Git\GitWrapper.cs:line 296
   at Hpdi.Vss2Git.GitWrapper.GitExec(String args) in c:\Projects\vss2git\Vss2Git\GitWrapper.cs:line 263
   at Hpdi.Vss2Git.GitWrapper.Remove(String path, Boolean recursive) in c:\Projects\vss2git\Vss2Git\GitWrapper.cs:line 139
   at Hpdi.Vss2Git.GitExporter.ReplayRevision(VssPathMapper pathMapper, Revision revision, GitWrapper git, LinkedList`1 labels) in c:\Projects\vss2git\Vss2Git\GitExporter.cs:line 327
   at Hpdi.Vss2Git.GitExporter.<>c__DisplayClass11.<ReplayChangeset>b__d() in c:\Projects\vss2git\Vss2Git\GitExporter.cs:line 247
   at Hpdi.Vss2Git.GitExporter.AbortRetryIgnore(ThreadStart work, MessageBoxButtons buttons) in c:\Projects\vss2git\Vss2Git\GitExporter.cs:line 594

rustyx avatar Nov 02 '15 15:11 rustyx