Skip to contentSkip to conversation

Make git send-email accept $EDITOR with arguments

PATCH Gustaf Hendeby 1 participant 1 message Jun 15, 2016

lore
Share & tools
lore
#0 lore raw

Sorry Junio for the double, but I didn't mean to cut the CCs on this one.

Quoted 6 lines · Junio C Hamano
Quoted 3 lines · Gustaf Hendeby

Junio, even if this is technically not a bug fix, it would be nice to get this fix into the 1.5.4 so that the usage of $EDITOR becomes more consistent throughout git.

Quoted 7 lines

I can buy that, but at least a single line comment in front of that system() explaining why this is safe to do so would be beneficial. I suspect that somebody would propose moving $compse_filename inside $GIT_DIR, now people realized $compose_filename is currently "./.msg.$$", and $GIT_DIR could be anything. Quotemeta would probably be better as the code you are touching won't be affected by a future change to the value of that constant defined far away in the source.

Moving that file makes sense, I'll have a look at that, and do that as well when I fix this patch. After a first look at it though, I was surprised to learn that git send-email actually wont work outside a repository. Ok, I can't really see any workflow where git send-email is called from outside a git repository, but at the same time I don't see why is should not be possible. Are there any special reason for this?

Thanks,
Gustaf