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

Re: git replace --graft does error checking too late

From
Christian Couder <christian.couder@gmail.com>
Date
Mar 27, 2019, 13:21 UTC
Message-ID
<CAP8UFD111-zqa7Fhr1KnmWYAKpBN4ofqn0AvD_nP3s_WBFzLqw@mail.gmail.com>
In-Reply-To
<CAP8UFD1qU_kJ97MdLFwzx+g3F6Q+fQ9LWOBxd=1m4vSi-fxF=Q@mail.gmail.com>

On Wed, Mar 27, 2019 at 2:11 PM Christian Couder <christian.couder@gmail.com> wrote:

Show 11 quoted lines
>
> On Wed, Mar 27, 2019 at 11:24 AM Andreas Schwab <schwab@suse.de> wrote:
> >
> > When running `git replace --graft A B' where B is a non-commit (eg. a
> > tag) it displays an error,
>
> Yeah, it seems that when A is a commit and B a tag I get:
>
> "error: object A is a tag, not a commit"
>
> which is wrong as A is a commit.

Actually I get the above only if A is a commit but there is a tag pointing to it. If there is no tag pointing to it I get:

error: object C is a tag, not a commit
where C is the hash of the tag object B (C=$(git rev-parse B))
So yeah, this is weird.
Previous: Christian CouderNext: Christian Couder
Message 3 of 4 in “git replace --graft does error checking too late”
  1. Andreas SchwabMar 27, 2019
  2. Christian CouderMar 27, 2019
  3. Christian CouderMar 27, 2019
  4. Christian CouderMar 28, 2019

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.