salarkhan / git-pear

swap credentials after each commit
3 stars 0 forks source link

Tests for duplicate emails and informs user if this happens #19

Closed supertopher closed 10 years ago

supertopher commented 10 years ago

Currently all other users will be added without throwing an error In fact this doesn't even throw an error it just doesn't add the email Closes #14

tumblr_mj0ge68egw1rrecxqo1_500

salarkhan commented 10 years ago

Why use an if/else block as opposed to

grep -q $1 $team_text_location && echo blah blah blah && exit 0 echo $1 >> $team_text_location

kinda like a guard clause? or is that dumb

supertopher commented 10 years ago

i thought it was clearer for reading the code as i'm using an else statement. also i don't remember how long it was but i felt that the line length was fairly excessive.

also i think i've been avoiding bash if statements because they seemed to act weird... but i'm more comfy with them these days

open to pushback on this point

salarkhan commented 10 years ago

You know, I guess I felt that operators were more bash-y than if/else statements, but i'm fairly certain that's a completely made up & dumb notion.

Both are legible to me, but I don't feel strongly enough about this to warrant any pushback. Also didn't even think about the line length issue, good point. Finna merge

twerk