mailarchive of the ptxdist mailing list
 help / color / mirror / Atom feed
* [ptxdist] [PATCH] git-ptx-patches: add --notes to git-format-patch if it's supported
@ 2013-03-06 20:00 Uwe Kleine-König
  2013-03-06 21:21 ` Marc Kleine-Budde
  0 siblings, 1 reply; 5+ messages in thread
From: Uwe Kleine-König @ 2013-03-06 20:00 UTC (permalink / raw)
  To: ptxdist

While at it also document minimal git version needed for --no-signature.

Signed-off-by: Uwe Kleine-König <u.kleine-koenig@pengutronix.de>
---
 scripts/git-ptx-patches | 7 +++++++
 1 file changed, 7 insertions(+)

diff --git a/scripts/git-ptx-patches b/scripts/git-ptx-patches
index 37f5d91..fadb2c1 100755
--- a/scripts/git-ptx-patches
+++ b/scripts/git-ptx-patches
@@ -110,10 +110,17 @@ case "$remove_old" in
 		;;
 esac
 
+# git-format-patch --notes is supported since git 1.7.2
 if git format-patch -h 2>&1 | grep -q signature; then
 	GIT_EXTRA_ARGS="--no-signature"
 fi
 
+# git-format-patch --notes is supported since git 1.7.6, but actually you want
+# git 1.8.1-rc0 to get the notes below the --- marker
+if man git-format-patch | grep -q -e --notes; then
+	GIT_EXTRA_ARGS="$GIT_EXTRA_ARGS --notes"
+fi
+
 cat .ptxdist/series.0 > .ptxdist/series
 git format-patch -N $GIT_EXTRA_ARGS ${tagopt} -o .ptxdist/patches/ ${range} | sed -e 's,^.ptxdist/patches/,,' > .ptxdist/series.auto
 cat .ptxdist/series.auto >> .ptxdist/series
-- 
1.8.2.rc2


-- 
ptxdist mailing list
ptxdist@pengutronix.de

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: [ptxdist] [PATCH] git-ptx-patches: add --notes to git-format-patch if it's supported
  2013-03-06 20:00 [ptxdist] [PATCH] git-ptx-patches: add --notes to git-format-patch if it's supported Uwe Kleine-König
@ 2013-03-06 21:21 ` Marc Kleine-Budde
  2013-03-06 21:54   ` Uwe Kleine-König
  0 siblings, 1 reply; 5+ messages in thread
From: Marc Kleine-Budde @ 2013-03-06 21:21 UTC (permalink / raw)
  To: ptxdist; +Cc: Uwe Kleine-König


[-- Attachment #1.1: Type: text/plain, Size: 1574 bytes --]

On 03/06/2013 09:00 PM, Uwe Kleine-König wrote:
> While at it also document minimal git version needed for --no-signature.
> 
> Signed-off-by: Uwe Kleine-König <u.kleine-koenig@pengutronix.de>
> ---
>  scripts/git-ptx-patches | 7 +++++++
>  1 file changed, 7 insertions(+)
> 
> diff --git a/scripts/git-ptx-patches b/scripts/git-ptx-patches
> index 37f5d91..fadb2c1 100755
> --- a/scripts/git-ptx-patches
> +++ b/scripts/git-ptx-patches
> @@ -110,10 +110,17 @@ case "$remove_old" in
>  		;;
>  esac
>  
> +# git-format-patch --notes is supported since git 1.7.2

?

>  if git format-patch -h 2>&1 | grep -q signature; then
>  	GIT_EXTRA_ARGS="--no-signature"
>  fi
>  
> +# git-format-patch --notes is supported since git 1.7.6, but actually you want
> +# git 1.8.1-rc0 to get the notes below the --- marker
> +if man git-format-patch | grep -q -e --notes; then

Why don't we use the same mechanism (either man or -h) to figure out if
git supports the extra agrument?

> +	GIT_EXTRA_ARGS="$GIT_EXTRA_ARGS --notes"
> +fi
> +
>  cat .ptxdist/series.0 > .ptxdist/series
>  git format-patch -N $GIT_EXTRA_ARGS ${tagopt} -o .ptxdist/patches/ ${range} | sed -e 's,^.ptxdist/patches/,,' > .ptxdist/series.auto
>  cat .ptxdist/series.auto >> .ptxdist/series

Marc

-- 
Pengutronix e.K.                  | Marc Kleine-Budde           |
Industrial Linux Solutions        | Phone: +49-231-2826-924     |
Vertretung West/Dortmund          | Fax:   +49-5121-206917-5555 |
Amtsgericht Hildesheim, HRA 2686  | http://www.pengutronix.de   |


[-- Attachment #1.2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 263 bytes --]

[-- Attachment #2: Type: text/plain, Size: 48 bytes --]

-- 
ptxdist mailing list
ptxdist@pengutronix.de

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: [ptxdist] [PATCH] git-ptx-patches: add --notes to git-format-patch if it's supported
  2013-03-06 21:21 ` Marc Kleine-Budde
