Overview
SHA1 Hash: | 0d9abccbb6bb25b01f25c3deb78a016999afb835 |
---|---|
Date: | 2008-04-10 12:24:25 |
User: | drh |
Comment: | Fix the "tag add" command to report an error if given an invalid UUID argument. |
Timelines: | ancestors | descendants | both | trunk |
Other Links: | files | ZIP archive | manifest |
Tags And Properties
- branch=trunk inherited from [a28c83647d]
- sym-trunk inherited from [a28c83647d]
Changes
[hide diffs]Modified src/tag.c from [f79ecb95c0] to [002d575145].
@@ -266,13 +266,16 @@ Blob cksum; 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", zTagname);