Thread (3 messages) 3 messages, 3 authors, 2016-06-15

Re: Generate version file by hooks

From: John Dlugosz <hidden>
Date: 2016-06-15 22:46:24

=== Re: ===
I'd like to put the SHA1 of the current commit into a source file so
that my 
program can further process it -- put it into a log file for example.
=== end ===

Isn't that what the existing file HEAD is for?  Possibly with a level of
indirection.  So use 
	git rev-parse HEAD
any time you need that SHA1 value.  The HEAD is always updated, since
that _is_ what defines the "current" commit.

--John
(please excuse the footer; it's not my idea)

TradeStation Group, Inc. is a publicly-traded holding company (NASDAQ GS: TRAD) of three operating subsidiaries, TradeStation Securities, Inc. (Member NYSE, FINRA, SIPC and NFA), TradeStation Technologies, Inc., a trading software and subscription company, and TradeStation Europe Limited, a United Kingdom, FSA-authorized introducing brokerage firm. None of these companies provides trading or investment advice, recommendations or endorsements of any kind. The information transmitted is intended only for the person or entity to which it is addressed and may contain confidential and/or privileged material. Any review, retransmission, dissemination or other use of, or taking of any action in reliance upon, this information by persons or entities other than the intended recipient is prohibited.
  If you received this in error, please contact the sender and delete the material from any computer.
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help