{"action":"closed","number":163,"pull_request":{"url":"https://api.github.com/repos/jenkinsci/git-client-plugin/pulls/163","id":31786005,"html_url":"https://github.com/jenkinsci/git-client-plugin/pull/163","diff_url":"https://github.com/jenkinsci/git-client-plugin/pull/163.diff","patch_url":"https://github.com/jenkinsci/git-client-plugin/pull/163.patch","issue_url":"https://api.github.com/repos/jenkinsci/git-client-plugin/issues/163","number":163,"state":"closed","locked":false,"title":"More complete \"clean\" behavior.","user":{"login":"markdoliner","id":225813,"avatar_url":"https://avatars.githubusercontent.com/u/225813?v=3","gravatar_id":"","url":"https://api.github.com/users/markdoliner","html_url":"https://github.com/markdoliner","followers_url":"https://api.github.com/users/markdoliner/followers","following_url":"https://api.github.com/users/markdoliner/following{/other_user}","gists_url":"https://api.github.com/users/markdoliner/gists{/gist_id}","starred_url":"https://api.github.com/users/markdoliner/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/markdoliner/subscriptions","organizations_url":"https://api.github.com/users/markdoliner/orgs","repos_url":"https://api.github.com/users/markdoliner/repos","events_url":"https://api.github.com/users/markdoliner/events{/privacy}","received_events_url":"https://api.github.com/users/markdoliner/received_events","type":"User","site_admin":false},"body":"Specifically, remove untracked directories even if they're managed as\r\npart of another git repository. See the documentation for the -d switch\r\nin \"git help clean\" for a full description.\r\n\r\nThis _seems_ like the right behavior to me. I can't think of a time\r\nwhen it would make sense to not delete an untracked directory just because\r\nit happens to be a git repo.\r\n\r\nI haven't tested this. Haven't tried to compile. Haven't run unit tests.\r\nEtc.\r\n\r\nI was experiencing a problem where part of my build process downloads a\r\nlibrary from the internet. The library contains a .git file with a .gitdir\r\ndirective. This caused \"git clean -fdx\" to error-out during the next build\r\nattempt when run as part of the \"Clean after checkout\" Git SCM additional\r\nbehavior, because it refused to delete the library.\r\n\r\nYou might be able to reproduce the problem by creating a simple project\r\nin Jenkins. The test project will need to be checked out via Jenkins' Git\r\nsource code management plugin. As part of your build steps, add this:\r\n    mkdir some_test_dir\r\n    echo 'gitdir: /foo/bar' > some_test_dir/.git\r\nThen add the \"Clean after checkout\" additional behavior under Source\r\nCode Management.\r\n\r\nRelated bug reports:\r\nhttps://issues.jenkins-ci.org/browse/JENKINS-21369\r\nhttps://issues.jenkins-ci.org/browse/JENKINS-23694","created_at":"2015-03-23T23:57:19Z","updated_at":"2015-06-03T00:28:18Z","closed_at":"2015-06-03T00:28:18Z","merged_at":null,"merge_commit_sha":"786bc09bce84ca4e2cc7109f8bbcadad2bc36c71","assignee":null,"milestone":null,"commits_url":"https://api.github.com/repos/jenkinsci/git-client-plugin/pulls/163/commits","review_comments_url":"https://api.github.com/repos/jenkinsci/git-client-plugin/pulls/163/comments","review_comment_url":"https://api.github.com/repos/jenkinsci/git-client-plugin/pulls/comments{/number}","comments_url":"https://api.github.com/repos/jenkinsci/git-client-plugin/issues/163/comments","statuses_url":"https://api.github.com/repos/jenkinsci/git-client-plugin/statuses/ff38411520ee3462dd94350c73a45cc9292937d3","head":{"label":"markdoliner:better_git_clean","ref":"better_git_clean","sha":"ff38411520ee3462dd94350c73a45cc9292937d3","user":{"login":"markdoliner","id":225813,"avatar_url":"https://avatars.githubusercontent.com/u/225813?v=3","gravatar_id":"","url":"https://api.github.com/users/markdoliner","html_url":"https://github.com/markdoliner","followers_url":"https://api.github.com/users/markdoliner/followers","following_url":"https://api.github.com/users/markdoliner/following{/other_user}","gists_url":"https://api.github.com/users/markdoliner/gists{/gist_id}","starred_url":"https://api.github.com/users/markdoliner/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/markdoliner/subscriptions","organizations_url":"https://api.github.com/users/markdoliner/orgs","repos_url":"https://api.github.com/users/markdoliner/repos","events_url":"https://api.github.com/users/markdoliner/events{/privacy}","received_events_url":"https://api.github.com/users/markdoliner/received_events","type":"User","site_admin":false},"repo":{"id":32765266,"name":"git-client-plugin","full_name":"markdoliner/git-client-plugin","owner":{"login":"markdoliner","id":225813,"avatar_url":"https://avatars.githubusercontent.com/u/225813?v=3","gravatar_id":"","url":"https://api.github.com/users/markdoliner","html_url":"https://github.com/markdoliner","followers_url":"https://api.github.com/users/markdoliner/followers","following_url":"https://api.github.com/users/markdoliner/following{/other_user}","gists_url":"https://api.github.com/users/markdoliner/gists{/gist_id}","starred_url":"https://api.github.com/users/markdoliner/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/markdoliner/subscriptions","organizations_url":"https://api.github.com/users/markdoliner/orgs","repos_url":"https://api.github.com/users/markdoliner/repos","events_url":"https://api.github.com/users/markdoliner/events{/privacy}","received_events_url":"https://api.github.com/users/markdoliner/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/markdoliner/git-client-plugin","description":"Jenkins git client plugin","fork":true,"url":"https://api.github.com/repos/markdoliner/git-client-plugin","forks_url":"https://api.github.com/repos/markdoliner/git-client-plugin/forks","keys_url":"https://api.github.com/repos/markdoliner/git-client-plugin/keys{/key_id}","collaborators_url":"https://api.github.com/repos/markdoliner/git-client-plugin/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/markdoliner/git-client-plugin/teams","hooks_url":"https://api.github.com/repos/markdoliner/git-client-plugin/hooks","issue_events_url":"https://api.github.com/repos/markdoliner/git-client-plugin/issues/events{/number}","events_url":"https://api.github.com/repos/markdoliner/git-client-plugin/events","assignees_url":"https://api.github.com/repos/markdoliner/git-client-plugin/assignees{/user}","branches_url":"https://api.github.com/repos/markdoliner/git-client-plugin/branches{/branch}","tags_url":"https://api.github.com/repos/markdoliner/git-client-plugin/tags","blobs_url":"https://api.github.com/repos/markdoliner/git-client-plugin/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/markdoliner/git-client-plugin/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/markdoliner/git-client-plugin/git/refs{/sha}","trees_url":"https://api.github.com/repos/markdoliner/git-client-plugin/git/trees{/sha}","statuses_url":"https://api.github.com/repos/markdoliner/git-client-plugin/statuses/{sha}","languages_url":"https://api.github.com/repos/markdoliner/git-client-plugin/languages","stargazers_url":"https://api.github.com/repos/markdoliner/git-client-plugin/stargazers","contributors_url":"https://api.github.com/repos/markdoliner/git-client-plugin/contributors","subscribers_url":"https://api.github.com/repos/markdoliner/git-client-plugin/subscribers","subscription_url":"https://api.github.com/repos/markdoliner/git-client-plugin/subscription","commits_url":"https://api.github.com/repos/markdoliner/git-client-plugin/commits{/sha}","git_commits_url":"https://api.github.com/repos/markdoliner/git-client-plugin/git/commits{/sha}","comments_url":"https://api.github.com/repos/markdoliner/git-client-plugin/comments{/number}","issue_comment_url":"https://api.github.com/repos/markdoliner/git-client-plugin/issues/comments{/number}","contents_url":"https://api.github.com/repos/markdoliner/git-client-plugin/contents/{+path}","compare_url":"https://api.github.com/repos/markdoliner/git-client-plugin/compare/{base}...{head}","merges_url":"https://api.github.com/repos/markdoliner/git-client-plugin/merges","archive_url":"https://api.github.com/repos/markdoliner/git-client-plugin/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/markdoliner/git-client-plugin/downloads","issues_url":"https://api.github.com/repos/markdoliner/git-client-plugin/issues{/number}","pulls_url":"https://api.github.com/repos/markdoliner/git-client-plugin/pulls{/number}","milestones_url":"https://api.github.com/repos/markdoliner/git-client-plugin/milestones{/number}","notifications_url":"https://api.github.com/repos/markdoliner/git-client-plugin/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/markdoliner/git-client-plugin/labels{/name}","releases_url":"https://api.github.com/repos/markdoliner/git-client-plugin/releases{/id}","created_at":"2015-03-23T23:47:51Z","updated_at":"2015-03-23T23:52:54Z","pushed_at":"2015-03-23T23:54:14Z","git_url":"git://github.com/markdoliner/git-client-plugin.git","ssh_url":"git@github.com:markdoliner/git-client-plugin.git","clone_url":"https://github.com/markdoliner/git-client-plugin.git","svn_url":"https://github.com/markdoliner/git-client-plugin","homepage":"https://wiki.jenkins-ci.org/display/JENKINS/Git+Client+Plugin","size":2191,"stargazers_count":0,"watchers_count":0,"language":"Java","has_issues":false,"has_downloads":true,"has_wiki":false,"has_pages":false,"forks_count":0,"mirror_url":null,"open_issues_count":0,"forks":0,"open_issues":0,"watchers":0,"default_branch":"master"}},"base":{"label":"jenkinsci:master","ref":"master","sha":"0d477d77553b379b84cdb852771e94c5e9dbafd6","user":{"login":"jenkinsci","id":107424,"avatar_url":"https://avatars.githubusercontent.com/u/107424?v=3","gravatar_id":"","url":"https://api.github.com/users/jenkinsci","html_url":"https://github.com/jenkinsci","followers_url":"https://api.github.com/users/jenkinsci/followers","following_url":"https://api.github.com/users/jenkinsci/following{/other_user}","gists_url":"https://api.github.com/users/jenkinsci/gists{/gist_id}","starred_url":"https://api.github.com/users/jenkinsci/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/jenkinsci/subscriptions","organizations_url":"https://api.github.com/users/jenkinsci/orgs","repos_url":"https://api.github.com/users/jenkinsci/repos","events_url":"https://api.github.com/users/jenkinsci/events{/privacy}","received_events_url":"https://api.github.com/users/jenkinsci/received_events","type":"Organization","site_admin":false},"repo":{"id":8263652,"name":"git-client-plugin","full_name":"jenkinsci/git-client-plugin","owner":{"login":"jenkinsci","id":107424,"avatar_url":"https://avatars.githubusercontent.com/u/107424?v=3","gravatar_id":"","url":"https://api.github.com/users/jenkinsci","html_url":"https://github.com/jenkinsci","followers_url":"https://api.github.com/users/jenkinsci/followers","following_url":"https://api.github.com/users/jenkinsci/following{/other_user}","gists_url":"https://api.github.com/users/jenkinsci/gists{/gist_id}","starred_url":"https://api.github.com/users/jenkinsci/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/jenkinsci/subscriptions","organizations_url":"https://api.github.com/users/jenkinsci/orgs","repos_url":"https://api.github.com/users/jenkinsci/repos","events_url":"https://api.github.com/users/jenkinsci/events{/privacy}","received_events_url":"https://api.github.com/users/jenkinsci/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/jenkinsci/git-client-plugin","description":"Jenkins git client plugin","fork":false,"url":"https://api.github.com/repos/jenkinsci/git-client-plugin","forks_url":"https://api.github.com/repos/jenkinsci/git-client-plugin/forks","keys_url":"https://api.github.com/repos/jenkinsci/git-client-plugin/keys{/key_id}","collaborators_url":"https://api.github.com/repos/jenkinsci/git-client-plugin/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/jenkinsci/git-client-plugin/teams","hooks_url":"https://api.github.com/repos/jenkinsci/git-client-plugin/hooks","issue_events_url":"https://api.github.com/repos/jenkinsci/git-client-plugin/issues/events{/number}","events_url":"https://api.github.com/repos/jenkinsci/git-client-plugin/events","assignees_url":"https://api.github.com/repos/jenkinsci/git-client-plugin/assignees{/user}","branches_url":"https://api.github.com/repos/jenkinsci/git-client-plugin/branches{/branch}","tags_url":"https://api.github.com/repos/jenkinsci/git-client-plugin/tags","blobs_url":"https://api.github.com/repos/jenkinsci/git-client-plugin/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/jenkinsci/git-client-plugin/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/jenkinsci/git-client-plugin/git/refs{/sha}","trees_url":"https://api.github.com/repos/jenkinsci/git-client-plugin/git/trees{/sha}","statuses_url":"https://api.github.com/repos/jenkinsci/git-client-plugin/statuses/{sha}","languages_url":"https://api.github.com/repos/jenkinsci/git-client-plugin/languages","stargazers_url":"https://api.github.com/repos/jenkinsci/git-client-plugin/stargazers","contributors_url":"https://api.github.com/repos/jenkinsci/git-client-plugin/contributors","subscribers_url":"https://api.github.com/repos/jenkinsci/git-client-plugin/subscribers","subscription_url":"https://api.github.com/repos/jenkinsci/git-client-plugin/subscription","commits_url":"https://api.github.com/repos/jenkinsci/git-client-plugin/commits{/sha}","git_commits_url":"https://api.github.com/repos/jenkinsci/git-client-plugin/git/commits{/sha}","comments_url":"https://api.github.com/repos/jenkinsci/git-client-plugin/comments{/number}","issue_comment_url":"https://api.github.com/repos/jenkinsci/git-client-plugin/issues/comments{/number}","contents_url":"https://api.github.com/repos/jenkinsci/git-client-plugin/contents/{+path}","compare_url":"https://api.github.com/repos/jenkinsci/git-client-plugin/compare/{base}...{head}","merges_url":"https://api.github.com/repos/jenkinsci/git-client-plugin/merges","archive_url":"https://api.github.com/repos/jenkinsci/git-client-plugin/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/jenkinsci/git-client-plugin/downloads","issues_url":"https://api.github.com/repos/jenkinsci/git-client-plugin/issues{/number}","pulls_url":"https://api.github.com/repos/jenkinsci/git-client-plugin/pulls{/number}","milestones_url":"https://api.github.com/repos/jenkinsci/git-client-plugin/milestones{/number}","notifications_url":"https://api.github.com/repos/jenkinsci/git-client-plugin/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/jenkinsci/git-client-plugin/labels{/name}","releases_url":"https://api.github.com/repos/jenkinsci/git-client-plugin/releases{/id}","created_at":"2013-02-18T07:23:45Z","updated_at":"2015-05-07T17:31:41Z","pushed_at":"2015-05-30T15:22:52Z","git_url":"git://github.com/jenkinsci/git-client-plugin.git","ssh_url":"git@github.com:jenkinsci/git-client-plugin.git","clone_url":"https://github.com/jenkinsci/git-client-plugin.git","svn_url":"https://github.com/jenkinsci/git-client-plugin","homepage":"https://wiki.jenkins-ci.org/display/JENKINS/Git+Client+Plugin","size":5820,"stargazers_count":33,"watchers_count":33,"language":"Java","has_issues":false,"has_downloads":true,"has_wiki":false,"has_pages":false,"forks_count":129,"mirror_url":null,"open_issues_count":5,"forks":129,"open_issues":5,"watchers":33,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/jenkinsci/git-client-plugin/pulls/163"},"html":{"href":"https://github.com/jenkinsci/git-client-plugin/pull/163"},"issue":{"href":"https://api.github.com/repos/jenkinsci/git-client-plugin/issues/163"},"comments":{"href":"https://api.github.com/repos/jenkinsci/git-client-plugin/issues/163/comments"},"review_comments":{"href":"https://api.github.com/repos/jenkinsci/git-client-plugin/pulls/163/comments"},"review_comment":{"href":"https://api.github.com/repos/jenkinsci/git-client-plugin/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/jenkinsci/git-client-plugin/pulls/163/commits"},"statuses":{"href":"https://api.github.com/repos/jenkinsci/git-client-plugin/statuses/ff38411520ee3462dd94350c73a45cc9292937d3"}},"merged":false,"mergeable":true,"mergeable_state":"clean","merged_by":null,"comments":10,"review_comments":0,"commits":1,"additions":2,"deletions":2,"changed_files":1}}