Skip to content

Commit

Permalink
git: Add metadata to the result of git archive
Browse files Browse the repository at this point in the history
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 <andrew.cooper3@citrix.com>
Signed-off-by: Euan Harris <euan.harris@citrix.com>
  • Loading branch information
euanh committed Nov 7, 2016
1 parent 491638d commit a53ed5e
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 0 deletions.
2 changes: 2 additions & 0 deletions .gitarchive-info
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
Changeset: $Format:%H$
Commit date: $Format:%cD$
1 change: 1 addition & 0 deletions .gitattributes
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
.gitarchive-info export-subst

0 comments on commit a53ed5e

Please sign in to comment.