Code Cleanup
- The 'diagnostics' command no longer generates 1000 UUIDs as a uniqueness test, because libuuid is now mandatory.
This commit is contained in:
2
NEWS
2
NEWS
@@ -32,6 +32,8 @@ Newly deprecated features in taskwarrior 2.3.0
|
|||||||
- The 'push', 'pull' and 'merge' commands will be removed in a subsequent
|
- The 'push', 'pull' and 'merge' commands will be removed in a subsequent
|
||||||
release. The new 'sync' command, in conjunction with the Task Server is the
|
release. The new 'sync' command, in conjunction with the Task Server is the
|
||||||
new sync mechanism.
|
new sync mechanism.
|
||||||
|
- The 'diagnostics' command no longer generates 1000 UUIDs as a uniqueness
|
||||||
|
test, because libuuid is now mandatory.
|
||||||
|
|
||||||
---
|
---
|
||||||
|
|
||||||
|
|||||||
@@ -300,24 +300,6 @@ int CmdDiagnostics::execute (std::string& output)
|
|||||||
out << bold.colorize (STRING_CMD_DIAG_TESTS)
|
out << bold.colorize (STRING_CMD_DIAG_TESTS)
|
||||||
<< "\n";
|
<< "\n";
|
||||||
{
|
{
|
||||||
out << " UUID gen: ";
|
|
||||||
std::vector <std::string> uuids;
|
|
||||||
std::string id;
|
|
||||||
for (int i = 0; i < 1000; i++)
|
|
||||||
{
|
|
||||||
id = uuid ();
|
|
||||||
if (std::find (uuids.begin (), uuids.end (), id) != uuids.end ())
|
|
||||||
{
|
|
||||||
out << format (STRING_CMD_DIAG_UUID_BAD, i) << "\n";
|
|
||||||
break;
|
|
||||||
}
|
|
||||||
else
|
|
||||||
uuids.push_back (id);
|
|
||||||
}
|
|
||||||
|
|
||||||
if (uuids.size () >= 1000)
|
|
||||||
out << STRING_CMD_DIAG_UUID_GOOD << "\n";
|
|
||||||
|
|
||||||
// Determine terminal details.
|
// Determine terminal details.
|
||||||
const char* term = getenv ("TERM");
|
const char* term = getenv ("TERM");
|
||||||
out << " $TERM: "
|
out << " $TERM: "
|
||||||
|
|||||||
Reference in New Issue
Block a user