Diff
Not logged in

Differences From:

File src/tag.c part of check-in [49b59bc559] - Issue a warning after a commit if the commit causes a fork. by drh on 2008-02-09 00:11:04. [view]

To:

File src/tag.c part of check-in [0d9abccbb6] - Fix the "tag add" command to report an error if given an invalid UUID argument. by drh on 2008-04-10 12:24:25. [view]

@@ -267,11 +267,14 @@
   static const char zTagtype[] = { '-', '+', '*' };
 
   assert( tagtype>=0 && tagtype<=2 );
   user_select();
-  rid = name_to_rid(zObjName);
   blob_zero(&uuid);
-  db_blob(&uuid, "SELECT uuid FROM blob WHERE rid=%d", rid);
+  blob_append(&uuid, zObjName, -1);
+  if( name_to_uuid(&uuid, 9) ){
+    return;
+  }
+  rid = name_to_rid(blob_str(&uuid));
   blob_zero(&ctrl);
 
   if( validate16(zTagname, strlen(zTagname)) ){
     fossil_fatal("invalid tag name \"%s\" - might be confused with a UUID",