{"thread":{"id":"1731","subject":"Add git-version-script.","startedAt":"2005-09-05T15:02:58Z","lastAt":"2005-09-08T02:35:25Z","messageCount":4,"participants":["Martin Atukunda","Junio C Hamano","A Large Angry SCM"],"isPatch":false,"patchVersion":null,"patchTotal":null},"messages":[{"id":"8088","messageId":"11259325781492-git-send-email-matlads@dsmagic.com","threadId":"1731","inReplyTo":null,"subject":"Add git-version-script.","fromName":"Martin Atukunda","fromEmail":"matlads@dsmagic.com","sentAt":"2005-09-05T15:02:58Z","receivedAt":"2005-09-05T15:02:58Z","isPatch":false,"sender":{"key":"matlads@dsmagic.com","avatar":null},"body":"This script simply reports the version of git you have installed.\n\nSigned-off-by: Martin Atukunda <matlads@dsmagic.com>\n\n---\n\n Documentation/git-version-script.txt |   36 ++++++++++++++++++++++++++++++++++\n Makefile                             |    9 +++++++--\n git-version-script.in                |    9 +++++++++\n 3 files changed, 52 insertions(+), 2 deletions(-)\n create mode 100644 Documentation/git-version-script.txt\n create mode 100644 git-version-script.in\n\ndf6687167001a93528876d5f36a2fc61eb1829fd\ndiff --git a/Documentation/git-version-script.txt b/Documentation/git-version-script.txt\nnew file mode 100644\n--- /dev/null\n+++ b/Documentation/git-version-script.txt\n@@ -0,0 +1,36 @@\n+git-version-script(1)\n+===================\n+v0.99.5, Aug 2005\n+\n+NAME\n+----\n+git-version-script - Prints the current version of git\n+\n+\n+SYNOPSIS\n+--------\n+'git-version-script'\n+\n+DESCRIPTION\n+-----------\n+\n+This simple script simply prints the version of git you are currently\n+running. The version is generated at release time, and stored in the script\n+for later use.\n+\n+OPTIONS\n+-------\n+This program takes no options\n+\n+Author\n+------\n+Written by Martin Atukunda <matlads@dsmagic.com>\n+\n+Documentation\n+--------------\n+Documentation by David Greaves, Junio C Hamano and the git-list <git@vger.kernel.org>.\n+\n+GIT\n+---\n+Part of the link:git.html[git] suite\n+\ndiff --git a/Makefile b/Makefile\n--- a/Makefile\n+++ b/Makefile\n@@ -66,7 +66,7 @@ SCRIPTS=git git-merge-one-file-script gi\n \tgit-format-patch-script git-sh-setup-script git-push-script \\\n \tgit-branch-script git-parse-remote-script git-verify-tag-script \\\n \tgit-ls-remote-script git-clone-dumb-http git-rename-script \\\n-\tgit-request-pull-script git-bisect-script\n+\tgit-request-pull-script git-bisect-script git-version-script\n \n SCRIPTS += git-count-objects-script\n SCRIPTS += git-revert-script\n@@ -230,8 +230,12 @@ install-doc:\n git-core.spec: git-core.spec.in Makefile\n \tsed -e 's/@@VERSION@@/$(GIT_VERSION)/g' < $< > $@\n \n+git-version-script: git-version-script.in Makefile\n+\tsed -e 's/@@VERSION@@/$(GIT_VERSION)/g' < $< > $@\n+\tchmod +x $@\n+\n GIT_TARNAME=git-core-$(GIT_VERSION)\n-dist: git-core.spec git-tar-tree\n+dist: git-core.spec git-version-script git-tar-tree\n \t./git-tar-tree HEAD $(GIT_TARNAME) > $(GIT_TARNAME).tar\n \t@mkdir -p $(GIT_TARNAME)\n \t@cp git-core.spec $(GIT_TARNAME)\n@@ -253,6 +257,7 @@ deb: dist\n clean:\n \trm -f *.o mozilla-sha1/*.o ppc/*.o $(PROG) $(LIB_FILE)\n \trm -f git-core.spec\n+\trm -f git-version-script\n \trm -rf $(GIT_TARNAME)\n \trm -f $(GIT_TARNAME).tar.gz git-core_$(GIT_VERSION)-*.tar.gz\n \trm -f git-core_$(GIT_VERSION)-*.deb git-core_$(GIT_VERSION)-*.dsc\ndiff --git a/git-version-script.in b/git-version-script.in\nnew file mode 100644\n--- /dev/null\n+++ b/git-version-script.in\n@@ -0,0 +1,9 @@\n+#!/bin/sh\n+\n+. git-sh-setup-script || die \"Not a git archive\"\n+\n+dryrun=\n+echo=\n+\n+echo git version @@VERSION@@\n+\n"},{"id":"8180","messageId":"7v1x402wiy.fsf@assigned-by-dhcp.cox.net","threadId":"1731","inReplyTo":"11259325781492-git-send-email-matlads@dsmagic.com","subject":"Re: Add git-version-script.","fromName":"Junio C Hamano","fromEmail":"junkio@cox.net","sentAt":"2005-09-08T01:11:49Z","receivedAt":"2005-09-08T01:11:49Z","isPatch":false,"sender":{"key":"gitster@pobox.com","avatar":"https://avatars.githubusercontent.com/u/54884?v=4"},"body":"Martin Atukunda <matlads@dsmagic.com> writes:\n\n> This script simply reports the version of git you have installed.\n\nI wanted to ahve some way of recording the git version, but I am\nwondering if 'git' without parameter telling the version number\nwould be good enough without introducing yet another script.\n"},{"id":"8185","messageId":"431F9D0F.8070301@gmail.com","threadId":"1731","inReplyTo":"7v1x402wiy.fsf@assigned-by-dhcp.cox.net","subject":"Re: Add git-version-script.","fromName":"A Large Angry SCM","fromEmail":"gitzilla@gmail.com","sentAt":"2005-09-08T02:08:15Z","receivedAt":"2005-09-08T02:08:15Z","isPatch":false,"sender":{"key":"gitzilla@gmail.com","avatar":"https://gravatar.com/avatar/354625c442439908ff3dd99757dee330e29e9df7847472384faf7a00add247fb?d=mp&s=160"},"body":"Junio C Hamano wrote:\n> Martin Atukunda <matlads@dsmagic.com> writes:\n> \n>>This script simply reports the version of git you have installed.\n> \n> I wanted to ahve some way of recording the git version, but I am\n> wondering if 'git' without parameter telling the version number\n> would be good enough without introducing yet another script.\n\ngit --version\n"},{"id":"8188","messageId":"20050908023525.GA14179@igloo.ds.co.ug","threadId":"1731","inReplyTo":"431F9D0F.8070301@gmail.com","subject":"[PATCH] Re: Add git-version-script.","fromName":"Martin Atukunda","fromEmail":"matlads@dsmagic.com","sentAt":"2005-09-08T02:35:25Z","receivedAt":"2005-09-08T02:35:25Z","isPatch":true,"sender":{"key":"matlads@dsmagic.com","avatar":null},"body":"Add version string to git.\n\nSigned-off-by: Martin Atukunda <matlads@dsmagic.com>\n\n---\n\n Makefile |    3 ++-\n git.in   |   25 +++++++++++++++++++++++++\n 2 files changed, 27 insertions(+), 1 deletions(-)\n create mode 100755 git.in\n\n6a9edfa27c41b7845bfd519e275c24d7e36ad702\ndiff --git a/Makefile b/Makefile\n--- a/Makefile\n+++ b/Makefile\n@@ -218,7 +218,8 @@ $(LIB_FILE): $(LIB_OBJS)\n doc:\n \t$(MAKE) -C Documentation all\n \n-\n+git: git.in Makefile\n+\tsed 's/@@VERSION@@/$(GIT_VERSION)/g' < $< > $@\n \n ### Testing rules\n \ndiff --git a/git.in b/git.in\nnew file mode 100755\n--- /dev/null\n+++ b/git.in\n@@ -0,0 +1,25 @@\n+#!/bin/sh\n+\n+cmd=\n+path=$(dirname $0)\n+case \"$#\" in\n+0)\t;;\n+*)\tcmd=\"$1\"\n+\tshift\n+\tif [ \"$cmd\" == \"--version\" ]; then\n+\t\techo \"git version @@VERSION@@\"\n+\t\texit 0\n+\tfi\n+\ttest -x $path/git-$cmd-script && exec $path/git-$cmd-script \"$@\"\n+\ttest -x $path/git-$cmd && exec $path/git-$cmd \"$@\" ;;\n+esac\n+\n+echo \"git version @@VERSION@@\"\n+echo \"Usage: git COMMAND [OPTIONS] [TARGET]\"\n+if [ -n \"$cmd\" ]; then\n+    echo \" git command '$cmd' not found: commands are:\"\n+else\n+    echo \" git commands are:\"\n+fi\n+\n+ls $path | sed -ne 's/^git-\\(.*\\)-script/  \\1/p' | fmt\n\n\n-- \nYour entire blood supply is filtered through your kidneys in four minutes.\n"}]}