Skip to content

Commit d03bc0c

Browse files
Add describe (patchlevel) to .git_patch and read it from make_patchnum.pl
1 parent 368556a commit d03bc0c

File tree

2 files changed

+2
-4
lines changed

2 files changed

+2
-4
lines changed

.git_patch

+1-1
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
$Format:%H|%ci|%D$
1+
$Format:%H|%ci|%(describe)|%D$

make_patchnum.pl

+1-3
Original file line numberDiff line numberDiff line change
@@ -135,7 +135,7 @@ sub write_files {
135135
}
136136
elsif ($git_patch_file = read_file(".git_patch") and $git_patch_file !~ /\A\$Format:%H/) {
137137
chomp $git_patch_file;
138-
($commit_id, my $commit_date, my $names)
138+
($commit_id, my $commit_date, $describe, my $names)
139139
= split /\|/, $git_patch_file;
140140
141141
my @names = split /,\s*/, $names;
@@ -146,7 +146,6 @@ sub write_files {
146146
}
147147
if (!$branch) {
148148
($branch) = map m{^tag: (.*)}, @names;
149-
$describe = $branch;
150149
}
151150
if (!$branch) {
152151
my ($pr) = map m{^refs/pull/([0-9]+)/}, @names;
@@ -156,7 +155,6 @@ sub write_files {
156155
$branch = $names[0] || $commit_id;
157156
}
158157

159-
$describe ||= $commit_id;
160158
$extra_info = "git_commit_date='$commit_date'\n";
161159
$extra_info .= "git_snapshot_date='$commit_date'\n";
162160
$commit_title = "Snapshot of:";

0 commit comments

Comments
 (0)