All of lore.kernel.org
 help / color / mirror / Atom feed
From: Junio C Hamano <junkio@cox.net>
To: bonzini@gnu.org
Cc: git@vger.kernel.org
Subject: Re: [PATCH, properly formatted] git-commit: add a --interactive option
Date: Mon, 05 Mar 2007 00:54:02 -0800	[thread overview]
Message-ID: <7v4pp0136d.fsf@assigned-by-dhcp.cox.net> (raw)
In-Reply-To: <45EBCD81.8020605@lu.unisi.ch> (Paolo Bonzini's message of "Mon, 05 Mar 2007 08:57:53 +0100")

Paolo Bonzini <paolo.bonzini@lu.unisi.ch> writes:

> ... Since
> interactive stuff does not require backward compatibility in general,
> I would ask to commit my patch anyway, assuming that in the future the
> feature is rewritten to conform to the flow you indicate...

I think people feel changes to interactive workflow is a big
deal.

> diff --git a/git-commit.sh b/git-commit.sh
> index be3677c..e8ec3b9 100755
> --- a/git-commit.sh
> +++ b/git-commit.sh
> ...
>  esac
>  unset only
> +case "$all,$interactive,$also,$#" in
> +*t,*t,*)
> +	die "Cannot use -a, --interactive or -i at the same time." ;;
>  t,,[1-9]*)
>  	die "Paths with -a does not make sense." ;;
> +,t,[1-9]*)
> +	die "Paths with --interactive does not make sense." ;;
> +,,t,0)
>  	die "No paths with -i does not make sense." ;;
>  esac

Clever.

> @@ -344,6 +352,9 @@ t,)
>  	) || exit
>  	;;
>  ,)
> +	if test "$interactive" = t; then
> +		git add --interactive || exit
> +	fi
>  	case "$#" in
>  	0)
>  		;; # commit as-is

If we were to do this, we probably would want a way to exit
non-zero from "git-add -i", but I guess we can say we already
have that way via ^C.

Will queue for 'next', but it's getting late here so it probably
would not appear on the public repository tonight.

Thanks.

      reply	other threads:[~2007-03-05  8:54 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2007-03-05  7:57 [PATCH, properly formatted] git-commit: add a --interactive option Paolo Bonzini
2007-03-05  8:54 ` Junio C Hamano [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=7v4pp0136d.fsf@assigned-by-dhcp.cox.net \
    --to=junkio@cox.net \
    --cc=bonzini@gnu.org \
    --cc=git@vger.kernel.org \
    /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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.