Re: serious problem with `git format-patch' & `git am'
From: Junio C Hamano <hidden>
Date: 2016-06-15 22:46:18
Brandon Casey [off-list ref] writes:
What does this line do?
git-am.sh line 375:
case "$keep_subject" in -k) SUBJECT="[PATCH] $SUBJECT" ;; esac
It appears to do nothing. It has existed since the beginning of git-am.sh,
and there has never been another reference to $keep_subject in this script.
Is it possible that $keep_subject is supposed to be $keep?I do not think it is doing anything, and I do not think it makes sense to "fix" it to allow adding "[PATCH] " in front either. I'd vote for removing the entire thing. The $keep_subject variable and "add [PATCH] only to later strip" logic was borrowed from git-applymbox and git-applypatch pair, see 6bff6a6 (Teach applymbox to keep the Subject: line., 2005-08-16) especially for the change that affects tools/git-applypatch in the commit. I think there was a reason that -k refrained from adding the prefix in git-applypatch but the option to git-am needed to add the prefix which seems inconsistent but I do not recall the details. Maybe the list archive may know.