{"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":3,"created_at":"2015-10-03T23:59:39Z","updated_at":"2015-10-06T21:32:43Z","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/146008187","html_url":"https://github.com/openshift/source-to-image/issues/299#issuecomment-146008187","issue_url":"https://api.github.com/repos/openshift/source-to-image/issues/299","id":146008187,"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:32:43Z","updated_at":"2015-10-06T21:32:43Z","body":"> My vote would be to just have the presence of .s2iignore bypass the default pattern.\r\n\r\nhonestly we probably want to do both.\r\n\r\n1) flag that lets you override the default exclusion pattern from the CLI\r\n2) if there's a .s2iignore file, don't apply the default exclusion pattern and use the .s2iignore instead.\r\n\r\n@soltysh what do you think?\r\n"}}