[Libguestfs] [PATCH] v2v: rhv-plugin: Use string literal concatenation

Richard W.M. Jones rjones at redhat.com
Mon Aug 6 10:27:04 UTC 2018


On Mon, Aug 06, 2018 at 12:11:31PM +0300, Nir Soffer wrote:
> On Mon, Aug 6, 2018 at 11:02 AM Richard W.M. Jones <rjones at redhat.com>
> wrote:
> 
> > On Sun, Aug 05, 2018 at 04:37:31PM +0300, Nir Soffer wrote:
> > > When splitting long strings over multiple lines, we can use string
> > > literal concatenation instead of +.
> > >
> > > See
> > https://docs.python.org/3/reference/lexical_analysis.html#string-literal-concatenation
> > > ---
> > >  .gnulib                  |  2 +-
> >
> > I dropped the accidental gnulib part of this commit :-)
> >
> 
> Sorry about that :-)
> 
> I think I did:
> git pull
> git checkout -b ...
> edit file
> git commit

I wonder if you used ‘git commit -a’ which would have added all
changes from the local directory, and thus included ‘.gnulib’.  Anyway
it doesn't really matter as it was no problem for me to remove the
errant change.

> git format-patch master

I have a wrapper around git-send-email so I can just do:

  send-email " nbdkit v2" HEAD^ libguestfs at redhat.com [CC ...]

(see attached - NB it needs some customization before use).

> Can we prevent submodules changes to sneak into unrelated patches
> without manual work on the developer side?

I believe they won't be added unless you explicitly added them to the
commit, or use ‘git commit -a’.

Rich.

-- 
Richard Jones, Virtualization Group, Red Hat http://people.redhat.com/~rjones
Read my programming and virtualization blog: http://rwmj.wordpress.com
virt-top is 'top' for virtual machines.  Tiny program with many
powerful monitoring features, net stats, disk stats, logging, etc.
http://people.redhat.com/~rjones/virt-top
-------------- next part --------------
#!/bin/sh -
# Sane wrapper around git send-email.
#
# Example:
#   send-email " v2" HEAD~10 libguestfs at redhat.com CC at example.com CC at bar.example.com
# To test, send it to yourself first:
#   send-email " v2" HEAD~10 rjones at redhat.com

set -e

smtp=smtp.corp.redhat.com

if [ $# -lt 3 ]; then
    echo "send-email: Read the script first."
    exit 1
fi

subject_prefix="--subject-prefix=PATCH$1"
shift

# Arguments.
range="$1"
shift

to="$1"
shift

cc=""
for x in "$@"; do
    cc="$cc --cc=$x"
done

git send-email \
    --compose \
    --stat \
    --thread --no-chain-reply-to \
    --envelope-sender="rjones at redhat.com" \
    --smtp-server=$smtp \
    "$subject_prefix" \
    --from="Richard W.M. Jones <rjones at redhat.com>" \
    --to="$to" $cc \
    "$range"


More information about the Libguestfs mailing list