[Pkg-privacy-commits] [irssi-plugin-otr] 17/267: missing Git.cmake

Ximin Luo infinity0 at moszumanska.debian.org
Sat Aug 22 12:41:23 UTC 2015


This is an automated email from the git hooks/post-receive script.

infinity0 pushed a commit to branch debian
in repository irssi-plugin-otr.

commit d92678cf69ef755b0d2bf06ab9d89081f0347429
Author: Uli Meis <a.sporto+bee at gmail.com>
Date:   Tue Jun 10 13:00:25 2008 +0200

    missing Git.cmake
---
 cmake-extensions/Git.cmake | 20 ++++++++++++++++++++
 otr_key.c                  |  5 +++--
 2 files changed, 23 insertions(+), 2 deletions(-)

diff --git a/cmake-extensions/Git.cmake b/cmake-extensions/Git.cmake
new file mode 100644
index 0000000..b43b366
--- /dev/null
+++ b/cmake-extensions/Git.cmake
@@ -0,0 +1,20 @@
+#
+# Uli Meis <a.sporto+bee at gmail.com>
+#
+# Handy macro for fetching current tag or commit of a git repo.
+#
+MACRO(FIND_GIT_TAGORCOMMIT GITDIR CMAKEVAR)
+  EXECUTE_PROCESS(COMMAND bash -c 
+    "GITCOMMIT=`git-log | head -n1 | cut -d' ' -f2`;\\
+     if [ -z \"$GITCOMMIT\" ]; then exit 1;fi; \\
+     GITTAG=`cd .git/refs/tags && grep $GITCOMMIT * | cut -d: -f1` ;\\
+     if [ -n \"$GITTAG\" ]; then \\
+       echo -n $GITTAG | tr -d v; else \\
+       echo -n git-$GITCOMMIT;fi"
+    WORKING_DIRECTORY ${GITDIR} 
+    OUTPUT_VARIABLE GIT_TAGORCOMMIT
+    RESULT_VARIABLE GIT_TAGORCOMMITRET)
+  IF(GIT_TAGORCOMMITRET EQUAL 0)
+    SET(${CMAKEVAR} ${GIT_TAGORCOMMIT})
+  ENDIF(GIT_TAGORCOMMITRET EQUAL 0)
+ENDMACRO(FIND_GIT_TAGORCOMMIT)
diff --git a/otr_key.c b/otr_key.c
index 918ff27..3331040 100644
--- a/otr_key.c
+++ b/otr_key.c
@@ -203,8 +203,9 @@ void keygen_run(const char *accname)
  */
 void keygen_abort(int ignoreidle)
 {
-	if (!ignoreidle&&(kg_st.status!=KEYGEN_RUNNING)) {
-		otr_noticest(TXT_KG_NOABORT);
+	if (kg_st.status!=KEYGEN_RUNNING) {
+		if (!ignoreidle)
+			otr_noticest(TXT_KG_NOABORT);
 		return;
 	}
 

-- 
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/pkg-privacy/packages/irssi-plugin-otr.git



More information about the Pkg-privacy-commits mailing list