Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

gitweb: fix tests on uninitialized hash indexes to avoid uninitialized value warnings in server log #617

Open
wants to merge 1 commit into
base: maint
Choose a base branch
from

Conversation

rapsys
Copy link

@rapsys rapsys commented Apr 24, 2020

It's happened that I tried to solve lots of meaningless warnings
in web server error log.

I think it makes no sense to spam error log with warnings about
uninitialized value when trying to run careless tests on undefined
hash indexes.

This is a simple fix that I did long ago that check carefully the
index before running tests on it.

I added myself as warning fix author as well.

My goal is to avoid re-applying the patch on each distribution update.

The warning message fixed in web server error log :
Use of uninitialized value $params{"action"} in string eq at gitweb.cgi
line 1377

Raphaël Gertz:
gitweb/README: add myself as warning fix author
gitweb/gitweb.perl: fix careless test on undefined hash indexes

gitweb/README | 3 +++
gitweb/gitweb.perl | 4 ++--
2 files changed, 5 insertions(+), 2 deletions(-)

Signed-off-by: Raphaël Gertz git@rapsys.eu

This change fix the message about uninitialized value when trying to
access undefined hash indexes.

The error message fixed:
Use of uninitialized value $params{"action"} in string eq at gitweb.cgi
line 1377

Add myself as warning fix author.

Signed-off-by: Raphaël Gertz <git@rapsys.eu>
@rapsys
Copy link
Author

rapsys commented Apr 24, 2020

@dscho I tried redo the pull request here, as a bugfix should be on maint branch if I am right.

Is everything fine, may I send a mail to the mailing list with reference to this pull request or should I use this one on master branch ?

git#767

@dscho
Copy link
Member

dscho commented Apr 24, 2020

I tried redo the pull request here, as a bugfix should be on maint branch if I am right.

No need to add another PR, you could re-target the PR by clicking the Edit button next to the PR's title, and then select a different base branch.

But it's fine to keep this here PR open.

Do realize, though, that everything you wrote in #617 (comment) will be used as cover letter!

And you will definitely want to use that cover letter to convince reviewers that this is not only a good change, but to entice them to look at it. Almost nothing in there says that it is about gitweb, for example. I would start out with it. Probably it would make sense to use gitweb: as prefix instead of commit: because this here change has literally nothing to do with the git commit command, but everything with gitweb.

Do have a look around at https://lore.kernel.org/git/ how other contributors write their cover letters, and try to imitate the style before sending your patch off.

@rapsys rapsys changed the title commit:fix use of uninitialized value [...] in server log gitweb:fix tests on uninitialized hash indexes to avoid uninitialized value warnings in server log Apr 24, 2020
@rapsys
Copy link
Author

rapsys commented Apr 24, 2020

Updated desc and title.

@dscho
Copy link
Member

dscho commented Apr 25, 2020

I think it makes no sense to spam error log with warnings about
uninitialized value when trying to run careless tests on undefined
hash indexes.

This is a simple fix that I did long ago that check carefully the
index before running tests on it.

I added myself as warning fix author as well.

My goal is to avoid re-applying the patch on each distribution update.

The warning message fixed in web server error log :
Use of uninitialized value $params{"action"} in string eq at gitweb.cgi
line 1377

Raphaël Gertz git@rapsys.eu:
gitweb/README: add myself as warning fix author
gitweb/gitweb.perl: fix careless test on undefined hash indexes

gitweb/README | 3 +++
gitweb/gitweb.perl | 4 ++--
2 files changed, 5 insertions(+), 2 deletions(-)

Signed-off-by: Raphaël Gertz git@rapsys.eu

If I were you, I would remove those. And I would add a space after the gitweb: prefix. Other than that, it looks ready to me.

@rapsys rapsys changed the title gitweb:fix tests on uninitialized hash indexes to avoid uninitialized value warnings in server log gitweb: fix tests on uninitialized hash indexes to avoid uninitialized value warnings in server log Apr 25, 2020
@rapsys
Copy link
Author

rapsys commented Apr 25, 2020

/submit

@gitgitgadget
Copy link

gitgitgadget bot commented Apr 25, 2020

Submitted as pull.617.git.1587847397970.gitgitgadget@gmail.com

WARNING: rapsys has no public email address set on GitHub

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants