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

2013-09-06 Thread Junio C Hamano
Junio C Hamano writes: > Christian Couder writes: > >> +obj_type = sha1_object_info(object, NULL); >> +repl_type = sha1_object_info(repl, NULL); > > That we can do this is somewhat curious Note that this was a comment on the sha1_object_info() API, which, unlike read_sha1_file() API

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

2013-09-06 Thread Junio C Hamano
Christian Couder writes: > + obj_type = sha1_object_info(object, NULL); > + repl_type = sha1_object_info(repl, NULL); That we can do this is somewhat curious. If an object is replaced with a different one, would it mean that this code snippet is totally bogus? type1 = sha1_obje