Re: [PATCH] disallow providing multiple upstream branches to rebase, pull --rebase

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

 



Hi,

On Tue, 17 Feb 2009, Jay Soffian wrote:

> It does not make sense to provide multiple upstream branches to either
> git pull --rebase, or to git rebase, so disallow both.
> 
> Signed-off-by: Jay Soffian <jaysoffian@xxxxxxxxx>
> ---
>  git-pull.sh   |    5 +++++
>  git-rebase.sh |    1 +
>  2 files changed, 6 insertions(+), 0 deletions(-)
> 
> diff --git a/git-pull.sh b/git-pull.sh
> index 2c7f432..25adddf 100755
> --- a/git-pull.sh
> +++ b/git-pull.sh
> @@ -171,6 +171,11 @@ case "$merge_head" in
>  		echo >&2 "Cannot merge multiple branches into empty head"
>  		exit 1
>  	fi
> +	if test true = "$rebase"
> +	then
> +		echo >&2 "Cannot rebase onto multiple branches"
> +		exit 1
> +	fi
>  	;;
>  esac
>  

Good catch!

> diff --git a/git-rebase.sh b/git-rebase.sh
> index 5d9a393..ffb6027 100755
> --- a/git-rebase.sh
> +++ b/git-rebase.sh
> @@ -319,6 +319,7 @@ do
>  	esac
>  	shift
>  done
> +test $# -gt 1 && usage

Did you just break

	$ git rebase $UPSTREAM $BRANCH_TO_SWITCH_TO

?

Ciao,
Dscho
--
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]

  Powered by Linux