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

2019-03-28 Thread Christian Couder
On Wed, Mar 27, 2019 at 2:21 PM Christian Couder wrote: > > On Wed, Mar 27, 2019 at 2:11 PM Christian Couder > wrote: > > > > On Wed, Mar 27, 2019 at 11:24 AM Andreas Schwab wrote: > > > > > > When running `git replace --graft A B' where B is a non-commit (eg. a > > > tag) it displays an error,

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

2019-03-27 Thread Christian Couder
On Wed, Mar 27, 2019 at 2:11 PM Christian Couder wrote: > > On Wed, Mar 27, 2019 at 11:24 AM Andreas Schwab 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:

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

2019-03-27 Thread Christian Couder
On Wed, Mar 27, 2019 at 11:24 AM Andreas Schwab 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. > bu

git replace --graft does error checking too late

2019-03-27 Thread Andreas Schwab
When running `git replace --graft A B' where B is a non-commit (eg. a tag) it displays an error, but creates the replace ref anyway. I think it should verify that B names a commit object before creating the ref. Andreas. -- Andreas Schwab, SUSE Labs, sch...@suse.de GPG Key fingerprint = 0196 BA