{"action":"created","issue":{"url":"https://api.github.com/repos/Spirals-Team/repairnator/issues/581","repository_url":"https://api.github.com/repos/Spirals-Team/repairnator","labels_url":"https://api.github.com/repos/Spirals-Team/repairnator/issues/581/labels{/name}","comments_url":"https://api.github.com/repos/Spirals-Team/repairnator/issues/581/comments","events_url":"https://api.github.com/repos/Spirals-Team/repairnator/issues/581/events","html_url":"https://github.com/Spirals-Team/repairnator/issues/581","id":325104885,"number":581,"title":"git.checkout().setStartPoint(commitCheckout).addPaths(paths).call() seems not to work as expected.","user":{"login":"fermadeiral","id":8786002,"avatar_url":"https://avatars0.githubusercontent.com/u/8786002?v=4","gravatar_id":"","url":"https://api.github.com/users/fermadeiral","html_url":"https://github.com/fermadeiral","followers_url":"https://api.github.com/users/fermadeiral/followers","following_url":"https://api.github.com/users/fermadeiral/following{/other_user}","gists_url":"https://api.github.com/users/fermadeiral/gists{/gist_id}","starred_url":"https://api.github.com/users/fermadeiral/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/fermadeiral/subscriptions","organizations_url":"https://api.github.com/users/fermadeiral/orgs","repos_url":"https://api.github.com/users/fermadeiral/repos","events_url":"https://api.github.com/users/fermadeiral/events{/privacy}","received_events_url":"https://api.github.com/users/fermadeiral/received_events","type":"User","site_admin":false},"labels":[{"id":504943458,"url":"https://api.github.com/repos/Spirals-Team/repairnator/labels/bug","name":"bug","color":"ee0701","default":true},{"id":809897187,"url":"https://api.github.com/repos/Spirals-Team/repairnator/labels/priority:critical","name":"priority:critical","color":"b60205","default":false}],"state":"open","locked":false,"assignee":{"login":"fermadeiral","id":8786002,"avatar_url":"https://avatars0.githubusercontent.com/u/8786002?v=4","gravatar_id":"","url":"https://api.github.com/users/fermadeiral","html_url":"https://github.com/fermadeiral","followers_url":"https://api.github.com/users/fermadeiral/followers","following_url":"https://api.github.com/users/fermadeiral/following{/other_user}","gists_url":"https://api.github.com/users/fermadeiral/gists{/gist_id}","starred_url":"https://api.github.com/users/fermadeiral/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/fermadeiral/subscriptions","organizations_url":"https://api.github.com/users/fermadeiral/orgs","repos_url":"https://api.github.com/users/fermadeiral/repos","events_url":"https://api.github.com/users/fermadeiral/events{/privacy}","received_events_url":"https://api.github.com/users/fermadeiral/received_events","type":"User","site_admin":false},"assignees":[{"login":"fermadeiral","id":8786002,"avatar_url":"https://avatars0.githubusercontent.com/u/8786002?v=4","gravatar_id":"","url":"https://api.github.com/users/fermadeiral","html_url":"https://github.com/fermadeiral","followers_url":"https://api.github.com/users/fermadeiral/followers","following_url":"https://api.github.com/users/fermadeiral/following{/other_user}","gists_url":"https://api.github.com/users/fermadeiral/gists{/gist_id}","starred_url":"https://api.github.com/users/fermadeiral/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/fermadeiral/subscriptions","organizations_url":"https://api.github.com/users/fermadeiral/orgs","repos_url":"https://api.github.com/users/fermadeiral/repos","events_url":"https://api.github.com/users/fermadeiral/events{/privacy}","received_events_url":"https://api.github.com/users/fermadeiral/received_events","type":"User","site_admin":false}],"milestone":null,"comments":1,"created_at":"2018-05-22T00:50:10Z","updated_at":"2018-05-30T10:45:51Z","closed_at":null,"author_association":"COLLABORATOR","body":"When trying to solve #490, I got a case when `git.checkout().setStartPoint(commitCheckout).addPaths(paths).call()` seems not to work as we expected.\r\n\r\nExample: https://github.com/INRIA/spoon/commit/551f0fb28c49f4b1eeab93f7748c04ef82cfde39 (this commit is a fixer commit).\r\n\r\nThere are 3 test classes involved:\r\n1) src/test/java/spoon/test/imports/ImportTest.java\r\n2) src/test/java/spoon/test/imports/testclasses/TransportIndicesShardStoresAction.java (NEW)\r\n3) src/test/java/spoon/test/imports/testclasses2/AbstractMapBasedMultimap.java\r\n\r\nConsider I have checked out that commit.\r\nThen I have its previous commit called `commitCheckout`, and a variable `paths` containing `src/test/java`.\r\nWhen I call `git.checkout().setStartPoint(commitCheckout).addPaths(paths).call()`, files 1 and 3 are updated for their previous state, but file 2, the new one, remains checked out.\r\n\r\nI see no other solution than discovering the new files and deleting them by force. I also still don't know if the opposite happens (i.e., if a deleted file is not checked out in the commit it existed)."},"comment":{"url":"https://api.github.com/repos/Spirals-Team/repairnator/issues/comments/393116174","html_url":"https://github.com/Spirals-Team/repairnator/issues/581#issuecomment-393116174","issue_url":"https://api.github.com/repos/Spirals-Team/repairnator/issues/581","id":393116174,"user":{"login":"fermadeiral","id":8786002,"avatar_url":"https://avatars0.githubusercontent.com/u/8786002?v=4","gravatar_id":"","url":"https://api.github.com/users/fermadeiral","html_url":"https://github.com/fermadeiral","followers_url":"https://api.github.com/users/fermadeiral/followers","following_url":"https://api.github.com/users/fermadeiral/following{/other_user}","gists_url":"https://api.github.com/users/fermadeiral/gists{/gist_id}","starred_url":"https://api.github.com/users/fermadeiral/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/fermadeiral/subscriptions","organizations_url":"https://api.github.com/users/fermadeiral/orgs","repos_url":"https://api.github.com/users/fermadeiral/repos","events_url":"https://api.github.com/users/fermadeiral/events{/privacy}","received_events_url":"https://api.github.com/users/fermadeiral/received_events","type":"User","site_admin":false},"created_at":"2018-05-30T10:45:51Z","updated_at":"2018-05-30T10:45:51Z","author_association":"COLLABORATOR","body":"I talked with Thomas about that issue since his knowledge on git is advanced and in fact he showed me that `git checkout <paths>` is not the right command to do the job I want, i.e. the problem is not with JGit. He gave me a sequence of commands that does the job properly:\r\n\r\n```\r\ngit reset <commit> -- <paths>\r\ngit clean -fd\r\ngit checkout -- .\r\n```\r\nThanks @tdurieux \r\n\r\n@surli, a PR is coming."}}
{"actor":{"display_login":"fermadeiral"}}