[PATCH] post-receive: exclude commits from the patch update step
Jeremy Kerr
jk at ozlabs.org
Mon Jul 14 12:57:38 EST 2014
Hi Brian,
> Actually, I think the rev-parse serves as a little extra parameter
> checking. Unless someone can pin a good reason one way or the other,
> I'll stick with my original patch as I sent it. And I've been testing
> that version for a few weeks now.
OK, just did some testing with that: it looks like the rev-parse will
barf to stderr if EXCLUDE is empty. Should we do this conditionally?
Or, given that we're essentially doing an exclude on ${1} there,
how about we just add any excludes to the rev-list instead? Something
like:
EXCLUDES=(refs/heads/upstream)
[...]
update_patches()
{
local cnt; cnt=0
include=${2}
excludes=(${1} ${EXCLUDES[@]})
revs="$include ${excludes[@]/#/^}"
for rev in $(git rev-list --no-merges --reverse $revs); do
[...]
Cheers,
Jeremy
More information about the Patchwork
mailing list