Tools (JBoss Tools)
  1. Tools (JBoss Tools)
  2. JBIDE-12150

Git repository is sometimes corrupted after application creation

    Details

    • Workaround Description:
      Hide

      Dont resuse project names in the same Eclipse session: Dont kill local projects and use the very same name as project name. Either restart Eclipse or use a new project/application name. when importing an OpenShift application to your workspace

      Show
      Dont resuse project names in the same Eclipse session: Dont kill local projects and use the very same name as project name. Either restart Eclipse or use a new project/application name. when importing an OpenShift application to your workspace
    • Steps to Reproduce:
      Hide

      1) EXEC: launch the New OpenShift Application wizard and create a new OpenShift application that you import to your workspace. (ex. call the applicatino as)
      2) ASSERT: Your application gets imported to your workspace (ex. project as)
      3) EXEC: delete the new project, kill the OpenShift application
      4) EXEC: create the very same application again and have it imported to your workspace
      5) EXEC: Go to the Git Perspective and double click some file, so that it gets opened in a editor. You'll very soon get the following error:

      6) EXEC: Go to the command-line and do git fsck.

      Result:
      You'll spot something very similar to this:

      [adietish@adietish-thinkpad as2]$ git fsck
      broken link from  commit 6410005677d35ea202df51097c4077f36d8b9ac1
                    to    tree 0a2127cf741ef75aa1d807ad8931366cf63fc579
      missing tree 0a2127cf741ef75aa1d807ad8931366cf63fc579
      missing blob ef669b78c38fa1317bc89d5d93cd3205c615130f
      

      Interesting enough, .gitignore is now a new file in the git repo even though this is completely erroneous. .gitignore was cloned, we only modified it by adding some further entries (.settings, .classpath, .project, etc.):

      [adietish@adietish-thinkpad as2]$ git status
      # On branch master
      # Your branch is ahead of 'origin/master' by 1 commit.
      #
      # Changes to be committed:
      #   (use "git reset HEAD <file>..." to unstage)
      #
      #	new file:   .gitignore
      
      

      ALTERNATIVE:
      1) EXEC: launch the New OpenShift Application wizard and create a new OpenShift application that you import to your workspace. (ex. call the applicatino as)
      2) ASSERT: Your application gets imported to your workspace (ex. project as)
      3) EXEC: delete the new project
      4) EXEC: Reimport the application from OpenShift to your workspace
      6) EXEC: Go to the command-line and do git fsck.

      Result:
      You'll spot something very similar to this:

      git fsck
      broken link from  commit 74682dc05a4085a4165ef1a280129e9a9c5d412f
                    to    tree 9b742cf75471e6505b5ce7272104f34064326194
      missing tree 9b742cf75471e6505b5ce7272104f34064326194
      missing blob ef669b78c38fa1317bc89d5d93cd3205c615130f
      

      ALTERNATIVE that does not involve using OpenShift:
      1) EXEC: create a new java project (ex. test-project)
      2) EXEC: share this project with egit: Team->Share Project->Git->Create
      3) EXEC: Commit new file (test) to repo: Team->Commit->check ".classpath"
      4) EXEC: Delete project in Eclipse, kill Repository-Folder in File-Explorer / CLI
      5) EXEC: Repeat steps 1-4
      6) Go to CLI and cd to the git repo. Then do: git fsck

      Result:
      You'll spot something very similar to this:

      git fsck
      broken link from  commit 74682dc05a4085a4165ef1a280129e9a9c5d412f
                    to    tree 9b742cf75471e6505b5ce7272104f34064326194
      missing tree 9b742cf75471e6505b5ce7272104f34064326194
      missing blob ef669b78c38fa1317bc89d5d93cd3205c615130f
      
      Show
      1) EXEC: launch the New OpenShift Application wizard and create a new OpenShift application that you import to your workspace. (ex. call the applicatino as ) 2) ASSERT: Your application gets imported to your workspace (ex. project as ) 3) EXEC: delete the new project, kill the OpenShift application 4) EXEC: create the very same application again and have it imported to your workspace 5) EXEC: Go to the Git Perspective and double click some file, so that it gets opened in a editor. You'll very soon get the following error: 6) EXEC: Go to the command-line and do git fsck . Result: You'll spot something very similar to this: [adietish@adietish-thinkpad as2]$ git fsck broken link from commit 6410005677d35ea202df51097c4077f36d8b9ac1 to tree 0a2127cf741ef75aa1d807ad8931366cf63fc579 missing tree 0a2127cf741ef75aa1d807ad8931366cf63fc579 missing blob ef669b78c38fa1317bc89d5d93cd3205c615130f Interesting enough, .gitignore is now a new file in the git repo even though this is completely erroneous. .gitignore was cloned, we only modified it by adding some further entries (.settings, .classpath, .project, etc.): [adietish@adietish-thinkpad as2]$ git status # On branch master # Your branch is ahead of 'origin/master' by 1 commit. # # Changes to be committed: # (use "git reset HEAD <file>..." to unstage) # # new file: .gitignore ALTERNATIVE: 1) EXEC: launch the New OpenShift Application wizard and create a new OpenShift application that you import to your workspace. (ex. call the applicatino as ) 2) ASSERT: Your application gets imported to your workspace (ex. project as ) 3) EXEC: delete the new project 4) EXEC: Reimport the application from OpenShift to your workspace 6) EXEC: Go to the command-line and do git fsck . Result: You'll spot something very similar to this: git fsck broken link from commit 74682dc05a4085a4165ef1a280129e9a9c5d412f to tree 9b742cf75471e6505b5ce7272104f34064326194 missing tree 9b742cf75471e6505b5ce7272104f34064326194 missing blob ef669b78c38fa1317bc89d5d93cd3205c615130f ALTERNATIVE that does not involve using OpenShift: 1) EXEC: create a new java project (ex. test-project) 2) EXEC: share this project with egit: Team->Share Project->Git->Create 3) EXEC: Commit new file (test) to repo: Team->Commit->check ".classpath" 4) EXEC: Delete project in Eclipse, kill Repository-Folder in File-Explorer / CLI 5) EXEC: Repeat steps 1-4 6) Go to CLI and cd to the git repo. Then do: git fsck Result: You'll spot something very similar to this: git fsck broken link from commit 74682dc05a4085a4165ef1a280129e9a9c5d412f to tree 9b742cf75471e6505b5ce7272104f34064326194 missing tree 9b742cf75471e6505b5ce7272104f34064326194 missing blob ef669b78c38fa1317bc89d5d93cd3205c615130f
    • Release Notes Text:
      Hide
      The OpenShift application that you import into your workspace is shared with a new git repository. If this project is (re)using the name of a git-shared project, that you just deleted, then your new git repository may get corrupted. The root cause is a bug in an EGit repository cache, that's not properly cleaning up when projects get removed.
      We reported this in https://bugs.eclipse.org/bugs/show_bug.cgi?id=387617 and contributed the fix for EGit 2.1.
      Show
      The OpenShift application that you import into your workspace is shared with a new git repository. If this project is (re)using the name of a git-shared project, that you just deleted, then your new git repository may get corrupted. The root cause is a bug in an EGit repository cache, that's not properly cleaning up when projects get removed. We reported this in https://bugs.eclipse.org/bugs/show_bug.cgi?id=387617 and contributed the fix for EGit 2.1.
    • Similar Issues:
      Show 10 results 

      Description

      If happens that when importing a new application to your workspace, the resulting (cloned) git repository is corrupted.

        Issue Links

          Activity

          Hide
          Andre Dietisheim
          added a comment - - edited

          My fix for EGit was merged into master: https://bugs.eclipse.org/bugs/show_bug.cgi?id=387617#c13 . I expect it to make it into EGit 2.1 which is due for Juno SR1 (http://wiki.eclipse.org/EGit/New_and_Noteworthy). It should also be available from the EGit nightly update site (according to the EGit wiki).

          Show
          Andre Dietisheim
          added a comment - - edited My fix for EGit was merged into master: https://bugs.eclipse.org/bugs/show_bug.cgi?id=387617#c13 . I expect it to make it into EGit 2.1 which is due for Juno SR1 ( http://wiki.eclipse.org/EGit/New_and_Noteworthy ). It should also be available from the EGit nightly update site (according to the EGit wiki).
          Hide
          Stefan Bunciak
          added a comment -

          This case will be verified after releasing EGit 2.1 (Sept 26) shipped with Juno SR1 (Sept 28) and in the following JBT/JBDS build.

          Show
          Stefan Bunciak
          added a comment - This case will be verified after releasing EGit 2.1 (Sept 26) shipped with Juno SR1 (Sept 28) and in the following JBT/JBDS build.
          Hide
          Stefan Bunciak
          added a comment -

          Verified in JBoss Tools 4.0.0.Alpha2d

          Show
          Stefan Bunciak
          added a comment - Verified in JBoss Tools 4.0.0.Alpha2d
          Hide
          Andre Dietisheim
          added a comment -

          reopening to add release notes

          Show
          Andre Dietisheim
          added a comment - reopening to add release notes
          Hide
          Andre Dietisheim
          added a comment -

          re-closing after having added release notes

          Show
          Andre Dietisheim
          added a comment - re-closing after having added release notes

            People

            • Assignee:
              Andre Dietisheim
              Reporter:
              Xavier Coulon
            • Votes:
              0 Vote for this issue
              Watchers:
              4 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: