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.