git.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] add series editor support.
@ 2007-07-30 10:05 Dmitry Monakhov
  2007-07-30 10:26 ` Benoit SIGOURE
  2007-07-30 18:27 ` Josef Sipek
  0 siblings, 2 replies; 3+ messages in thread
From: Dmitry Monakhov @ 2007-07-30 10:05 UTC (permalink / raw)
  To: Josef Jeff Sipek; +Cc: git

Usually we have to edit series file directly (via editor).
I think it is not bad idea to let guilt export this service.
IMHO "guilt-series -e" it the best way to do it.

Signed-off-by: Dmitry Monakhov <dmonakhov@openvz.org>
---
 guilt-series |    9 +++++++--
 1 files changed, 7 insertions(+), 2 deletions(-)

diff --git a/guilt-series b/guilt-series
index 62c3bb1..7594b2e 100755
--- a/guilt-series
+++ b/guilt-series
@@ -3,7 +3,7 @@
 # Copyright (c) Josef "Jeff" Sipek, 2006, 2007
 #
 
-USAGE="[-v | -g]"
+USAGE="[-v | -g | -e]"
 . `dirname $0`/guilt
 
 while case "$#" in 0) break ;; esac
@@ -13,13 +13,18 @@ do
 		verbose=t ;;
 	-g)
 		gui=t ;;
+	-e)
+		edit=t ;;
 	*)
 		usage ;;
 	esac
 	shift
 done
 
-if [ ! -z "$gui" ]; then
+# edit -e ?
+if [ "$edit" = "t" ]; then 
+	$editor "$GUILT_DIR/$branch/series"
+elif [ ! -z "$gui" ]; then
 	[ -z "`get_top`" ] && die "No patches applied."
 	bottom=`head -1 $applied | cut -d: -f1`
 	top=`tail -1 $applied | cut -d: -f1`
-- 
1.5.2.2

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

* Re: [PATCH] add series editor support.
  2007-07-30 10:05 [PATCH] add series editor support Dmitry Monakhov
@ 2007-07-30 10:26 ` Benoit SIGOURE
  2007-07-30 18:27 ` Josef Sipek
  1 sibling, 0 replies; 3+ messages in thread
From: Benoit SIGOURE @ 2007-07-30 10:26 UTC (permalink / raw)
  To: Dmitry Monakhov; +Cc: Josef Jeff Sipek, git

[-- Attachment #1: Type: text/plain, Size: 1379 bytes --]

On Jul 30, 2007, at 12:05 PM, Dmitry Monakhov wrote:

> Usually we have to edit series file directly (via editor).
> I think it is not bad idea to let guilt export this service.
> IMHO "guilt-series -e" it the best way to do it.
>
> Signed-off-by: Dmitry Monakhov <dmonakhov@openvz.org>
> ---
>  guilt-series |    9 +++++++--
>  1 files changed, 7 insertions(+), 2 deletions(-)
>
> diff --git a/guilt-series b/guilt-series
> index 62c3bb1..7594b2e 100755
> --- a/guilt-series
> +++ b/guilt-series
> @@ -3,7 +3,7 @@
>  # Copyright (c) Josef "Jeff" Sipek, 2006, 2007
>  #
>
> -USAGE="[-v | -g]"
> +USAGE="[-v | -g | -e]"
>  . `dirname $0`/guilt
>
>  while case "$#" in 0) break ;; esac
> @@ -13,13 +13,18 @@ do
>  		verbose=t ;;
>  	-g)
>  		gui=t ;;
> +	-e)
> +		edit=t ;;
>  	*)
>  		usage ;;
>  	esac
>  	shift
>  done
>
> -if [ ! -z "$gui" ]; then
> +# edit -e ?
> +if [ "$edit" = "t" ]; then
> +	$editor "$GUILT_DIR/$branch/series"
> +elif [ ! -z "$gui" ]; then
>  	[ -z "`get_top`" ] && die "No patches applied."
>  	bottom=`head -1 $applied | cut -d: -f1`
>  	top=`tail -1 $applied | cut -d: -f1`

Hi,
Why do you use string comparisons instead of initializing all the  
variables to false and setting them to `:' or `true' so that you can  
then write if $edit; then ... ?  It's suboptimal.

Cheers,

-- 
Benoit Sigoure aka Tsuna
EPITA Research and Development Laboratory



[-- Attachment #2: This is a digitally signed message part --]
[-- Type: application/pgp-signature, Size: 186 bytes --]

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

* Re: [PATCH] add series editor support.
  2007-07-30 10:05 [PATCH] add series editor support Dmitry Monakhov
  2007-07-30 10:26 ` Benoit SIGOURE
@ 2007-07-30 18:27 ` Josef Sipek
  1 sibling, 0 replies; 3+ messages in thread
From: Josef Sipek @ 2007-07-30 18:27 UTC (permalink / raw)
  To: Dmitry Monakhov; +Cc: Josef Jeff Sipek, git

On Mon, Jul 30, 2007 at 02:05:12PM +0400, Dmitry Monakhov wrote:
> Usually we have to edit series file directly (via editor).
> I think it is not bad idea to let guilt export this service.
> IMHO "guilt-series -e" it the best way to do it.
> 
> Signed-off-by: Dmitry Monakhov <dmonakhov@openvz.org>

Applied with a small cleanup to make things a little bit more consistent (
[ ! -z "$edit" ]   vs.  [ "$edit" = "t" ] ).

Thanks,

Josef 'Jeff' Sipek.

-- 
Failure is not an option,
It comes bundled with your Microsoft product.

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

end of thread, other threads:[~2007-07-30 18:28 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2007-07-30 10:05 [PATCH] add series editor support Dmitry Monakhov
2007-07-30 10:26 ` Benoit SIGOURE
2007-07-30 18:27 ` Josef Sipek

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).