atofigh/git-raw — pull request #1 by danidb (2014-12-16 22:43:13+00:00)
Title: Add ability to recursively add  directories with the git raw add command...

Hi Ali,

I've been working with git-raw etc. and getting huc on bci into an R package! I didn't want to have to add a whole bunch of files manually so I took a shot at modifying git-raw to be able to add files in directories recursively. Disclaimer: I haven't written any python in a looooooooooooong time, and never anything serious...

I added a utility function that goes through the directory and returns all the paths to files in the dir + all sub directories etc. recursively. Maybe it will be useful for adding other functionality in the future.

Let me know what you think, I submit this for your judgement

Modify git-raw

Add recurse_dir_paths in utility functions.
A simple funcition that take a path to a directory
and returns a list of paths to all files within that
directory and any sub(sub(sub(directories))) you get the idea,
recursivly.

Modify add command.
Check if the argument is a directory. If so use recurse_dir_paths
to add get a list of paths to all its contents. If argument is a
file, proceed as was done previously.