@ 2013-03-06 21:54   ` Uwe Kleine-König
  2013-03-07 16:07     ` Michael Olbrich
  0 siblings, 1 reply; 5+ messages in thread
From: Uwe Kleine-König @ 2013-03-06 21:54 UTC (permalink / raw)
  To: Marc Kleine-Budde; +Cc: ptxdist

On Wed, Mar 06, 2013 at 10:21:06PM +0100, Marc Kleine-Budde wrote:
> On 03/06/2013 09:00 PM, Uwe Kleine-König wrote:
> > While at it also document minimal git version needed for --no-signature.
> > 
> > Signed-off-by: Uwe Kleine-König <u.kleine-koenig@pengutronix.de>
> > ---
> >  scripts/git-ptx-patches | 7 +++++++
> >  1 file changed, 7 insertions(+)
> > 
> > diff --git a/scripts/git-ptx-patches b/scripts/git-ptx-patches
> > index 37f5d91..fadb2c1 100755
> > --- a/scripts/git-ptx-patches
> > +++ b/scripts/git-ptx-patches
> > @@ -110,10 +110,17 @@ case "$remove_old" in
> >  		;;
> >  esac
> >  
> > +# git-format-patch --notes is supported since git 1.7.2
> 
> ?
That's the "While at it" part mentioned in the commit log. I consider it
helpful when judging if it's time to remove that check. E.g. 1.7.2 means
it's in Debian squeeze. So I'd say it's safe to remove it soon.

> >  if git format-patch -h 2>&1 | grep -q signature; then
> >  	GIT_EXTRA_ARGS="--no-signature"
> >  fi
> >  
> > +# git-format-patch --notes is supported since git 1.7.6, but actually you want
> > +# git 1.8.1-rc0 to get the notes below the --- marker
> > +if man git-format-patch | grep -q -e --notes; then
> 
> Why don't we use the same mechanism (either man or -h) to figure out if
> git supports the extra agrument?
git-format-patch -h doesn't mention --notes in 1.8.1-rc0 so I used man.
I didn't consider this to be enough to change the working way to
determine if --no-signature is supported.

Best regards
Uwe

-- 
Pengutronix e.K.                           | Uwe Kleine-König            |
Industrial Linux Solutions                 | http://www.pengutronix.de/  |

