Re: [PATCH RFC] kconfig: place git SHA1 in .config output if in gittree

From: Ingo Molnar
Date: Mon Mar 01 2010 - 03:34:36 EST

* Paul E. McKenney <paulmck@xxxxxxxxxxxxxxxxxx> wrote:

> This patch appends the SHA1 hash of the current git tree to the
> kernel version line, or "[Not git tree]" if run from a non-git tree.
> Uses "git log" to print the hash.
> Suggested-by: Ingo Molnar <mingo@xxxxxxx>
> Cc: Roman Zippel <zippel@xxxxxxxxxxxxxx>
> Signed-off-by: Paul E. McKenney <paulmck@xxxxxxxxxxxxxxxxxx>

> fprintf(out, _("#\n"
> "# Automatically generated make config: don't edit\n"
> - "# Linux kernel version: %s\n"
> + "# Linux kernel version: %s %s\n"
> "%s%s"
> "#\n"),
> sym_get_string_value(sym),
> + gitsha[0] == '\0' ? "[Not git tree]" : gitsha,

Very nice!

I have scripting that does something similar for (most of) my own configs, but
it would be nice to see your more complete patch upstream.


To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at
Please read the FAQ at