All of lore.kernel.org
 help / color / mirror / Atom feed
From: Ian Campbell <ian.campbell@citrix.com>
To: Jan Beulich <JBeulich@suse.com>
Cc: keir@xen.org, george.dunlap@eu.citrix.com,
	andrew.cooper3@citrix.com, dario.faggioli@citrix.com,
	Marcos.Matsunaga@oracle.com, stefano.stabellini@citrix.com,
	xen-devel@lists.xenproject.org,
	Malcolm Crossley <malcolm.crossley@citrix.com>
Subject: Re: [PATCHv6 2/3] grant_table: convert grant table rwlock to percpu rwlock
Date: Fri, 22 Jan 2016 15:53:45 +0000	[thread overview]
Message-ID: <1453478025.7675.15.camel@citrix.com> (raw)
In-Reply-To: <56A25A1102000078000CA34C@prv-mh.provo.novell.com>

On Fri, 2016-01-22 at 08:34 -0700, Jan Beulich wrote:
> >>> On 22.01.16 at 16:22, <ian.campbell@citrix.com> wrote:
> > On Fri, 2016-01-22 at 08:15 -0700, Jan Beulich wrote:
> >> 
> >> There are a number of trailing blanks being added here (and
> further
> >> down), which I'm fixing up as I'm in the process of applying this.
> > 
> > Aside: Do you know about "git am --whitespace=fix" ? It automates
> the
> > removal of trailing whitespace...
> 
> No, I didn't, but it'd be maximally useful only if I could store this
> as
> the default into ~/.gitconfig (and maybe that's possible, just that
> my git foo is too lame).

It ends up being a git apply option, so it looks like

apply.whitespace = "fix"

is the answer.

I don't do that and tend to just rerun if git am complains about
whitespace (which is the default) and it looks like it is worth fixing.
Or is correct to fix since checked in patches have deliberate trailing
whitepace on the context lines which you don't want to squash.

IME trailing whitespace in patches is actually astonishingly rare in
practice.

>  Besides that I'm also not always using "git
> am", not the least because what my mail frontend saves is not
> always compatible with that command (leading to lost metadata).

I use a sneaky trick, which is that the bug tracker will serve up raw,
unadulterated messages sent to xen-devel by message-id:

curl --silent http://bugs.xenproject.org/xen/mid/<msg@id>/raw

Doesn't help if the patch didn't go to xen-devel, but most of the ones
I'm interested in do.

I actually use the skanky script below which has a little bit of smarts
to do series at a time if they were sent with git send-email...

	git-msgid -g '1 10' '<git-send-email-1-blah@example.com>' | git am

Ian.

8<------

#!/bin/bash

help()
{
    echo "help!" 1>&2
}

GIT=
while getopts g: OPT ; do
        case $OPT in
            g)  GIT="$OPTARG" ;;
            h)  help ; exit 1 ;;
            \?) exit 1 ;;
        esac
done
shift $(expr $OPTIND - 1)

fetch_messages()
{
    for i in $@ ; do
        echo "Fetching Message ID $i" 1>&2
        if [ -n "$X" ] ; then
            ssh celaeno cat /srv/mldrop/xen-devel/"\"$i\""
        else
            #wget -O - -q http://bugs.xenproject.org/xen/mid/"$i"/raw
            i=${i/\+/%2B}
            curl --silent http://bugs.xenproject.org/xen/mid/"$i"/raw
        fi
    done
}

if [ -z "$GIT" ] ; then
    fetch_messages $@
else
    #<1349427871-31195-4-git-send-email-anthony.perard@citrix.com>
    for i in $@ ; do
        PATTERN=$(echo "$i" | sed -e 's/^\(<[0-9]*-[0-9]*-\)[0-9]*\(-.*>\)/\1@@NR@@\2/g')
        echo "GIT pattern $PATTERN" 1>&2
        for n in $(seq $GIT) ; do
            MSG=$(echo "$PATTERN" | sed -e "s/@@NR@@/$n/")
            fetch_messages $MSG
        done
    done
fi

  reply	other threads:[~2016-01-22 15:53 UTC|newest]

Thread overview: 14+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-01-22 13:41 [PATCHv6 0/3] Implement per-cpu reader-writer locks Malcolm Crossley
2016-01-22 13:41 ` [PATCHv6 1/3] rwlock: Add per-cpu reader-writer lock infrastructure Malcolm Crossley
2016-01-22 13:54   ` Ian Campbell
2016-01-22 14:16     ` Malcolm Crossley
2016-01-22 14:22       ` Ian Campbell
2016-01-22 14:30         ` Malcolm Crossley
2016-01-22 14:45           ` Ian Campbell
2016-01-22 14:25       ` Ross Lagerwall
2016-01-22 13:41 ` [PATCHv6 2/3] grant_table: convert grant table rwlock to percpu rwlock Malcolm Crossley
2016-01-22 15:15   ` Jan Beulich
2016-01-22 15:22     ` Ian Campbell
2016-01-22 15:34       ` Jan Beulich
2016-01-22 15:53         ` Ian Campbell [this message]
2016-01-22 13:41 ` [PATCHv6 3/3] p2m: convert p2m " Malcolm Crossley

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1453478025.7675.15.camel@citrix.com \
    --to=ian.campbell@citrix.com \
    --cc=JBeulich@suse.com \
    --cc=Marcos.Matsunaga@oracle.com \
    --cc=andrew.cooper3@citrix.com \
    --cc=dario.faggioli@citrix.com \
    --cc=george.dunlap@eu.citrix.com \
    --cc=keir@xen.org \
    --cc=malcolm.crossley@citrix.com \
    --cc=stefano.stabellini@citrix.com \
    --cc=xen-devel@lists.xenproject.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.