Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Open
rustyx opened this issue Nov 2, 2015 · 0 comments

Comments

@rustyx
Copy link

rustyx commented Nov 2, 2015

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
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant