{"thread":{"id":"17275","subject":"Git rebase -i failing on cygwin -- git checkout-index says File Exists","startedAt":"2009-01-20T20:09:23Z","lastAt":"2009-01-20T23:23:14Z","messageCount":6,"participants":["Ludvig Strigeus","Johannes Schindelin"],"isPatch":false,"patchVersion":null,"patchTotal":null},"messages":[{"id":"101291","messageId":"4285cd450901201209i792195dfmdec1fb14d627b25e@mail.gmail.com","threadId":"17275","inReplyTo":null,"subject":"Git rebase -i failing on cygwin -- git checkout-index says File Exists","fromName":"Ludvig Strigeus","fromEmail":"strigeus@gmail.com","sentAt":"2009-01-20T20:09:23Z","receivedAt":"2009-01-20T20:09:23Z","isPatch":false,"sender":{"key":"strigeus@gmail.com","avatar":"https://gravatar.com/avatar/dc6fa7005166a5118e152fec12b4aec958d3a94e2bb1a13e5e5ebd0addfbbb14?d=mp&s=160"},"body":"Hi,\n\nI'm having some weird problem with Git on Cygwin on Windows XP. I\nstart with a totally clean repo, and then run interactive rebase to\nedit a historical commit. I exit the editor without doing anything (I\nget similar issues if I modify stuff inside the editor).\n\n$ git st\n# On branch master\nnothing to commit (working directory clean)\n\n$ git rebase -i 4a1552c81b622f85b0e9170c6fd7a22b4a3e633c\nerror: git checkout-index: unable to create file util/stringfuncs.cpp\n(File exists)\nfatal: Could not reset index file to revision '4965936'.\nerror: Entry 'util/boink-py.cc' not uptodate. Cannot merge.\nfatal: merging of trees 0c27b10e163f00655486976896d096302b0f5c21 and\n7c7dfd93d678cfc564649738d45260e0b5d9f5a7 failed\nCould not apply d9c7ac9... Various reorganizations.\n\nAny clues?\n\nThanks,\nLudde\n"},{"id":"101293","messageId":"4285cd450901201212k504eeb6bp69f6543750f0259@mail.gmail.com","threadId":"17275","inReplyTo":"4285cd450901201209i792195dfmdec1fb14d627b25e@mail.gmail.com","subject":"Re: Git rebase -i failing on cygwin -- git checkout-index says File Exists","fromName":"Ludvig Strigeus","fromEmail":"strigeus@gmail.com","sentAt":"2009-01-20T20:12:39Z","receivedAt":"2009-01-20T20:12:39Z","isPatch":false,"sender":{"key":"strigeus@gmail.com","avatar":"https://gravatar.com/avatar/dc6fa7005166a5118e152fec12b4aec958d3a94e2bb1a13e5e5ebd0addfbbb14?d=mp&s=160"},"body":"By the way, the version I use is:\n\n$ git --version\ngit version 1.6.1.48.ge9b8\n\n/Ludde\n\nOn Tue, Jan 20, 2009 at 9:09 PM, Ludvig Strigeus <strigeus@gmail.com> wrote:\n> Hi,\n>\n> I'm having some weird problem with Git on Cygwin on Windows XP. I\n> start with a totally clean repo, and then run interactive rebase to\n> edit a historical commit. I exit the editor without doing anything (I\n> get similar issues if I modify stuff inside the editor).\n>\n> $ git st\n> # On branch master\n> nothing to commit (working directory clean)\n>\n> $ git rebase -i 4a1552c81b622f85b0e9170c6fd7a22b4a3e633c\n> error: git checkout-index: unable to create file util/stringfuncs.cpp\n> (File exists)\n> fatal: Could not reset index file to revision '4965936'.\n> error: Entry 'util/boink-py.cc' not uptodate. Cannot merge.\n> fatal: merging of trees 0c27b10e163f00655486976896d096302b0f5c21 and\n> 7c7dfd93d678cfc564649738d45260e0b5d9f5a7 failed\n> Could not apply d9c7ac9... Various reorganizations.\n>\n> Any clues?\n>\n> Thanks,\n> Ludde\n>\n"},{"id":"101308","messageId":"alpine.DEB.1.00.0901202212470.3586@pacific.mpi-cbg.de","threadId":"17275","inReplyTo":"4285cd450901201209i792195dfmdec1fb14d627b25e@mail.gmail.com","subject":"Re: Git rebase -i failing on cygwin -- git checkout-index says File Exists","fromName":"Johannes Schindelin","fromEmail":"johannes.schindelin@gmx.de","sentAt":"2009-01-20T21:16:28Z","receivedAt":"2009-01-20T21:16:28Z","isPatch":false,"sender":{"key":"johannes.schindelin@gmx.de","avatar":"https://avatars.githubusercontent.com/u/127790?v=4"},"body":"Hi,\n\nOn Tue, 20 Jan 2009, Ludvig Strigeus wrote:\n\n> I'm having some weird problem with Git on Cygwin on Windows XP. I start \n> with a totally clean repo, and then run interactive rebase to edit a \n> historical commit. I exit the editor without doing anything (I get \n> similar issues if I modify stuff inside the editor).\n> \n> $ git st\n> # On branch master\n> nothing to commit (working directory clean)\n> \n> $ git rebase -i 4a1552c81b622f85b0e9170c6fd7a22b4a3e633c\n> error: git checkout-index: unable to create file util/stringfuncs.cpp\n> (File exists)\n\nThis is the error that should stop the whole thing.\n\n> fatal: Could not reset index file to revision '4965936'.\n> error: Entry 'util/boink-py.cc' not uptodate. Cannot merge.\n> fatal: merging of trees 0c27b10e163f00655486976896d096302b0f5c21 and\n> 7c7dfd93d678cfc564649738d45260e0b5d9f5a7 failed\n> Could not apply d9c7ac9... Various reorganizations.\n\nBut here, it should not have continued.\n\nHaving said that, I often had that case with interactive rebase, because \nI had an untracked file lying around (in your case util/stringfuncs.cpp) \nthat was tracked in the version I was trying to rebase onto, but it \nstopped right there, even on msysGit.\n\nHopefully you can investigate the scenario more, by \"git rebase --abort\", \nand then running the rebase -i again, but with GIT_TRACE=1.\n\nCiao,\nDscho\n"},{"id":"101309","messageId":"4285cd450901201420l8929dci25688dc9723c917a@mail.gmail.com","threadId":"17275","inReplyTo":"alpine.DEB.1.00.0901202212470.3586@pacific.mpi-cbg.de","subject":"Re: Git rebase -i failing on cygwin -- git checkout-index says File Exists","fromName":"Ludvig Strigeus","fromEmail":"strigeus@gmail.com","sentAt":"2009-01-20T22:20:15Z","receivedAt":"2009-01-20T22:20:15Z","isPatch":false,"sender":{"key":"strigeus@gmail.com","avatar":"https://gravatar.com/avatar/dc6fa7005166a5118e152fec12b4aec958d3a94e2bb1a13e5e5ebd0addfbbb14?d=mp&s=160"},"body":"Hi!\n\nOn Tue, Jan 20, 2009 at 10:16 PM, Johannes Schindelin\n<Johannes.Schindelin@gmx.de> wrote:\n>\n> Having said that, I often had that case with interactive rebase, because\n> I had an untracked file lying around (in your case util/stringfuncs.cpp)\n> that was tracked in the version I was trying to rebase onto, but it\n> stopped right there, even on msysGit.\n\nutil/stringfuncs.cpp is not an untracked file, though. It's a part of\nmy repo. Also 'git status' shows that no files are modified. If it was\nan untracked file, 'git status' would have said so.\n\n>\n> Hopefully you can investigate the scenario more, by \"git rebase --abort\",\n> and then running the rebase -i again, but with GIT_TRACE=1.\n>\n\nHere is the trace output. Notice how it prints errors about two files this time.\n\n$ GIT_TRACE=1 git rebase -i 4a1552c81b622f85b0e9170c6fd7a22b4a3e633c\ntrace: exec: 'git-rebase' '-i' '4a1552c81b622f85b0e9170c6fd7a22b4a3e633c'\ntrace: built-in: git 'rev-parse' '--git-dir'\ntrace: built-in: git 'rev-parse' '--is-inside-work-tree'\ntrace: built-in: git 'rev-parse' '--show-cdup'\ntrace: built-in: git 'rev-parse' '--parseopt' '--' '-i'\n'4a1552c81b622f85b0e9170c6fd7a22b4a3e633c'\ntrace: built-in: git 'rev-parse' '--git-dir'\ntrace: built-in: git 'rev-parse' '--show-cdup'\ntrace: built-in: git 'rev-parse' '--is-inside-work-tree'\ntrace: exec: 'git-var' 'GIT_COMMITTER_IDENT'\ntrace: built-in: git 'rev-parse' '--verify' 'HEAD'\ntrace: built-in: git 'update-index' '--ignore-submodules' '--refresh'\ntrace: built-in: git 'diff-files' '--quiet' '--ignore-submodules'\ntrace: built-in: git 'diff-index' '--cached' '--quiet' 'HEAD'\n'--ignore-submodules' '--'\ntrace: built-in: git 'rev-parse' '--verify'\n'4a1552c81b622f85b0e9170c6fd7a22b4a3e633c'\ntrace: built-in: git 'rev-parse' '--verify' 'HEAD'\ntrace: built-in: git 'rev-parse' '--short'\n'4a1552c81b622f85b0e9170c6fd7a22b4a3e633c'\ntrace: built-in: git 'rev-parse' '--short'\n'7a70781d089d98f0de606515d1041230cef9b184'\ntrace: built-in: git 'rev-parse' '--short'\n'4a1552c81b622f85b0e9170c6fd7a22b4a3e633c'\ntrace: built-in: git 'rev-list' '--no-merges' '--cherry-pick'\n'--pretty=oneline' '--abbrev-commit' '--abbrev=7' '--rever\nse' '--left-right' '--topo-order'\n'4a1552c81b622f85b0e9170c6fd7a22b4a3e633c...7a70781d089d98f0de606515d1041230cef9b184'\ntrace: built-in: git 'update-ref' 'ORIG_HEAD'\n'7a70781d089d98f0de606515d1041230cef9b184'\ntrace: built-in: git 'rev-parse' '--verify' '4965936^'\ntrace: built-in: git 'rev-parse' '--verify' 'HEAD'\ntrace: built-in: git 'reset' '--hard' '4965936'\ntrace: run_command: 'read-tree' '-v' '-u' '--reset'\n'49659367ed932a691749fb4c6b93e38b2a85e9e1'\ntrace: exec: 'git' 'read-tree' '-v' '-u' '--reset'\n'49659367ed932a691749fb4c6b93e38b2a85e9e1'\ntrace: built-in: git 'read-tree' '-v' '-u' '--reset'\n'49659367ed932a691749fb4c6b93e38b2a85e9e1'\nerror: git checkout-index: unable to create file\nutil/boink_unittest.cpp (File exists)\nerror: git checkout-index: unable to create file util/stringfuncs.cpp\n(File exists)\nfatal: Could not reset index file to revision '4965936'.\ntrace: built-in: git 'rev-parse' '--short' '4965936'\ntrace: built-in: git 'rev-parse' '--verify' 'd9c7ac9^'\ntrace: built-in: git 'rev-parse' '--verify' 'HEAD'\ntrace: built-in: git 'cherry-pick' 'd9c7ac9'\nerror: Entry 'util/boink-py.cc' not uptodate. Cannot merge.\nfatal: merging of trees 0c27b10e163f00655486976896d096302b0f5c21 and\n7c7dfd93d678cfc564649738d45260e0b5d9f5a7 failed\ntrace: built-in: git 'rev-list' '--parents' '-1' 'd9c7ac9'\ntrace: built-in: git 'diff-tree' '-p' 'd9c7ac9^'\\!''\ntrace: built-in: git 'cat-file' 'commit' 'd9c7ac9'\ntrace: built-in: git 'config' 'i18n.commitencoding'\ntrace: built-in: git 'show' '-s' '--pretty=raw' '--encoding=UTF-8'\n'd9c7ac9' '--'\ntrace: built-in: git 'rerere'\nCould not apply d9c7ac9... Various reorganizations.\n\nIt doesn't really tell me much.\n\nMaybe this command log is useful. I got this while aborting the\nrebase. Looks like some file creation race condition? Windows doesn't\nallow files to be deleted while they're open.\n\n$ git rebase --abort\nerror: git checkout-index: unable to create file\nutil/boink_unittest.cpp (File exists)\nfatal: Could not reset index file to revision\n'7a70781d089d98f0de606515d1041230cef9b184'.\n\n$ git rebase --abort\nerror: git checkout-index: unable to create file util/stringfuncs.h\n(File exists)\nfatal: Could not reset index file to revision\n'7a70781d089d98f0de606515d1041230cef9b184'.\n\n$ git rebase --abort\nerror: git checkout-index: unable to create file\nutil/boink_unittest.cpp (File exists)\nerror: git checkout-index: unable to create file util/common.h\n(Permission denied)\nfatal: Could not reset index file to revision\n'7a70781d089d98f0de606515d1041230cef9b184'.\n\n$ git rebase --abort\n\n(this time it worked)\n\nThanks,\nLudde\n"},{"id":"101313","messageId":"4285cd450901201444g711626afm296bf372a100b999@mail.gmail.com","threadId":"17275","inReplyTo":"4285cd450901201420l8929dci25688dc9723c917a@mail.gmail.com","subject":"Re: Git rebase -i failing on cygwin -- git checkout-index says File Exists","fromName":"Ludvig Strigeus","fromEmail":"strigeus@gmail.com","sentAt":"2009-01-20T22:44:26Z","receivedAt":"2009-01-20T22:44:26Z","isPatch":false,"sender":{"key":"strigeus@gmail.com","avatar":"https://gravatar.com/avatar/dc6fa7005166a5118e152fec12b4aec958d3a94e2bb1a13e5e5ebd0addfbbb14?d=mp&s=160"},"body":"On Tue, Jan 20, 2009 at 11:20 PM, Ludvig Strigeus <strigeus@gmail.com> wrote:\n>\n> Maybe this command log is useful. I got this while aborting the\n> rebase. Looks like some file creation race condition? Windows doesn't\n> allow files to be deleted while they're open.\n\nI believe I found the source of my problems with git rebase. I had an\neditor open that wanted to reload the files when changed, and this\nseemed to conflict with git's file manipulations. After closing the\neditor, I don't get the mysterious errors anymore.\n\n/Ludde\n"},{"id":"101314","messageId":"alpine.DEB.1.00.0901210022290.15160@racer","threadId":"17275","inReplyTo":"4285cd450901201444g711626afm296bf372a100b999@mail.gmail.com","subject":"Re: Git rebase -i failing on cygwin -- git checkout-index says File Exists","fromName":"Johannes Schindelin","fromEmail":"johannes.schindelin@gmx.de","sentAt":"2009-01-20T23:23:14Z","receivedAt":"2009-01-20T23:23:14Z","isPatch":false,"sender":{"key":"johannes.schindelin@gmx.de","avatar":"https://avatars.githubusercontent.com/u/127790?v=4"},"body":"Hi,\n\nOn Tue, 20 Jan 2009, Ludvig Strigeus wrote:\n\n> On Tue, Jan 20, 2009 at 11:20 PM, Ludvig Strigeus <strigeus@gmail.com> wrote:\n> >\n> > Maybe this command log is useful. I got this while aborting the \n> > rebase. Looks like some file creation race condition? Windows doesn't \n> > allow files to be deleted while they're open.\n> \n> I believe I found the source of my problems with git rebase. I had an \n> editor open that wanted to reload the files when changed, and this \n> seemed to conflict with git's file manipulations. After closing the \n> editor, I don't get the mysterious errors anymore.\n\nYep, that's a Windows issue.  Once you keep a file open in an editor, it \ncannot be overwritten/deleted.\n\nLive with it, or upgrade to a real operating system :-)\n\nCiao,\nDscho\n"}]}