schacon / git-scribe

basically the best way to write an ebook
MIT License
1.35k stars 121 forks source link

Need filtering of .git folders for submodules beneath book/ #21

Closed matthewmccullough closed 10 years ago

matthewmccullough commented 13 years ago

We're using a submodule to host the example_code folder beneath book/. When we git scribe gen, we get all files copied to output/. We'd like either a configurable filter on what gets copied, or in the short term, a filter on .git folders to not be copied.

The manifestation that hurts is that the permissions are such that the .git folder won't copy on top of itself without fully deleting them at the destination output folder.

$git scribe gen pdf
GENERATING PDF
GENERATING DOCBOOK

then, again:

$git scribe gen pdf
Error: Permission denied - output/example_code/.git/objects/00/4caf09edf1c4a8d59f91fef81a60f9fd09db96

And the permissions for the object that prevents this from overwriting:

$ ls -al output/example_code/.git/objects/00
drwxr-xr-x   3 mccm06  staff   102B May  1 23:38 ./
drwxr-xr-x  95 mccm06  staff   3.2K May  1 23:38 ../
-r--r--r--   1 mccm06  staff   170B May  1 23:38 4caf09edf1c4a8d59f91fef81a60f9fd09db96