The patch titled kconfig: place git SHA1 in .config output if in git tree has been removed from the -mm tree. Its filename was kconfig-place-git-sha1-in-config-output-if-in-git-tree.patch This patch was dropped because an updated version will be merged The current -mm tree may be found at http://userweb.kernel.org/~akpm/mmotm/ ------------------------------------------------------ Subject: kconfig: place git SHA1 in .config output if in git tree From: "Paul E. McKenney" <paulmck@xxxxxxxxxxxxxxxxxx> Append 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: Michal Marek <mmarek@xxxxxxx> Signed-off-by: Paul E. McKenney <paulmck@xxxxxxxxxxxxxxxxxx> Cc: Frans Pop <elendil@xxxxxxxxx> Cc: Geert Uytterhoeven <geert@xxxxxxxxxxxxxx> Signed-off-by: Andrew Morton <akpm@xxxxxxxxxxxxxxxxxxxx> --- scripts/kconfig/confdata.c | 13 +++++++++++-- 1 file changed, 11 insertions(+), 2 deletions(-) diff -puN scripts/kconfig/confdata.c~kconfig-place-git-sha1-in-config-output-if-in-git-tree scripts/kconfig/confdata.c --- a/scripts/kconfig/confdata.c~kconfig-place-git-sha1-in-config-output-if-in-git-tree +++ a/scripts/kconfig/confdata.c @@ -399,10 +399,11 @@ int conf_read(const char *name) int conf_write(const char *name) { FILE *out; + FILE *git; struct symbol *sym; struct menu *menu; const char *basename; - char dirname[128], tmpname[128], newname[128]; + char dirname[128], tmpname[128], newname[128], gitsha[128]; int type, l; const char *str; time_t now; @@ -450,12 +451,20 @@ int conf_write(const char *name) if (env && *env) use_timestamp = 0; + gitsha[0] = '\0'; + git = popen("git log --pretty=format:%h -1 2> /dev/null", "r"); + if (git != NULL) { + fscanf(git, " %127s ", gitsha); + pclose(git); + } + 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, use_timestamp ? "# " : "", use_timestamp ? ctime(&now) : ""); _ Patches currently in -mm which might be from paulmck@xxxxxxxxxxxxxxxxxx are origin.patch linux-next.patch kconfig-place-git-sha1-in-config-output-if-in-git-tree.patch rcu-remove-init_rcu_head-rcu_head_init-rcu_head.patch sysctl-fix-up-remaining-references-to-uevent_helper-fix.patch sysctl-extern-cleanup-rcu.patch -- To unsubscribe from this list: send the line "unsubscribe mm-commits" in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html