-- 
ptxdist mailing list
ptxdist@pengutronix.de

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: [ptxdist] [PATCH] git-ptx-patches: add --notes to git-format-patch if it's supported
  2013-03-06 21:54   ` Uwe Kleine-König
@ 2013-03-07 16:07     ` Michael Olbrich
  2013-03-11  8:55       ` [ptxdist] [PATCH v2] " Uwe Kleine-König
  0 siblings, 1 reply; 5+ messages in thread
From: Michael Olbrich @ 2013-03-07 16:07 UTC (permalink / raw)
  To: ptxdist

On Wed, Mar 06, 2013 at 10:54:26PM +0100, Uwe Kleine-König wrote:
> On Wed, Mar 06, 2013 at 10:21:06PM +0100, Marc Kleine-Budde wrote:
> > On 03/06/2013 09:00 PM, Uwe Kleine-König wrote:
> > > While at it also document minimal git version needed for --no-signature.
> > > 
> > > Signed-off-by: Uwe Kleine-König <u.kleine-koenig@pengutronix.de>
> > > ---
> > >  scripts/git-ptx-patches | 7 +++++++
> > >  1 file changed, 7 insertions(+)
> > > 
> > > diff --git a/scripts/git-ptx-patches b/scripts/git-ptx-patches
> > > index 37f5d91..fadb2c1 100755
> > > --- a/scripts/git-ptx-patches
> > > +++ b/scripts/git-ptx-patches
> > > @@ -110,10 +110,17 @@ case "$remove_old" in
> > >  		;;
> > >  esac
> > >  
> > > +# git-format-patch --notes is supported since git 1.7.2
> > 
> > ?
> That's the "While at it" part mentioned in the commit log. I consider it
> helpful when judging if it's time to remove that check. E.g. 1.7.2 means
> it's in Debian squeeze. So I'd say it's safe to remove it soon.

Yes but the comment is wrong '--notes' != '--no-signature'

> > >  if git format-patch -h 2>&1 | grep -q signature; then
> > >  	GIT_EXTRA_ARGS="--no-signature"
> > >  fi
> > >  
> > > +# git-format-patch --notes is supported since git 1.7.6, but actually you want
> > > +# git 1.8.1-rc0 to get the notes below the --- marker
> > > +if man git-format-patch | grep -q -e --notes; then
> > 
> > Why don't we use the same mechanism (either man or -h) to figure out if
> > git supports the extra agrument?
> git-format-patch -h doesn't mention --notes in 1.8.1-rc0 so I used man.
> I didn't consider this to be enough to change the working way to
> determine if --no-signature is supported.

Those the whole thing work both ways? Will "git quiltimport" notes from the
stuff below the --- marker? If not, these things will get lost easily.

Michael

-- 
Pengutronix e.K.                           |                             |
Industrial Linux Solutions                 | http://www.pengutronix.de/  |
Peiner Str. 6-8, 31137 Hildesheim, Germany | Phone: +49-5121-206917-0    |
Amtsgericht Hildesheim, HRA 2686           | Fax:   +49-5121-206917-5555 |

-- 
ptxdist mailing list
ptxdist@pengutronix.de

^ permalink raw reply	[flat|nested] 5+ messages in thread

* [ptxdist] [PATCH v2] git-ptx-patches: add --notes to git-format-patch if it's supported
  2013-03-07 16:07     ` Michael Olbrich
@ 2013-03-11  8:55       ` Uwe Kleine-König
  0 siblings, 0 replies; 5+ messages in thread
From: Uwe Kleine-König @ 2013-03-11  8:55 UTC (permalink / raw)
  To: ptxdist

While at it also document minimal git version needed for --no-signature.

Signed-off-by: Uwe Kleine-König <u.kleine-koenig@pengutronix.de>
---
Changes since (implict) v1:
 - write --no-signature when --no-signature is meant instead of --notes

 scripts/git-ptx-patches | 7 +++++++
 1 file changed, 7 insertions(+)

diff --git a/scripts/git-ptx-patches b/scripts/git-ptx-patches
index 37f5d91..619e0c93 100755
--- a/scripts/git-ptx-patches
+++ b/scripts/git-ptx-patches
@@ -110,10 +110,17 @@ case "$remove_old" in
 		;;
 esac
 
+# git-format-patch --no-signature is supported since git 1.7.2
 if git format-patch -h 2>&1 | grep -q signature; then
 	GIT_EXTRA_ARGS="--no-signature"
 fi
 
+# git-format-patch --notes is supported since git 1.7.6, but actually you want
+# git 1.8.1-rc0 to get the notes below the --- marker
+if man git-format-patch | grep -q -e --notes; then
+	GIT_EXTRA_ARGS="$GIT_EXTRA_ARGS --notes"
+fi
+
 cat .ptxdist/series.0 > .ptxdist/series
 git format-patch -N $GIT_EXTRA_ARGS ${tagopt} -o .ptxdist/patches/ ${range} | sed -e 's,^.ptxdist/patches/,,' > .ptxdist/series.auto
 cat .ptxdist/series.auto >> .ptxdist/series
-- 
1.8.2.rc2


-- 
ptxdist mailing list
ptxdist@pengutronix.de

^ permalink raw reply	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2013-03-11  8:55 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2013-03-06 20:00 [ptxdist] [PATCH] git-ptx-patches: add --notes to git-format-patch if it's supported Uwe Kleine-König
2013-03-06 21:21 ` Marc Kleine-Budde
2013-03-06 21:54   ` Uwe Kleine-König
2013-03-07 16:07     ` Michael Olbrich
2013-03-11  8:55       ` [ptxdist] [PATCH v2] " Uwe Kleine-König

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox