From a2bfa5ec9539f9063e33519e245ae00193783750 Mon Sep 17 00:00:00 2001
From: Shulhan <ms@kilabit.info>
Date: Tue, 13 Jan 2026 21:08:26 +0700
Subject: all: get the copyright year from git history

If the line that match with pattern on match-copyright does not contains
year, or there is no match, try to get the year from the first commit of
the file using "git log --follow ..." command.

If no commit history or its not using git, use default copyright year from
configuration.
---
 testdata/scan/test.sql | 5 +++++
 1 file changed, 5 insertions(+)
 create mode 100644 testdata/scan/test.sql

(limited to 'testdata/scan/test.sql')

diff --git a/testdata/scan/test.sql b/testdata/scan/test.sql
new file mode 100644
index 0000000..86d55b3
--- /dev/null
+++ b/testdata/scan/test.sql
@@ -0,0 +1,5 @@
+-- Copyright 2022, Shulhan <ms@kilabit.info>. All rights reserved.
+-- Use of this source code is governed by a BSD-style
+-- license that can be found in the LICENSE file.
+
+-- comment
-- 
cgit v1.3

