Closed salarkhan closed 10 years ago
Flow for add should be:
Add to text file
..and that's it. I think the prehook should just call 2 scripts to get the author & committer values out of that .txt
i actually kinda like the use case in your first comment. It would allow lets say me as a local to add you and you only. i.e.:
pear add sk@gmail.com
this would create a text file with your email and my email (pulled from global) whereas
pear sk@gmail.com
would set the text file to be just you
also :+1: on the pre-hook functionality
the first thing you said makes it seem like pear add sk@gmail.com
would touch the txt file, append the email from git config --global
, and then append sk@gmail.com
pear sk@gmail.com
on the other hand, would just do the 1st & 3rd thing.
is my understanding correct?
yeah. does that sounds like a worthwhile thing to do or should be keep it more simple?
Here are the 2 options I see:
pear sk@gmail.com chris@gmail.com
pear add sk@gmail.com chris@gmail.com
The latter will allow us to maintain the current architecture in
pear
, while the former will require some shenanigans around lines 26-32 inpear
.Something along the lines of running a regex against the argument to check if it's an email && firing
pear add $command
? Seems kinda dumb..