[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]

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



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 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 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
#!/bin/sh -
# Sane wrapper around git send-email.
#
# Example:
#   send-email " v2" HEAD~10 libguestfs redhat com CC example com CC bar example com
# To test, send it to yourself first:
#   send-email " v2" HEAD~10 rjones 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 redhat com" \
    --smtp-server=$smtp \
    "$subject_prefix" \
    --from="Richard W.M. Jones <rjones redhat com>" \
    --to="$to" $cc \
    "$range"

[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]