From: Johannes Sixt j...@kdbg.org
Am 25.08.2013 21:44, schrieb Christian Couder:
What about:
die(Objects must be of the same type.\n
'%s' points to a replaced object of type '%s'\n
while '%s' points to a replacement object of type
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
Am 25.08.2013 15:06, schrieb Christian Couder:
@@ -100,6 +101,15 @@ static int replace_object(const char *object_ref, const
char *replace_ref,
if (check_refname_format(ref, 0))
die('%s' is not a valid ref name., ref);
+ obj_type = sha1_object_info(object, NULL);
+
From: Johannes Sixt j...@kdbg.org
Am 25.08.2013 15:06, schrieb Christian Couder:
@@ -100,6 +101,15 @@ static int replace_object(const char *object_ref, const
char *replace_ref,
if (check_refname_format(ref, 0))
die('%s' is not a valid ref name., ref);
+obj_type =
Am 25.08.2013 21:44, schrieb Christian Couder:
What about:
die(Objects must be of the same type.\n
'%s' points to a replaced object of type '%s'\n
while '%s' points to a replacement object of type '%s'.,
Much better!
-- Hannes
--
To
5 matches
Mail list logo