summaryrefslogtreecommitdiffstats
path: root/hash.cxx
diff options
context:
space:
mode:
authorJosh Stone <jistone@redhat.com>2009-03-25 17:25:06 -0700
committerJosh Stone <jistone@redhat.com>2009-03-25 17:40:26 -0700
commita5e8d632f443c6a882dcabc669236dc4798b1fd7 (patch)
tree9157ba6a3f5a4daeffdf40b8eca07a75a6476195 /hash.cxx
parent2a8c27f6bfdf2e7962def6fc8729ebb5fb54c701 (diff)
downloadsystemtap-steved-a5e8d632f443c6a882dcabc669236dc4798b1fd7.tar.gz
systemtap-steved-a5e8d632f443c6a882dcabc669236dc4798b1fd7.tar.xz
systemtap-steved-a5e8d632f443c6a882dcabc669236dc4798b1fd7.zip
Add the kernel tree's git revision to the hash
To better support kernel developers who work out of a single source tree, this adds the git HEAD revision to our caching hash.
Diffstat (limited to 'hash.cxx')
-rw-r--r--hash.cxx4
1 files changed, 4 insertions, 0 deletions
diff --git a/hash.cxx b/hash.cxx
index c9121641..649e7ec0 100644
--- a/hash.cxx
+++ b/hash.cxx
@@ -95,6 +95,10 @@ get_base_hash (systemtap_session& s, hash& h)
h.add_file(s.kernel_build_tree + "/include/linux/version.h");
h.add_file(s.kernel_build_tree + "/include/linux/utsrelease.h");
+ // If the kernel is a git working directory, then add the git HEAD
+ // revision to our hash as well.
+ h.add(git_revision(s.kernel_build_tree));
+
// Hash runtime path (that gets added in as "-R path").
h.add(s.runtime_path);