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

[PATCH 1/3] - Add GIT Version number

From
Sean <seanlkml@sympatico.ca>
Date
May 21, 2005, 18:32 UTC
Message-ID
<2230.10.10.10.24.1116700329.squirrel@linux1>

Add a version number to the GIT Makefile; lifted from the Linux kernel source. Once set, the version number will be reported by the "--version" option on git commands that are converted to argp argument processing.

The version number was arbitrarily set to 0.5.0 as a starting point, but obviously you can change it as you see fit.

Signed-off-by: Sean Estabrooks <seanlkml@sympatico.ca>
Index: Makefile
===================================================================
--- 58741c69570705801db4b785681790d636475695/Makefile  (mode:100644)
+++ uncommitted/Makefile  (mode:100644)
@@ -7,8 +7,16 @@
 # BREAK YOUR LOCAL DIFFS! show-diff and anything using it will likely randomly
 # break unless your underlying filesystem supports those sub-second times
 # (my ext3 doesn't).
+#
+VERSION = 0
+PATCHLEVEL = 5
+SUBLEVEL = 0
+EXTRAVERSION =
+
+RELEASE=$(VERSION).$(PATCHLEVEL).$(SUBLEVEL)$(EXTRAVERSION)
+
 COPTS=-O2
-CFLAGS=-g $(COPTS) -Wall
+CFLAGS=-g $(COPTS) -Wall '-DVERSION="$(RELEASE)"'
 
 prefix=$(HOME)
 bin=$(prefix)/bin
Message 1 of 1 in “- Add GIT Version number”
  1. 1/3 - Add GIT Version numberSean, May 21, 2005

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.