{"action":"created","issue":{"url":"https://api.github.com/repos/openshift/source-to-image/issues/299","labels_url":"https://api.github.com/repos/openshift/source-to-image/issues/299/labels{/name}","comments_url":"https://api.github.com/repos/openshift/source-to-image/issues/299/comments","events_url":"https://api.github.com/repos/openshift/source-to-image/issues/299/events","html_url":"https://github.com/openshift/source-to-image/issues/299","id":109652415,"number":299,"title":"Not possible to include/restore .git directory via .s2iignore","user":{"login":"binarybabel","id":3771540,"avatar_url":"https://avatars.githubusercontent.com/u/3771540?v=3","gravatar_id":"","url":"https://api.github.com/users/binarybabel","html_url":"https://github.com/binarybabel","followers_url":"https://api.github.com/users/binarybabel/followers","following_url":"https://api.github.com/users/binarybabel/following{/other_user}","gists_url":"https://api.github.com/users/binarybabel/gists{/gist_id}","starred_url":"https://api.github.com/users/binarybabel/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/binarybabel/subscriptions","organizations_url":"https://api.github.com/users/binarybabel/orgs","repos_url":"https://api.github.com/users/binarybabel/repos","events_url":"https://api.github.com/users/binarybabel/events{/privacy}","received_events_url":"https://api.github.com/users/binarybabel/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":{"login":"gabemontero","id":3594868,"avatar_url":"https://avatars.githubusercontent.com/u/3594868?v=3","gravatar_id":"","url":"https://api.github.com/users/gabemontero","html_url":"https://github.com/gabemontero","followers_url":"https://api.github.com/users/gabemontero/followers","following_url":"https://api.github.com/users/gabemontero/following{/other_user}","gists_url":"https://api.github.com/users/gabemontero/gists{/gist_id}","starred_url":"https://api.github.com/users/gabemontero/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/gabemontero/subscriptions","organizations_url":"https://api.github.com/users/gabemontero/orgs","repos_url":"https://api.github.com/users/gabemontero/repos","events_url":"https://api.github.com/users/gabemontero/events{/privacy}","received_events_url":"https://api.github.com/users/gabemontero/received_events","type":"User","site_admin":false},"milestone":null,"comments":5,"created_at":"2015-10-03T23:59:39Z","updated_at":"2015-10-06T21:52:53Z","closed_at":null,"body":"It would seem the *default* [ignore expression](https://github.com/openshift/source-to-image/blob/master/pkg/tar/tar.go#L25) cannot be overriden by a `.s2iignore` file.\r\n\r\nSpecifically it is not possible to ensure the source `.git` directory is tarred over to the new image **if specifically desired**. At least no pattern I've included has been able to accomplish this. The addition of the `.s2iignore` file doesn't automatically override the default pattern, and using a **not** expression doesn't work either.\r\n\r\nThe use-case in particular would be that some deployed applications benefit from information on the specific build (like it's commit id). I'm going to open a suggested feature improvement with regards to that example, but generally speaking it should be possible to have the `.git` directory deployed as a workaround when necessary. The nature of a default exclusion pattern would imply that it can be overridden."},"comment":{"url":"https://api.github.com/repos/openshift/source-to-image/issues/comments/146012461","html_url":"https://github.com/openshift/source-to-image/issues/299#issuecomment-146012461","issue_url":"https://api.github.com/repos/openshift/source-to-image/issues/299","id":146012461,"user":{"login":"bparees","id":4974046,"avatar_url":"https://avatars.githubusercontent.com/u/4974046?v=3","gravatar_id":"","url":"https://api.github.com/users/bparees","html_url":"https://github.com/bparees","followers_url":"https://api.github.com/users/bparees/followers","following_url":"https://api.github.com/users/bparees/following{/other_user}","gists_url":"https://api.github.com/users/bparees/gists{/gist_id}","starred_url":"https://api.github.com/users/bparees/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/bparees/subscriptions","organizations_url":"https://api.github.com/users/bparees/orgs","repos_url":"https://api.github.com/users/bparees/repos","events_url":"https://api.github.com/users/bparees/events{/privacy}","received_events_url":"https://api.github.com/users/bparees/received_events","type":"User","site_admin":false},"created_at":"2015-10-06T21:52:53Z","updated_at":"2015-10-06T21:52:53Z","body":"yeah i was curious where that default exclusion came from too.  i guess we figured there's no likely need to have .git history in your final application image (and probably some good reasons not to).\r\n\r\ni can live with the \"just .s2iignore\" path (and it sounds like @binarybabel can too), just thinking it kinda sucks to have to create that file in your source repo to do a simple override.  but sure we can start there.\r\n"}}