Closed salarkhan closed 10 years ago
we should sink some time into this. i def think it's cleaner than using a text file.
however
if we find that making this happen results in code that is less inefficient than using team.txt
, i'm cool with simply moving team.txt
to the .git/info
dir. thoughts?
i'm not opposed, but i think i see a clear path with git config --local
making solid progress on this. think I'll have it done by tonight
my game plan was to pretty much mimic everything about what we were doing, except using git config --local team.emails
as a key to store all emails as values.
worked wonderfully until I tried to cycle. here's the problem:
git config --local --get-all
gives us all values associated with a key
git config --local --get
gives us the last value associated with a key
git config --local --unset-all
unsets all values associated with a key
git config --local --unset
fails if there is more than 1 value associated with a key
this means that we can't just take the top value of team.emails
out and then paste it on the bottom as we were doing with team.txt
. if we unset-all
, we lose the emails before we can cycle.
i guess we could read the values of team.emails
, store 'em in an array and then write them back in a cycled order? sounds kinda gross tbh
anyway, I got it working pretty cleanly with just 2 emails. i'll submit that PR once i iron out the kinks, that way we can have a choice of solutions.
i'm tired as shit, so this all prob sounds like straight up derp. feel free to knock this one out if you think you got it
FINALLY DONE AWWW YEAHHH
it is time.