From: Erik Faye-Lund <kusmabite@googlemail.com>
To: Gerhard Gappmeier <gerhard.gappmeier@ascolab.com>
Cc: git@vger.kernel.org
Subject: Re: Patch which adds syslog support to git-shell
Date: Thu, 24 Dec 2009 12:38:57 +0100 [thread overview]
Message-ID: <40aa078e0912240338g7765d17cyf948650deab2aa01@mail.gmail.com> (raw)
In-Reply-To: <200912231832.03541.gerhard.gappmeier@ascolab.com>
Please read Documentation/SubmittingPatches. We prefer inline patches,
as they are easier to review.
On Wed, Dec 23, 2009 at 6:32 PM, Gerhard Gappmeier
<gerhard.gappmeier@ascolab.com> wrote:
> Hi
>
> I'm not sure if this is the right list, but here is my first GIT patch.
>
It's the right list :)
> I had a problem with git-shell and wanted to analyze it.
> Unfortunately it does not contain any trace capabilities.
> So I cloned git and added some basic syslog support.
> After that I recognized that the current git version just works ;-)
> but the syslog functionality is always a nice thing I think.
> So here is the patch.
Looking at your patch, I see there's a lot of white-space changes. Stuff like:
> - const char *cvsserver_argv[3] = {
> - "cvsserver", "server", NULL
> - };
> + const char *cvsserver_argv[3] = {
> + "cvsserver", "server", NULL
> + };
just makes this harder to review. Besides, we use tabs for indentation in git.
Also, I think it would be better to use set_die_routine() from usage.h
than to change all the die call-sites. This is what git-daemon does:
--->8---
if (log_syslog) {
openlog("git-daemon", LOG_PID, LOG_DAEMON);
set_die_routine(daemon_die);
}
--->8---
Look at daemon.c for the implementation of daemon_die().
+/* Syslog defines */
+#define GIT_SYSLOG_IDENT "git-shell"
+#define GIT_SYSLOG_OPTION 0
+#define GIT_SYSLOG_FACILITY LOG_LOCAL0
+
Is this really needed? These are only used at one place. Just doing
+ openlog("git-shell", 0, LOG_LOCAL0);
would IMO be cleaner.
Anyway, this is all I bother to point out before I see an inlined,
white-space fixed patch.
> Merry X-Mas.
Happy holidays to you too :)
--
Erik "kusma" Faye-Lund
next prev parent reply other threads:[~2009-12-24 11:39 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2009-12-23 17:32 Patch which adds syslog support to git-shell Gerhard Gappmeier
2009-12-24 11:38 ` Erik Faye-Lund [this message]
2009-12-24 13:03 ` Erik Faye-Lund
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=40aa078e0912240338g7765d17cyf948650deab2aa01@mail.gmail.com \
--to=kusmabite@googlemail.com \
--cc=gerhard.gappmeier@ascolab.com \
--cc=git@vger.kernel.org \
--cc=kusmabite@gmail.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).