git/list[1] front-page[2] threads[3] people[4] search[5] about
 

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

From
Junio C Hamano <gitster@pobox.com>
Date
Mar 26, 2010, 19:25 UTC
Message-ID
<7vy6helwbq.fsf@alter.siamese.dyndns.org>
In-Reply-To
<C07F26A5-6BAD-433D-B1FF-A08DC8E0EA74@sb.org>
Kevin Ballard <kevin@sb.org> writes:
Show 7 quoted lines
> ... 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.

Show 18 quoted lines
>
> 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=$?
Previous: Kevin BallardNext: Kevin Ballard
Message 3 of 6 in “rebase: Squelch the "fatal: Not an error." message”
  1. rebase: Squelch the "fatal: Not an error." messageKevin Ballard, Mar 24, 2010
  2. Kevin BallardMar 25, 2010
  3. Junio C HamanoMar 26, 2010
  4. Kevin BallardMar 26, 2010
  5. Kevin BallardMar 27, 2010
  6. format-patch: Squelch 'fatal: Not a range." errorKevin Ballard, Mar 30, 2010

Read the whole thread, see it on lore, or plain text.

$ cat FOOTERMessages come from the public archive at lore.kernel.org/git, fetched every hour. The front page is chosen and written each morning by an AI editor and can be wrong; the threads themselves are the record. About and API. For agents: an MCP server at https://gitlist.dev/mcp, and any thread, story or person page as Markdown by adding .md to its URL (or sending Accept: text/markdown). Details in /llms.txt.