From: Junio C Hamano Date: Fri, 27 Feb 2009 17:53:50 GMT Subject: Re: serious problem with `git format-patch' & `git am' Message-ID: <7vr61jkbpt.fsf@gitster.siamese.dyndns.org> In-Reply-To: Brandon Casey 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.