{"action":"created","issue":{"url":"https://api.github.com/repos/AGWA/git-crypt/issues/53","labels_url":"https://api.github.com/repos/AGWA/git-crypt/issues/53/labels{/name}","comments_url":"https://api.github.com/repos/AGWA/git-crypt/issues/53/comments","events_url":"https://api.github.com/repos/AGWA/git-crypt/issues/53/events","html_url":"https://github.com/AGWA/git-crypt/issues/53","id":73350382,"number":53,"title":"Issue performing interactive rebases","user":{"login":"oskarpearson","id":129002,"avatar_url":"https://avatars.githubusercontent.com/u/129002?v=3","gravatar_id":"","url":"https://api.github.com/users/oskarpearson","html_url":"https://github.com/oskarpearson","followers_url":"https://api.github.com/users/oskarpearson/followers","following_url":"https://api.github.com/users/oskarpearson/following{/other_user}","gists_url":"https://api.github.com/users/oskarpearson/gists{/gist_id}","starred_url":"https://api.github.com/users/oskarpearson/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/oskarpearson/subscriptions","organizations_url":"https://api.github.com/users/oskarpearson/orgs","repos_url":"https://api.github.com/users/oskarpearson/repos","events_url":"https://api.github.com/users/oskarpearson/events{/privacy}","received_events_url":"https://api.github.com/users/oskarpearson/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":4,"created_at":"2015-05-05T15:41:55Z","updated_at":"2015-05-13T16:46:42Z","closed_at":null,"body":"Hi\r\n\r\nI was wondering if there is a known problem with interactive rebasing? This happens on a freshly-cloned repo containing git-crypt objects:\r\n\r\n```shell\r\n$ git clone git@github.com:user/somethinghere.git\r\n$ cd somethinghere\r\n$ git checkout some_branch_name\r\nSwitched to branch 'some_branch_name'\r\nYour branch is up-to-date with 'origin/some_branch_name'.\r\n$ git status\r\nOn branch some_branch_name\r\nYour branch is up-to-date with 'origin/some_branch_name'.\r\nnothing to commit, working directory clean\r\n$ git rebase -i HEAD~5\r\nCannot rebase: You have unstaged changes.\r\nPlease commit or stash them.\r\n$ git status\r\nOn branch some_branch_name\r\nYour branch is up-to-date with 'origin/master'.\r\nnothing to commit, working directory clean\r\n```\r\n\r\nUnfortunately I can't share the actual repo that has the issue.\r\n\r\nEnvironment:\r\n\r\n* git-crypt 0.4.2\r\n* Mac os 10.10.3\r\n* git version 2.4.0\r\n\r\nThanks for your time!"},"comment":{"url":"https://api.github.com/repos/AGWA/git-crypt/issues/comments/101741897","html_url":"https://github.com/AGWA/git-crypt/issues/53#issuecomment-101741897","issue_url":"https://api.github.com/repos/AGWA/git-crypt/issues/53","id":101741897,"user":{"login":"oskarpearson","id":129002,"avatar_url":"https://avatars.githubusercontent.com/u/129002?v=3","gravatar_id":"","url":"https://api.github.com/users/oskarpearson","html_url":"https://github.com/oskarpearson","followers_url":"https://api.github.com/users/oskarpearson/followers","following_url":"https://api.github.com/users/oskarpearson/following{/other_user}","gists_url":"https://api.github.com/users/oskarpearson/gists{/gist_id}","starred_url":"https://api.github.com/users/oskarpearson/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/oskarpearson/subscriptions","organizations_url":"https://api.github.com/users/oskarpearson/orgs","repos_url":"https://api.github.com/users/oskarpearson/repos","events_url":"https://api.github.com/users/oskarpearson/events{/privacy}","received_events_url":"https://api.github.com/users/oskarpearson/received_events","type":"User","site_admin":false},"created_at":"2015-05-13T16:46:42Z","updated_at":"2015-05-13T16:46:42Z","body":"Hi\r\n\r\nI'm almost certain this has to do with an encrypted zero-byte file in the repository. I've re-created the problem as per the below:\r\n\r\n\r\nGeneral initiation:\r\n```\r\nOskars-MacBook-Pro:junk-me oskar$ mkdir git-crypt-bug-53\r\nOskars-MacBook-Pro:junk-me oskar$ cd git-crypt-bug-53\r\nOskars-MacBook-Pro:git-crypt-bug-53 oskar$ git init .\r\nInitialized empty Git repository in /Users/oskar/Desktop/junk-me/git-crypt-bug-53/.git/\r\nOskars-MacBook-Pro:git-crypt-bug-53 oskar$ git-crypt init\r\nGenerating key...\r\nOskars-MacBook-Pro:git-crypt-bug-53 oskar$ cat > .gitattributes\r\nsecretfile filter=git-crypt diff=git-crypt\r\n*.key filter=git-crypt diff=git-crypt\r\nOskars-MacBook-Pro:git-crypt-bug-53 oskar$ git add -A\r\nOskars-MacBook-Pro:git-crypt-bug-53 oskar$ git-crypt add-gpg-user E93E631C8A693BAF\r\n[master (root-commit) 2a89cea] Add 1 git-crypt collaborator\r\n 2 files changed, 1 insertion(+)\r\n create mode 100644 .git-crypt/.gitattributes\r\n create mode 100644 .git-crypt/keys/default/0/49E686824F50A52AC04723D2E93E631C8A693BAF.gpg\r\nOskars-MacBook-Pro:git-crypt-bug-53 oskar$ git commit -m \"Git and git-crypt init\" -a\r\n[master a29c1fb] Git and git-crypt init\r\n 1 file changed, 3 insertions(+)\r\n create mode 100644 .gitattributes\r\nOskars-MacBook-Pro:git-crypt-bug-53 oskar$ touch zero-byte-file.key\r\nOskars-MacBook-Pro:git-crypt-bug-53 oskar$ git add -A\r\nOskars-MacBook-Pro:git-crypt-bug-53 oskar$ git commit -m \"Added zero byte file\" -a\r\n[master 6fb1077] Added zero byte file\r\n 1 file changed, 0 insertions(+), 0 deletions(-)\r\n create mode 100644 zero-byte-file.key\r\n```\r\n\r\nAfter the above, here's the status:\r\n```\r\nOskars-MacBook-Pro:git-crypt-bug-53 oskar$ git-crypt status\r\nnot encrypted: .git-crypt/.gitattributes\r\nnot encrypted: .git-crypt/keys/default/0/49E686824F50A52AC04723D2E93E631C8A693BAF.gpg\r\nnot encrypted: .gitattributes\r\n    encrypted: zero-byte-file.key\r\n```\r\n\r\n\r\nNow try create a branch and make some changes:\r\n```\r\nOskars-MacBook-Pro:git-crypt-bug-53 oskar$ git checkout -b some-branch\r\nSwitched to a new branch 'some-branch'\r\nOskars-MacBook-Pro:git-crypt-bug-53 oskar$ echo whatever > whatever.txt\r\nOskars-MacBook-Pro:git-crypt-bug-53 oskar$ git add whatever.txt\r\nOskars-MacBook-Pro:git-crypt-bug-53 oskar$ git commit -m 'whatever' -a\r\n[some-branch 6a4de09] whatever\r\n 1 file changed, 1 insertion(+)\r\n create mode 100644 whatever.txt\r\n```\r\n\r\n\r\nStatus before the rebase - everything looks ok:\r\n```\r\nOskars-MacBook-Pro:git-crypt-bug-53 oskar$ git status\r\nOn branch some-branch\r\nnothing to commit, working directory clean\r\nOskars-MacBook-Pro:git-crypt-bug-53 oskar$ git-crypt status\r\nnot encrypted: .git-crypt/.gitattributes\r\nnot encrypted: .git-crypt/keys/default/0/49E686824F50A52AC04723D2E93E631C8A693BAF.gpg\r\nnot encrypted: .gitattributes\r\nnot encrypted: whatever.txt\r\n    encrypted: zero-byte-file.key\r\n```\r\n\r\nNow, try rebase and we get the error:\r\n```\r\nOskars-MacBook-Pro:git-crypt-bug-53 oskar$ git rebase master\r\n**Cannot rebase: You have unstaged changes.**\r\nPlease commit or stash them.\r\nOskars-MacBook-Pro:git-crypt-bug-53 oskar$ git status\r\nOn branch some-branch\r\nnothing to commit, working directory clean\r\nOskars-MacBook-Pro:git-crypt-bug-53 oskar$ git-crypt status\r\nnot encrypted: .git-crypt/.gitattributes\r\nnot encrypted: .git-crypt/keys/default/0/49E686824F50A52AC04723D2E93E631C8A693BAF.gpg\r\nnot encrypted: .gitattributes\r\nnot encrypted: whatever.txt\r\n    encrypted: zero-byte-file.key\r\nOskars-MacBook-Pro:git-crypt-bug-53 oskar$\r\n```\r\n\r\nIt's also worth noting that if I view the directory in textmate, the zero-byte-file.key file appears to have uncommitted changes - despite what 'git status' says."}}