From: Jani Nikula <jani.nikula@intel.com>
To: Paulo Zanoni <paulo.r.zanoni@intel.com>, intel-gfx@lists.freedesktop.org
Subject: Re: [maintainer-tools PATCH 1/2] dim: use quotes when testing for empty string
Date: Fri, 04 Dec 2015 10:35:02 +0200 [thread overview]
Message-ID: <878u5a1uix.fsf@intel.com> (raw)
In-Reply-To: <1449171651-30872-1-git-send-email-paulo.r.zanoni@intel.com>
On Thu, 03 Dec 2015, Paulo Zanoni <paulo.r.zanoni@intel.com> wrote:
> Today I applied/pushed patches for the first time, and noticed that
> all my commits had exactly this:
> Link: http://patchwork.freedesktop.org/patch/msgid/
> without the actual ID there. I assumed the ID would be set by some
> commit hook since our hooks seem to be able to talk to patchwork.
> Looks like I was wrong. It seems that I was supposed to apply a patch
> email, not the original patch file that I sent with git send-email.
Yes, the whole idea of the Link: tag was to increase transparency about
people only applying patches that went throught the list.
Reviewed-by: Jani Nikula <jani.nikula@intel.com>
> The problem happened due to missing quotes around $message_id:
>
> pzanoni@panetone:~/nfs/teste$ cat test.sh
> #!/bin/bash
> A=""
> if [ -n $A ]; then
> echo "No quotes: true"
> else
> echo "No quotes: false"
> fi
> if [ -n "$A" ]; then
> echo "With quotes: true"
> else
> echo "With quotes: false"
> fi
> pzanoni@panetone:~/nfs/teste$ bash test.sh
> No quotes: true
> With quotes: false
>
> In addition, print a little message telling us that the message-ids
> are missing. This may help by reminding us that we should apply the
> mail file, not the original patch. I'm not enforcing it since I don't
> know all our use cases.
>
> Cc: Jani Nikula <jani.nikula@intel.com>
> Signed-off-by: Paulo Zanoni <paulo.r.zanoni@intel.com>
> ---
> dim | 4 +++-
> 1 file changed, 3 insertions(+), 1 deletion(-)
>
> diff --git a/dim b/dim
> index 78b3f30..5f2f686 100755
> --- a/dim
> +++ b/dim
> @@ -382,8 +382,10 @@ function dim_apply
>
> cat $file | git am -3 "$@"
>
> - if [ -n $message_id ]; then
> + if [ -n "$message_id" ]; then
> commit_add_tag "Link" "http://patchwork.freedesktop.org/patch/msgid/$message_id"
> + else
> + echo "No message-id found in the patch file."
> fi
>
> eval $DRY $DIM_POST_APPLY_ACTION
--
Jani Nikula, Intel Open Source Technology Center
_______________________________________________
Intel-gfx mailing list
Intel-gfx@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/intel-gfx
prev parent reply other threads:[~2015-12-04 8:35 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-12-03 19:40 [maintainer-tools PATCH 1/2] dim: use quotes when testing for empty string Paulo Zanoni
2015-12-03 19:40 ` [maintainer-tools PATCH 2/2] dim: add a QUICKSTART section to dim.rst Paulo Zanoni
2015-12-04 8:40 ` Jani Nikula
2015-12-07 13:32 ` Zanoni, Paulo R
2015-12-04 8:35 ` Jani Nikula [this message]
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=878u5a1uix.fsf@intel.com \
--to=jani.nikula@intel.com \
--cc=intel-gfx@lists.freedesktop.org \
--cc=paulo.r.zanoni@intel.com \
/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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox