I've seen this, too. It's a git defect, likely to do with how it creates and modifies files. To clarify the problem:
# mount a samba share locally.
$ mount -t cifs options //share/project /mnt/project
# The share contains a git checkout.
# Do some typical development.
$ cd /mnt/project
$ vi file ## ok
$ git pull ## ok
$ git status ## ok
$ git add file ## error!
error: unable to create temporary sha1 filename
.git/objects/8b/tmp_obj_mYE1Xi: Permission denied
## But everything from the shell seems to work.
$ ls -latr .git/objects/8b/ ## ok. empty dir.
$ touch .git/objects/8b/tmp_obj_mYE1Xi ## ok.
$ echo test123> .git/objects/8b/tmp_obj_mYE1Xi ## ok.
$ cat .git/objects/8b/tmp_obj_mYE1Xi ## ok.
test123
$ rm .git/objects/8b/tmp_obj_mYE1Xi ## ok.
In git version 1.5.6.5 (latest Debian package), you get the error when you try to git-add
. If you install git 1.7.3.2 (latest release), you can add the file, but you will get the error when you attempt to commit.