Looking at my own patch again... On Thu, Jul 3, 2014 at 5:49 PM, Jeremy Kerr <j...@ozlabs.org> wrote: ... >> Signed-off-by: Brian Norris <computersforpe...@gmail.com> >> --- >> tools/post-receive.hook | 9 ++++++++- >> 1 file changed, 8 insertions(+), 1 deletion(-) >> >> diff --git a/tools/post-receive.hook b/tools/post-receive.hook >> index 4fb741d3ea98..a38522e22f35 100755 >> --- a/tools/post-receive.hook >> +++ b/tools/post-receive.hook >> @@ -8,6 +8,12 @@ set -eu >> >> #TODO: the state map should really live in the repo's git-config >> STATE_MAP="refs/heads/master:Accepted" >> +# >> +# ignore all commits already present in these refs >> +# e.g., >> +# EXCLUDE="refs/heads/upstream refs/heads/other-project" >> +# >> +EXCLUDE="" >> >> PWDIR=/srv/patchwork/apps/patchwork >> >> @@ -39,7 +45,8 @@ set_patch_state() >> update_patches() >> { >> local cnt; cnt=0 >> - for rev in $(git rev-list --no-merges --reverse ${1}..${2}); do >> + for rev in $(git rev-parse --not ${EXCLUDE} | >> + git rev-list --stdin --no-merges --reverse ${1}..${2}); do
I think I can probably combine the rev-parse and rev-list to avoid the extra pipe: git rev-list --no-merges --reverse ${1}..${2} --not ${EXCLUDE} I'll test and resend, if that looks OK. >> if [ "$do_exit" = 1 ]; then >> echo "I: exiting..." >&2 >> break >> Brian _______________________________________________ Patchwork mailing list Patchwork@lists.ozlabs.org https://lists.ozlabs.org/listinfo/patchwork