mirror of
https://git.tartarus.org/simon/putty.git
synced 2025-06-30 19:12:48 -05:00
Make bob builds show the full source git commit hash in buildinfo.
The Windows binaries, and both Windows and Unix source archives, output from a bob build will now include the full SHA-1 of the source git commit in their buildinfo (hence in all the About boxes and command-line version output). This will be occasionally useful to me at release time (there was that one embarrassing incident where I managed not to notice that I'd made a release build from entirely the wrong commit), but mostly, it just seems like an obviously useful thing to put in a general buildinfo section now that there is one.
This commit is contained in:
3
misc.c
3
misc.c
@ -1151,6 +1151,7 @@ int strendswith(const char *s, const char *t)
|
||||
char *buildinfo(const char *newline)
|
||||
{
|
||||
strbuf *buf = strbuf_new();
|
||||
extern const char commitid[]; /* in commitid.c */
|
||||
|
||||
strbuf_catf(buf, "Build platform: %d-bit %s",
|
||||
(int)(CHAR_BIT * sizeof(void *)),
|
||||
@ -1207,5 +1208,7 @@ char *buildinfo(const char *newline)
|
||||
strbuf_catf(buf, "%sBuild option: DEBUG", newline);
|
||||
#endif
|
||||
|
||||
strbuf_catf(buf, "%sSource commit: %s", newline, commitid);
|
||||
|
||||
return strbuf_to_str(buf);
|
||||
}
|
||||
|
Reference in New Issue
Block a user