git/list[1] front-page[2] threads[3] people[4] search[5] about
 

[PATCH v2 2/5] gpg-interface: use left shift to define GPG_VERIFY_*

From
Christian Couder <christian.couder@gmail.com>
Date
Oct 30, 2025, 12:33 UTC
Message-ID
<20251030123332.3337684-3-christian.couder@gmail.com>
In-Reply-To
<20251030123332.3337684-1-christian.couder@gmail.com>

In "gpg-interface.h", the definitions of the GPG_VERIFY_* boolean flags are currently using 1, 2 and 4 while we often prefer the bitwise left shift operator, `<<`, for that purpose to make it clearer that they are boolean.

Let's use the left shift operator here too. Let's also fix an indent issue with "4" while at it.

Signed-off-by: Christian Couder <chriscool@tuxfamily.org>
---
 gpg-interface.h | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)
diff --git a/gpg-interface.h b/gpg-interface.h
index 50487aa148..ead1ed6967 100644
--- a/gpg-interface.h
+++ b/gpg-interface.h
@@ -3,9 +3,9 @@
 
 struct strbuf;
 
-#define GPG_VERIFY_VERBOSE		1
-#define GPG_VERIFY_RAW			2
-#define GPG_VERIFY_OMIT_STATUS	4
+#define GPG_VERIFY_VERBOSE	(1<<0)
+#define GPG_VERIFY_RAW		(1<<1)
+#define GPG_VERIFY_OMIT_STATUS	(1<<2)
 
 enum signature_trust_level {
 	TRUST_UNDEFINED,
-- 
2.51.2.617.g2aaa867cd1
Previous: Christian CouderNext: Christian Couder
Message 15 of 22 in “fast-export/import: cleanups and translation”
  1. 0/5 fast-export/import: cleanups and translationChristian Couder, Oct 28, 2025
  2. 1/5 gpg-interface: simplify ssh fingerprint parsingChristian Couder, Oct 28, 2025
  3. Junio C HamanoOct 28, 2025
  4. 2/5 gpg-interface: use left shift to define GPG_VERIFY_*Christian Couder, Oct 28, 2025
  5. 3/5 fast-export: mark strings for translationChristian Couder, Oct 28, 2025
  6. Junio C HamanoOct 28, 2025
  7. Christian CouderOct 29, 2025
  8. Junio C HamanoOct 29, 2025
  9. Christian CouderOct 30, 2025
  10. 4/5 fast-import: mark strings for translationChristian Couder, Oct 28, 2025
  11. Junio C HamanoOct 28, 2025
  12. 5/5 gpg-interface: mark a string for translationChristian Couder, Oct 28, 2025
  13. 0/5 fast-export/import: cleanups and translationChristian Couder, Oct 30, 2025
  14. 1/5 gpg-interface: simplify ssh fingerprint parsingChristian Couder, Oct 30, 2025
  15. 2/5 gpg-interface: use left shift to define GPG_VERIFY_*Christian Couder, Oct 30, 2025
  16. 3/5 fast-export: mark strings for translationChristian Couder, Oct 30, 2025
  17. 4/5 fast-import: mark strings for translationChristian Couder, Oct 30, 2025
  18. Elijah NewrenOct 31, 2025
  19. 5/5 gpg-interface: mark a string for translationChristian Couder, Oct 30, 2025
  20. Junio C HamanoOct 30, 2025
  21. Elijah NewrenOct 31, 2025
  22. Christian CouderNov 1, 2025

Read the whole thread, see it on lore, or plain text.

$ cat FOOTERMessages come from the public archive at lore.kernel.org/git, fetched every hour. The front page is chosen and written each morning by an AI editor and can be wrong; the threads themselves are the record. About and API. For agents: an MCP server at https://gitlist.dev/mcp, and any thread, story or person page as Markdown by adding .md to its URL (or sending Accept: text/markdown). Details in /llms.txt.