From: Neil Horman Date: Sat, 31 Mar 2012 13:01:17 GMT Subject: Re: [PATCH 3/4] git-commit-am: Allow automatic rebasing to preserve empty commits Message-ID: <20120331130116.GC2409@neilslaptop.think-freely.org> In-Reply-To: <7vd37tlsve.fsf@alter.siamese.dyndns.org> On Fri, Mar 30, 2012 at 01:46:13PM -0700, Junio C Hamano wrote: > Neil Horman writes: > > > Using the keep_empy environment variable, this change allows git-commit-am to > > Is it an environment variable? I thought not. > Sorry, I use the term loosely. keep_empty is the script variable I use to track the keep-empty option. I can fix up the commit message on my repost. > > + # makes this easy > > + git cherry-pick --keep-empty "$revisions" && move_to_original_branch > > +else > > + git format-patch -k --stdout --full-index --ignore-if-in-upstream \ > > + --src-prefix=a/ --dst-prefix=b/ \ > > + --no-renames $root_flag "$revisions" | > > + git am $git_am_opt --rebasing --resolvemsg="$resolvemsg" && > > + move_to_original_branch > > +fi > > Factor out the "&& move_to_original_branch" at the end of then/else, like > this: > > if ... > then > ... > else > ... > fi && move_to_original_branch > Will do, thanks! Neil