From a53ed5e7a8513d1c7840e3d8501dd55dbc55b651 Mon Sep 17 00:00:00 2001 From: Euan Harris Date: Mon, 7 Nov 2016 09:51:32 +0000 Subject: [PATCH] git: Add metadata to the result of `git archive` Have `git archive` automatically fill in metadata at the point of creating the archive, which makes it easier to track back from released packages to the source code which was used to build them. .gitarchive-info will contain something like the following: > Changeset: ccd5d2e265d1d629004aa05f6f873ab6f49555c2 > Commit date: Mon, 7 Nov 2016 09:51:32 +0000 Based on https://xenbits.xen.org/gitweb/?p=xen.git;a=commitdiff;h=bd4d31be073166fc69b131e6375b55033b83b1c0 Suggested-by: Andrew Cooper Signed-off-by: Euan Harris --- .gitarchive-info | 2 ++ .gitattributes | 1 + 2 files changed, 3 insertions(+) create mode 100644 .gitarchive-info create mode 100644 .gitattributes diff --git a/.gitarchive-info b/.gitarchive-info new file mode 100644 index 0000000..83e5b86 --- /dev/null +++ b/.gitarchive-info @@ -0,0 +1,2 @@ +Changeset: $Format:%H$ +Commit date: $Format:%cD$ diff --git a/.gitattributes b/.gitattributes new file mode 100644 index 0000000..f7bf506 --- /dev/null +++ b/.gitattributes @@ -0,0 +1 @@ +.gitarchive-info export-subst