{"issue":{"milestone":null,"user":{"login":"msabramo","id":305268,"url":"https://api.github.com/users/msabramo","avatar_url":"https://secure.gravatar.com/avatar/3d91a2f54a0ad7f3044458a064ea7a84?d=https://a248.e.akamai.net/assets.github.com%2Fimages%2Fgravatars%2Fgravatar-140.png","gravatar_id":"3d91a2f54a0ad7f3044458a064ea7a84"},"title":"When creating a new file, the new file gets added to git but not its contents","created_at":"2011-12-18T04:48:36Z","labels":[{"name":"need more info","url":"https://api.github.com/repos/hbons/SparkleShare/labels/need+more+info","color":"ededed"}],"updated_at":"2011-12-19T16:45:22Z","state":"open","id":2591835,"pull_request":{"patch_url":null,"html_url":null,"diff_url":null},"html_url":"https://github.com/hbons/SparkleShare/issues/484","closed_at":null,"body":"I'm using SparkleShare 0.4.2 on OS X 10.6.8 -- the folder I'm using is hooked up to a git repository on my web host, but I also saw this behavior when using a folder hooked up to GitHub.\r\n\r\nHere's my SparkleShare directory on my Mac before creating the file:\r\n\r\n```\r\nmarca@SCML-MarcA:~/SparkleShare/sparkleshare$ ls -l\r\ntotal 4\r\n-rw-r--r-- 1 marca CHEGG\\domain users 3 Dec 17 13:38 SparkleShare.txt\r\n```\r\n\r\nThen I add a new file:\r\n\r\n```\r\nmarca@SCML-MarcA:~/SparkleShare/sparkleshare$ cat >> hello_world.txt\r\nHello, world\r\n\r\nThis is a file with some text.\r\n```\r\n\r\n```\r\nmarca@SCML-MarcA:~/SparkleShare/sparkleshare$ ls -l\r\ntotal 8\r\n-rw-r--r-- 1 marca CHEGG\\domain users  3 Dec 17 13:38 SparkleShare.txt\r\n-rw-r--r-- 1 marca CHEGG\\domain users 45 Dec 17 20:34 hello_world.txt\r\n```\r\n\r\n```\r\nmarca@SCML-MarcA:~/SparkleShare/sparkleshare$ git status --short\r\n M hello_world.txt\r\n\r\nmarca@SCML-MarcA:~/SparkleShare/sparkleshare$ PAGER=cat git diff\r\ndiff --git a/hello_world.txt b/hello_world.txt\r\nindex e69de29..0529e8f 100644\r\n--- a/hello_world.txt\r\n+++ b/hello_world.txt\r\n@@ -0,0 +1,3 @@\r\n+Hello, world\r\n+\r\n+This is a file with some text.\r\n\r\nmarca@SCML-MarcA:~/SparkleShare/sparkleshare$ PAGER=cat git log -1 --oneline\r\ne0a2284 + ‘hello_world.txt’\r\n```\r\n\r\nSo a git commit was created for creating a new blank file, but no commit was created for adding the content. Even if I append to the file, nothing happens.\r\n\r\n```\r\nmarca@SCML-MarcA:~/SparkleShare/sparkleshare$ cat >> hello_world.txt\r\nSome more text.\r\n\r\nmarca@SCML-MarcA:~/SparkleShare/sparkleshare$ PAGER=cat git diff\r\ndiff --git a/hello_world.txt b/hello_world.txt\r\nindex e69de29..bfae154 100644\r\n--- a/hello_world.txt\r\n+++ b/hello_world.txt\r\n@@ -0,0 +1,4 @@\r\n+Hello, world\r\n+\r\n+This is a file with some text.\r\n+Some more text.\r\n```\r\n\r\nConsequently when I pull from the git repo on a remote host, I get an empty file:\r\n\r\n```\r\nmsabramo@wettoad:~/dev/git-repos/sparkleshare$ git pull\r\nremote: Counting objects: 4, done.\r\nremote: Compressing objects: 100% (2/2), done.\r\nremote: Total 3 (delta 0), reused 0 (delta 0)\r\nUnpacking objects: 100% (3/3), done.\r\nFrom /home/msabramo/sparkleshare\r\n   55b5a61..e0a2284  master     -> origin/master\r\nUpdating 55b5a61..e0a2284\r\nFast-forward\r\n 0 files changed, 0 insertions(+), 0 deletions(-)\r\n create mode 100644 hello_world.txt\r\n\r\nmsabramo@wettoad:~/dev/git-repos/sparkleshare$ ls -l\r\ntotal 4\r\n-rw-r--r-- 1 msabramo pg156676 3 Dec 17 13:48 SparkleShare.txt\r\n-rw-r--r-- 1 msabramo pg156676 0 Dec 17 20:36 hello_world.txt\r\n\r\nmsabramo@wettoad:~/dev/git-repos/sparkleshare$ git pull\r\nAlready up-to-date.\r\n```","number":484,"url":"https://api.github.com/repos/hbons/SparkleShare/issues/484","comments":3,"assignee":null},"comment":{"user":{"login":"hbons","id":103326,"url":"https://api.github.com/users/hbons","avatar_url":"https://secure.gravatar.com/avatar/3e8eee17a5d6c6a20b073af0d2b2b48b?d=https://a248.e.akamai.net/assets.github.com%2Fimages%2Fgravatars%2Fgravatar-140.png","gravatar_id":"3e8eee17a5d6c6a20b073af0d2b2b48b"},"created_at":"2011-12-19T16:45:22Z","updated_at":"2011-12-19T16:45:22Z","id":3205707,"body":"It uses System.IO.FileSystemWatcher. On linux that's implemented uses inotify I think.","url":"https://api.github.com/repos/hbons/SparkleShare/issues/comments/3205707"},"action":"created"}