Re: [PATCH, properly formatted] git-commit: add a --interactive option

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

 



Paolo Bonzini <paolo.bonzini@xxxxxxxxxxx> 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.


-
To unsubscribe from this list: send the line "unsubscribe git" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html

[Index of Archives]     [Linux Kernel Development]     [Gcc Help]     [IETF Annouce]     [DCCP]     [Netdev]     [Networking]     [Security]     [V4L]     [Bugtraq]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux SCSI]     [Fedora Users]