Re: [PATCH] rebase: Squelch the "fatal: Not an error." message

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

 



Kevin Ballard <kevin@xxxxxx> writes:

> ... The error itself is
> actually caused by running `git rebase --onto newbase upstream` where
> upstream is the same commit as HEAD. This causes `git format-patch` to
> be called with "upstream..upstream" as the range and it complains. My
> solution was to squelch all errors from `git format-patch`, though I am
> unsure if the "fatal: Not a range." error is the only error that can be
> raised in this situation.

Hmm, since "git format-patch HEAD" simply exits with success, I am
inclined to think that we should fix "format-patch HEAD..HEAD" to do the
same instead.  I didn't check how involved such a change might be,
though.

>
> git-rebase.sh |    2 +-
> 1 files changed, 1 insertions(+), 1 deletions(-)
>
>
> diff --git a/git-rebase.sh b/git-rebase.sh
> index e0eb956..8868dee 100755
> --- a/git-rebase.sh
> +++ b/git-rebase.sh
> @@ -544,7 +544,7 @@ fi
>  if test -z "$do_merge"
>  then
>  	git format-patch -k --stdout --full-index --ignore-if-in-upstream \
> -		$root_flag "$revisions" |
> +		$root_flag "$revisions" 2>/dev/null |
>  	git am $git_am_opt --rebasing --resolvemsg="$RESOLVEMSG" &&
>  	move_to_original_branch
>  	ret=$?
--
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]