From 55de71feca02ca7f6afe52d44ab1391a333e5cb5 Mon Sep 17 00:00:00 2001 From: Federico Hernandez Date: Sat, 15 Jan 2011 22:18:44 +0100 Subject: [PATCH] SHA1 - removed previously introduced _sha1 helper command - modified helper command _version to either display the version or the sha1 depending if build from source tar ball or from git. --- src/Cmd.cpp | 2 -- src/Context.cpp | 1 - src/command.cpp | 12 +----------- src/main.h | 1 - 4 files changed, 1 insertion(+), 15 deletions(-) diff --git a/src/Cmd.cpp b/src/Cmd.cpp index 37f8f3959..e3da9f670 100644 --- a/src/Cmd.cpp +++ b/src/Cmd.cpp @@ -134,7 +134,6 @@ void Cmd::load () commands.push_back ("_ids"); commands.push_back ("_config"); commands.push_back ("_version"); - commands.push_back ("_sha1"); commands.push_back ("_urgency"); commands.push_back ("_query"); commands.push_back ("_zshcommands"); @@ -244,7 +243,6 @@ bool Cmd::isReadOnlyCommand () command == "_ids" || command == "_config" || command == "_version" || - command == "_sha1" || command == "_urgency" || command == "_query" || command == "_zshcommands" || diff --git a/src/Context.cpp b/src/Context.cpp index f3c55e148..ed155cb9a 100644 --- a/src/Context.cpp +++ b/src/Context.cpp @@ -269,7 +269,6 @@ int Context::dispatch (std::string &out) else if (cmd.command == "_ids") { rc = handleCompletionIDs (out); } else if (cmd.command == "_config") { rc = handleCompletionConfig (out); } else if (cmd.command == "_version") { rc = handleCompletionVersion (out); } - else if (cmd.command == "_sha1") { rc = handleSha1 (out); } else if (cmd.command == "_urgency") { rc = handleUrgency (out); } else if (cmd.command == "_query") { rc = handleQuery (out); } else if (cmd.command == "_zshcommands") { rc = handleZshCompletionCommands (out); } diff --git a/src/command.cpp b/src/command.cpp index 1931960fb..c3c066cae 100644 --- a/src/command.cpp +++ b/src/command.cpp @@ -523,21 +523,11 @@ int handleCompletionConfig (std::string& outs) // A simple version display for use by completion scripts and the task-update // script. int handleCompletionVersion (std::string& outs) -{ - outs = VERSION; - outs += "\n"; - return 0; -} - -//////////////////////////////////////////////////////////////////////////////// -// A simple SHA1 display for use during development to identify which task -// version one is running. -int handleSha1 (std::string& outs) { #ifdef HAVE_COMMIT outs = COMMIT; #else - outs = "No SHA1 available"; + outs = VERSION; #endif outs += "\n"; return 0; diff --git a/src/main.h b/src/main.h index d5153af7d..2ff0caacd 100644 --- a/src/main.h +++ b/src/main.h @@ -67,7 +67,6 @@ int handleCompletionCommands (std::string&); int handleCompletionIDs (std::string&); int handleCompletionConfig (std::string&); int handleCompletionVersion (std::string&); -int handleSha1 (std::string&); int handleUrgency (std::string&); int handleQuery (std::string&); int handleZshCompletionCommands (std::string&);