Skip to content

Commit

Permalink
Add describe (patchlevel) to .git_patch and read it from make_patchnu…
Browse files Browse the repository at this point in the history
…m.pl
  • Loading branch information
thibaultduponchelle committed Feb 10, 2025
1 parent 368556a commit d03bc0c
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 4 deletions.
2 changes: 1 addition & 1 deletion .git_patch
Original file line number Diff line number Diff line change
@@ -1 +1 @@
$Format:%H|%ci|%D$
$Format:%H|%ci|%(describe)|%D$
4 changes: 1 addition & 3 deletions make_patchnum.pl
Original file line number Diff line number Diff line change
Expand Up @@ -135,7 +135,7 @@ sub write_files {
}
elsif ($git_patch_file = read_file(".git_patch") and $git_patch_file !~ /\A\$Format:%H/) {
chomp $git_patch_file;
($commit_id, my $commit_date, my $names)
($commit_id, my $commit_date, $describe, my $names)
= split /\|/, $git_patch_file;
my @names = split /,\s*/, $names;
Expand All @@ -146,7 +146,6 @@ sub write_files {
}
if (!$branch) {
($branch) = map m{^tag: (.*)}, @names;
$describe = $branch;
}
if (!$branch) {
my ($pr) = map m{^refs/pull/([0-9]+)/}, @names;
Expand All @@ -156,7 +155,6 @@ sub write_files {
$branch = $names[0] || $commit_id;
}

$describe ||= $commit_id;
$extra_info = "git_commit_date='$commit_date'\n";
$extra_info .= "git_snapshot_date='$commit_date'\n";
$commit_title = "Snapshot of:";
Expand Down

0 comments on commit d03bc0c

Please sign in to comment.