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

2013-08-30 Thread Junio C Hamano
Christian Couder writes: > There is already a --force option, but I can add a --force-type in a > another patch. Oh, that was not what I meant. As long as existing --force override this check, that should be sufficient and more preferrable than yet another kind of "force". Thanks. -- To unsubs

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 > > Christian Couder 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

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 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 replace all the objects

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

2013-08-28 Thread Christian Couder
From: Junio C Hamano > > Thomas Rast 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 care

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 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 all objects tha

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 writes: > Christian Couder 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

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 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. > > There is no case wher

[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 o