{"action":"created","comment":{"url":"https://api.github.com/repos/sobolevn/git-secret/pulls/comments/182492137","pull_request_review_id":113298606,"id":182492137,"diff_hunk":"@@ -32,9 +32,14 @@ function add {\n     normalized_path=$(_git_normalize_filename \"$item\")\n     path=$(_append_root_path \"$normalized_path\")\n \n+    # check that the file is not tracked\n+    if [[ $(git ls-files --error-unmatch \"$item\") ]]; then","path":"src/commands/git_secret_add.sh","position":null,"original_position":5,"commit_id":"52bbc2016248a380f8ebfe47460ec3bee00e31ac","original_commit_id":"ffa89ceaa29f925b5598436e184d6459cdeefa3f","user":{"login":"joshrabinowitz","id":699993,"avatar_url":"https://avatars3.githubusercontent.com/u/699993?v=4","gravatar_id":"","url":"https://api.github.com/users/joshrabinowitz","html_url":"https://github.com/joshrabinowitz","followers_url":"https://api.github.com/users/joshrabinowitz/followers","following_url":"https://api.github.com/users/joshrabinowitz/following{/other_user}","gists_url":"https://api.github.com/users/joshrabinowitz/gists{/gist_id}","starred_url":"https://api.github.com/users/joshrabinowitz/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/joshrabinowitz/subscriptions","organizations_url":"https://api.github.com/users/joshrabinowitz/orgs","repos_url":"https://api.github.com/users/joshrabinowitz/repos","events_url":"https://api.github.com/users/joshrabinowitz/events{/privacy}","received_events_url":"https://api.github.com/users/joshrabinowitz/received_events","type":"User","site_admin":false},"body":"and thanks for chiming in @aymens \r\n","created_at":"2018-04-18T16:36:02Z","updated_at":"2018-04-18T16:36:02Z","html_url":"https://github.com/sobolevn/git-secret/pull/156#discussion_r182492137","pull_request_url":"https://api.github.com/repos/sobolevn/git-secret/pulls/156","author_association":"COLLABORATOR","_links":{"self":{"href":"https://api.github.com/repos/sobolevn/git-secret/pulls/comments/182492137"},"html":{"href":"https://github.com/sobolevn/git-secret/pull/156#discussion_r182492137"},"pull_request":{"href":"https://api.github.com/repos/sobolevn/git-secret/pulls/156"}},"in_reply_to_id":182241472},"pull_request":{"url":"https://api.github.com/repos/sobolevn/git-secret/pulls/156","id":182279734,"html_url":"https://github.com/sobolevn/git-secret/pull/156","diff_url":"https://github.com/sobolevn/git-secret/pull/156.diff","patch_url":"https://github.com/sobolevn/git-secret/pull/156.patch","issue_url":"https://api.github.com/repos/sobolevn/git-secret/issues/156","number":156,"state":"closed","locked":false,"title":"improve error message when trying to 'git secret add' a file tracked by git","user":{"login":"joshrabinowitz","id":699993,"avatar_url":"https://avatars3.githubusercontent.com/u/699993?v=4","gravatar_id":"","url":"https://api.github.com/users/joshrabinowitz","html_url":"https://github.com/joshrabinowitz","followers_url":"https://api.github.com/users/joshrabinowitz/followers","following_url":"https://api.github.com/users/joshrabinowitz/following{/other_user}","gists_url":"https://api.github.com/users/joshrabinowitz/gists{/gist_id}","starred_url":"https://api.github.com/users/joshrabinowitz/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/joshrabinowitz/subscriptions","organizations_url":"https://api.github.com/users/joshrabinowitz/orgs","repos_url":"https://api.github.com/users/joshrabinowitz/repos","events_url":"https://api.github.com/users/joshrabinowitz/events{/privacy}","received_events_url":"https://api.github.com/users/joshrabinowitz/received_events","type":"User","site_admin":false},"body":"Closes #126 \r\n\r\nNow complains \"file tracked in git, consider using 'git rm --cached yourfilename.txt'\"","created_at":"2018-04-17T20:07:31Z","updated_at":"2018-04-18T16:36:02Z","closed_at":"2018-04-18T13:25:34Z","merged_at":"2018-04-18T13:25:34Z","merge_commit_sha":"5572894af7a6be33f1759b9b8dff71eafbfdbda3","assignee":null,"assignees":[],"requested_reviewers":[],"requested_teams":[],"labels":[],"milestone":null,"commits_url":"https://api.github.com/repos/sobolevn/git-secret/pulls/156/commits","review_comments_url":"https://api.github.com/repos/sobolevn/git-secret/pulls/156/comments","review_comment_url":"https://api.github.com/repos/sobolevn/git-secret/pulls/comments{/number}","comments_url":"https://api.github.com/repos/sobolevn/git-secret/issues/156/comments","statuses_url":"https://api.github.com/repos/sobolevn/git-secret/statuses/52bbc2016248a380f8ebfe47460ec3bee00e31ac","head":{"label":"joshrabinowitz:add-tracked-file-126","ref":"add-tracked-file-126","sha":"52bbc2016248a380f8ebfe47460ec3bee00e31ac","user":{"login":"joshrabinowitz","id":699993,"avatar_url":"https://avatars3.githubusercontent.com/u/699993?v=4","gravatar_id":"","url":"https://api.github.com/users/joshrabinowitz","html_url":"https://github.com/joshrabinowitz","followers_url":"https://api.github.com/users/joshrabinowitz/followers","following_url":"https://api.github.com/users/joshrabinowitz/following{/other_user}","gists_url":"https://api.github.com/users/joshrabinowitz/gists{/gist_id}","starred_url":"https://api.github.com/users/joshrabinowitz/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/joshrabinowitz/subscriptions","organizations_url":"https://api.github.com/users/joshrabinowitz/orgs","repos_url":"https://api.github.com/users/joshrabinowitz/repos","events_url":"https://api.github.com/users/joshrabinowitz/events{/privacy}","received_events_url":"https://api.github.com/users/joshrabinowitz/received_events","type":"User","site_admin":false},"repo":{"id":129462036,"name":"git-secret","full_name":"joshrabinowitz/git-secret","owner":{"login":"joshrabinowitz","id":699993,"avatar_url":"https://avatars3.githubusercontent.com/u/699993?v=4","gravatar_id":"","url":"https://api.github.com/users/joshrabinowitz","html_url":"https://github.com/joshrabinowitz","followers_url":"https://api.github.com/users/joshrabinowitz/followers","following_url":"https://api.github.com/users/joshrabinowitz/following{/other_user}","gists_url":"https://api.github.com/users/joshrabinowitz/gists{/gist_id}","starred_url":"https://api.github.com/users/joshrabinowitz/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/joshrabinowitz/subscriptions","organizations_url":"https://api.github.com/users/joshrabinowitz/orgs","repos_url":"https://api.github.com/users/joshrabinowitz/repos","events_url":"https://api.github.com/users/joshrabinowitz/events{/privacy}","received_events_url":"https://api.github.com/users/joshrabinowitz/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/joshrabinowitz/git-secret","description":":busts_in_silhouette: A bash-tool to store your private data inside a git repository.","fork":true,"url":"https://api.github.com/repos/joshrabinowitz/git-secret","forks_url":"https://api.github.com/repos/joshrabinowitz/git-secret/forks","keys_url":"https://api.github.com/repos/joshrabinowitz/git-secret/keys{/key_id}","collaborators_url":"https://api.github.com/repos/joshrabinowitz/git-secret/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/joshrabinowitz/git-secret/teams","hooks_url":"https://api.github.com/repos/joshrabinowitz/git-secret/hooks","issue_events_url":"https://api.github.com/repos/joshrabinowitz/git-secret/issues/events{/number}","events_url":"https://api.github.com/repos/joshrabinowitz/git-secret/events","assignees_url":"https://api.github.com/repos/joshrabinowitz/git-secret/assignees{/user}","branches_url":"https://api.github.com/repos/joshrabinowitz/git-secret/branches{/branch}","tags_url":"https://api.github.com/repos/joshrabinowitz/git-secret/tags","blobs_url":"https://api.github.com/repos/joshrabinowitz/git-secret/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/joshrabinowitz/git-secret/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/joshrabinowitz/git-secret/git/refs{/sha}","trees_url":"https://api.github.com/repos/joshrabinowitz/git-secret/git/trees{/sha}","statuses_url":"https://api.github.com/repos/joshrabinowitz/git-secret/statuses/{sha}","languages_url":"https://api.github.com/repos/joshrabinowitz/git-secret/languages","stargazers_url":"https://api.github.com/repos/joshrabinowitz/git-secret/stargazers","contributors_url":"https://api.github.com/repos/joshrabinowitz/git-secret/contributors","subscribers_url":"https://api.github.com/repos/joshrabinowitz/git-secret/subscribers","subscription_url":"https://api.github.com/repos/joshrabinowitz/git-secret/subscription","commits_url":"https://api.github.com/repos/joshrabinowitz/git-secret/commits{/sha}","git_commits_url":"https://api.github.com/repos/joshrabinowitz/git-secret/git/commits{/sha}","comments_url":"https://api.github.com/repos/joshrabinowitz/git-secret/comments{/number}","issue_comment_url":"https://api.github.com/repos/joshrabinowitz/git-secret/issues/comments{/number}","contents_url":"https://api.github.com/repos/joshrabinowitz/git-secret/contents/{+path}","compare_url":"https://api.github.com/repos/joshrabinowitz/git-secret/compare/{base}...{head}","merges_url":"https://api.github.com/repos/joshrabinowitz/git-secret/merges","archive_url":"https://api.github.com/repos/joshrabinowitz/git-secret/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/joshrabinowitz/git-secret/downloads","issues_url":"https://api.github.com/repos/joshrabinowitz/git-secret/issues{/number}","pulls_url":"https://api.github.com/repos/joshrabinowitz/git-secret/pulls{/number}","milestones_url":"https://api.github.com/repos/joshrabinowitz/git-secret/milestones{/number}","notifications_url":"https://api.github.com/repos/joshrabinowitz/git-secret/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/joshrabinowitz/git-secret/labels{/name}","releases_url":"https://api.github.com/repos/joshrabinowitz/git-secret/releases{/id}","deployments_url":"https://api.github.com/repos/joshrabinowitz/git-secret/deployments","created_at":"2018-04-13T23:01:17Z","updated_at":"2018-04-18T14:59:21Z","pushed_at":"2018-04-18T14:59:20Z","git_url":"git://github.com/joshrabinowitz/git-secret.git","ssh_url":"git@github.com:joshrabinowitz/git-secret.git","clone_url":"https://github.com/joshrabinowitz/git-secret.git","svn_url":"https://github.com/joshrabinowitz/git-secret","homepage":"http://git-secret.io","size":2188,"stargazers_count":0,"watchers_count":0,"language":"Shell","has_issues":false,"has_projects":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":0,"mirror_url":null,"archived":false,"open_issues_count":0,"license":{"key":"mit","name":"MIT License","spdx_id":"MIT","url":"https://api.github.com/licenses/mit"},"forks":0,"open_issues":0,"watchers":0,"default_branch":"master"}},"base":{"label":"sobolevn:master","ref":"master","sha":"5b626fcb08b79048fe1a32c5eae3ffcd46cdda97","user":{"login":"sobolevn","id":4660275,"avatar_url":"https://avatars1.githubusercontent.com/u/4660275?v=4","gravatar_id":"","url":"https://api.github.com/users/sobolevn","html_url":"https://github.com/sobolevn","followers_url":"https://api.github.com/users/sobolevn/followers","following_url":"https://api.github.com/users/sobolevn/following{/other_user}","gists_url":"https://api.github.com/users/sobolevn/gists{/gist_id}","starred_url":"https://api.github.com/users/sobolevn/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/sobolevn/subscriptions","organizations_url":"https://api.github.com/users/sobolevn/orgs","repos_url":"https://api.github.com/users/sobolevn/repos","events_url":"https://api.github.com/users/sobolevn/events{/privacy}","received_events_url":"https://api.github.com/users/sobolevn/received_events","type":"User","site_admin":false},"repo":{"id":51747445,"name":"git-secret","full_name":"sobolevn/git-secret","owner":{"login":"sobolevn","id":4660275,"avatar_url":"https://avatars1.githubusercontent.com/u/4660275?v=4","gravatar_id":"","url":"https://api.github.com/users/sobolevn","html_url":"https://github.com/sobolevn","followers_url":"https://api.github.com/users/sobolevn/followers","following_url":"https://api.github.com/users/sobolevn/following{/other_user}","gists_url":"https://api.github.com/users/sobolevn/gists{/gist_id}","starred_url":"https://api.github.com/users/sobolevn/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/sobolevn/subscriptions","organizations_url":"https://api.github.com/users/sobolevn/orgs","repos_url":"https://api.github.com/users/sobolevn/repos","events_url":"https://api.github.com/users/sobolevn/events{/privacy}","received_events_url":"https://api.github.com/users/sobolevn/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/sobolevn/git-secret","description":":busts_in_silhouette: A bash-tool to store your private data inside a git repository.","fork":false,"url":"https://api.github.com/repos/sobolevn/git-secret","forks_url":"https://api.github.com/repos/sobolevn/git-secret/forks","keys_url":"https://api.github.com/repos/sobolevn/git-secret/keys{/key_id}","collaborators_url":"https://api.github.com/repos/sobolevn/git-secret/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/sobolevn/git-secret/teams","hooks_url":"https://api.github.com/repos/sobolevn/git-secret/hooks","issue_events_url":"https://api.github.com/repos/sobolevn/git-secret/issues/events{/number}","events_url":"https://api.github.com/repos/sobolevn/git-secret/events","assignees_url":"https://api.github.com/repos/sobolevn/git-secret/assignees{/user}","branches_url":"https://api.github.com/repos/sobolevn/git-secret/branches{/branch}","tags_url":"https://api.github.com/repos/sobolevn/git-secret/tags","blobs_url":"https://api.github.com/repos/sobolevn/git-secret/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/sobolevn/git-secret/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/sobolevn/git-secret/git/refs{/sha}","trees_url":"https://api.github.com/repos/sobolevn/git-secret/git/trees{/sha}","statuses_url":"https://api.github.com/repos/sobolevn/git-secret/statuses/{sha}","languages_url":"https://api.github.com/repos/sobolevn/git-secret/languages","stargazers_url":"https://api.github.com/repos/sobolevn/git-secret/stargazers","contributors_url":"https://api.github.com/repos/sobolevn/git-secret/contributors","subscribers_url":"https://api.github.com/repos/sobolevn/git-secret/subscribers","subscription_url":"https://api.github.com/repos/sobolevn/git-secret/subscription","commits_url":"https://api.github.com/repos/sobolevn/git-secret/commits{/sha}","git_commits_url":"https://api.github.com/repos/sobolevn/git-secret/git/commits{/sha}","comments_url":"https://api.github.com/repos/sobolevn/git-secret/comments{/number}","issue_comment_url":"https://api.github.com/repos/sobolevn/git-secret/issues/comments{/number}","contents_url":"https://api.github.com/repos/sobolevn/git-secret/contents/{+path}","compare_url":"https://api.github.com/repos/sobolevn/git-secret/compare/{base}...{head}","merges_url":"https://api.github.com/repos/sobolevn/git-secret/merges","archive_url":"https://api.github.com/repos/sobolevn/git-secret/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/sobolevn/git-secret/downloads","issues_url":"https://api.github.com/repos/sobolevn/git-secret/issues{/number}","pulls_url":"https://api.github.com/repos/sobolevn/git-secret/pulls{/number}","milestones_url":"https://api.github.com/repos/sobolevn/git-secret/milestones{/number}","notifications_url":"https://api.github.com/repos/sobolevn/git-secret/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/sobolevn/git-secret/labels{/name}","releases_url":"https://api.github.com/repos/sobolevn/git-secret/releases{/id}","deployments_url":"https://api.github.com/repos/sobolevn/git-secret/deployments","created_at":"2016-02-15T10:16:53Z","updated_at":"2018-04-18T13:25:36Z","pushed_at":"2018-04-18T15:02:25Z","git_url":"git://github.com/sobolevn/git-secret.git","ssh_url":"git@github.com:sobolevn/git-secret.git","clone_url":"https://github.com/sobolevn/git-secret.git","svn_url":"https://github.com/sobolevn/git-secret","homepage":"http://git-secret.io","size":2181,"stargazers_count":856,"watchers_count":856,"language":"Shell","has_issues":true,"has_projects":true,"has_downloads":true,"has_wiki":true,"has_pages":true,"forks_count":69,"mirror_url":null,"archived":false,"open_issues_count":13,"license":{"key":"mit","name":"MIT License","spdx_id":"MIT","url":"https://api.github.com/licenses/mit"},"forks":69,"open_issues":13,"watchers":856,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/sobolevn/git-secret/pulls/156"},"html":{"href":"https://github.com/sobolevn/git-secret/pull/156"},"issue":{"href":"https://api.github.com/repos/sobolevn/git-secret/issues/156"},"comments":{"href":"https://api.github.com/repos/sobolevn/git-secret/issues/156/comments"},"review_comments":{"href":"https://api.github.com/repos/sobolevn/git-secret/pulls/156/comments"},"review_comment":{"href":"https://api.github.com/repos/sobolevn/git-secret/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/sobolevn/git-secret/pulls/156/commits"},"statuses":{"href":"https://api.github.com/repos/sobolevn/git-secret/statuses/52bbc2016248a380f8ebfe47460ec3bee00e31ac"}},"author_association":"COLLABORATOR"}}
{"actor":{"display_login":"joshrabinowitz"}}