Skip to content

Commit 95f5d8a

Browse files
committed
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 <[email protected]> Signed-off-by: Euan Harris <[email protected]>
1 parent ad913f9 commit 95f5d8a

File tree

2 files changed

+3
-0
lines changed

2 files changed

+3
-0
lines changed

.gitarchive-info

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
Changeset: $Format:%H$
2+
Commit date: $Format:%cD$

.gitattributes

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
.gitarchive-info export-subst

0 commit comments

Comments
 (0)