Skip to contentSkip to conversation

get_maintainer: don't remind about no git repo when --nogit is used

PATCH Applied Randy Dunlap 2 participants 2 messages Jan 2, 2022 GET_MAINTAINER script

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 get_maintainer: don't remind about no git repo when --nogit is used

When --nogit is used with scripts/get_maintainer.pl, the script spews 4 lines of unnecessary information (noise). Do not print those lines when --nogit is specified.

This change removes the printing of these 4 lines:

./scripts/get_maintainer.pl: No supported VCS found. Add --nogit to options? Using a git repository produces better results.
Try Linus Torvalds' latest git repository using:
git clone git://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git

Cc Joe Perches <[email protected]>
Cc Andrew Morton <[email protected]>
---
 scripts/get_maintainer.pl |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
scripts/get_maintainer.pl +1 -1
@@ -1718,7 +1718,7 @@ sub vcs_exists {
     %VCS_cmds = %VCS_cmds_hg;
     return 2 if eval $VCS_cmds{"available"};
     %VCS_cmds = ();
-    if (!$printed_novcs) {
+    if (!$printed_novcs && $email_git) {
 	warn("$P: No supported VCS found.  Add --nogit to options?\n");
 	warn("Using a git repository produces better results.\n");
 	warn("Try Linus Torvalds' latest git repository using:\n");
maintainer
#1 lore raw
Quoted 3 lines · Randy Dunlap

When --nogit is used with scripts/get_maintainer.pl, the script spews 4 lines of unnecessary information (noise). Do not print those lines when --nogit is specified.

Seems sensible, thanks.

Quoted 26 lines

This change removes the printing of these 4 lines:

./scripts/get_maintainer.pl: No supported VCS found. Add --nogit to options? Using a git repository produces better results.
Try Linus Torvalds' latest git repository using:
git clone git://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git

Cc Joe Perches <[email protected]>
Cc Andrew Morton <[email protected]>
---
 scripts/get_maintainer.pl |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
scripts/get_maintainer.pl +1 -1
@@ -1718,7 +1718,7 @@ sub vcs_exists {
     %VCS_cmds = %VCS_cmds_hg;
     return 2 if eval $VCS_cmds{"available"};
     %VCS_cmds = ();
-    if (!$printed_novcs) {
+    if (!$printed_novcs && $email_git) {
 	warn("$P: No supported VCS found.  Add --nogit to options?\n");
 	warn("Using a git repository produces better results.\n");
 	warn("Try Linus Torvalds' latest git repository using:\n");