scripts: Detect git worktrees for get_maintainer.pl --git
PATCH 1/1 scripts: Detect git worktrees for get_maintainer.pl --git
Recent git versions support worktrees where .git is not a directory but a file with a path to the .git repository; however the get_maintainer.pl script only recognises the .git directory, let's fix it.
--- scripts/get_maintainer.pl | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
scripts/get_maintainer.pl +1 -1
@@ -81,7 +81,7 @@ my %VCS_cmds; my %VCS_cmds_git = ( "execute_cmd" => \&git_execute_cmd, - "available" => '(which("git") ne "") && (-d ".git")', + "available" => '(which("git") ne "") && (-e ".git")', "find_signers_cmd" => "git log --no-color --follow --since=\$email_git_since " . '--format="GitCommit: %H%n' .
Signature · 1 line
2.17.1
Quoted 9 lines · Alexey Kardashevskiy
Recent git versions support worktrees where .git is not a directory but a file with a path to the .git repository; however the get_maintainer.pl script only recognises the .git directory, let's fix it.
Signed-off-by Alexey Kardashevskiy <[email protected]>--- scripts/get_maintainer.pl | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
Thanks,
Stefano
Quoted 17 lines
scripts/get_maintainer.pl +1
-1@@ -81,7 +81,7 @@ my %VCS_cmds; my %VCS_cmds_git = ( "execute_cmd" => \&git_execute_cmd, - "available" => '(which("git") ne "") && (-d ".git")', + "available" => '(which("git") ne "") && (-e ".git")', "find_signers_cmd" => "git log --no-color --follow --since=\$email_git_since " . '--format="GitCommit: %H%n' .Signature · 1 line
2.17.1
Quoted 6 lines · On Tue, 12 Nov 2019 14:45:32 +1100 Alexey Kardashevskiy <[email protected]> wrote:
Recent git versions support worktrees where .git is not a directory but a file with a path to the .git repository; however the get_maintainer.pl script only recognises the .git directory, let's fix it.
Signed-off-by Alexey Kardashevskiy <[email protected]>---
Makes sense. The script in the linux kernel tree has this since 2014 BTW :)
Quoted 16 lines
scripts/get_maintainer.pl | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)scripts/get_maintainer.pl +1
-1@@ -81,7 +81,7 @@ my %VCS_cmds; my %VCS_cmds_git = ( "execute_cmd" => \&git_execute_cmd, - "available" => '(which("git") ne "") && (-d ".git")', + "available" => '(which("git") ne "") && (-e ".git")', "find_signers_cmd" => "git log --no-color --follow --since=\$email_git_since " . '--format="GitCommit: %H%n' .
Paolo Bonzini
AppliedQuoted 15 lines · Alexey Kardashevskiy
Recent git versions support worktrees where .git is not a directory but a file with a path to the .git repository; however the get_maintainer.pl script only recognises the .git directory, let's fix it.
Signed-off-by Alexey Kardashevskiy <[email protected]>--- scripts/get_maintainer.pl | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)scripts/get_maintainer.pl +0
-0
scripts/get_maintainer.pl my %VCS_cmds; · line 87
Quoted 8 lines
scripts/get_maintainer.pl +1
-1@@ -81,7 +81,7 @@ my %VCS_cmds; my %VCS_cmds_git = ( "execute_cmd" => \&git_execute_cmd, - "available" => '(which("git") ne "") && (-d ".git")', + "available" => '(which("git") ne "") && (-e ".git")', "find_signers_cmd" => "git log --no-color --follow --since=\$email_git_since " . '--format="GitCommit: %H%n' .
Queued, thanks.
Paolo