Re: [PATCH v2 1/5] replace: forbid replacing an object with one of a different type

2013-08-29 Thread Christian Couder
From: Junio C Hamano gits...@pobox.com Thomas Rast tr...@inf.ethz.ch writes: Hrm, you're right, that's a flaw in my logic. You could do the same in all other cases too, e.g. replace a tree so that an entry is of a different type and at the same time change the type of the object itself.

Re: [PATCH v2 1/5] replace: forbid replacing an object with one of a different type

2013-08-29 Thread Junio C Hamano
Christian Couder chrisc...@tuxfamily.org writes: But if all the objects that point to an object, called O, are to be replaced, then in most cases object O probably doesn't need to be replaced. It's probably sufficient to create the new object, called O2, that would replace object O and to

Re: [PATCH v2 1/5] replace: forbid replacing an object with one of a different type

2013-08-29 Thread Christian Couder
From: Junio C Hamano gits...@pobox.com Christian Couder chrisc...@tuxfamily.org writes: But if all the objects that point to an object, called O, are to be replaced, then in most cases object O probably doesn't need to be replaced. It's probably sufficient to create the new object, called

Re: [PATCH v2 1/5] replace: forbid replacing an object with one of a different type

2013-08-28 Thread Thomas Rast
Junio C Hamano gits...@pobox.com writes: Christian Couder chrisc...@tuxfamily.org writes: Users replacing an object with one of a different type were not prevented to do so, even if it was obvious, and stated in the doc, that bad things would result from doing that. To avoid mistakes, it

Re: [PATCH v2 1/5] replace: forbid replacing an object with one of a different type

2013-08-28 Thread Junio C Hamano
Thomas Rast tr...@inf.ethz.ch writes: Hrm, you're right, that's a flaw in my logic. You could do the same in all other cases too, e.g. replace a tree so that an entry is of a different type and at the same time change the type of the object itself. You however have to carefully go through

[PATCH v2 1/5] replace: forbid replacing an object with one of a different type

2013-08-27 Thread Christian Couder
Users replacing an object with one of a different type were not prevented to do so, even if it was obvious, and stated in the doc, that bad things would result from doing that. To avoid mistakes, it is better to just forbid that though. There is no case where one object can be replaced with one

Re: [PATCH v2 1/5] replace: forbid replacing an object with one of a different type

2013-08-27 Thread Junio C Hamano
Christian Couder chrisc...@tuxfamily.org writes: Users replacing an object with one of a different type were not prevented to do so, even if it was obvious, and stated in the doc, that bad things would result from doing that. To avoid mistakes, it is better to just forbid that though.