git@vger.kernel.org mailing list mirror (one of many)
 help / color / mirror / code / Atom feed
From: "Frédéric Heitzmann" <frederic.heitzmann@gmail.com>
To: Matthieu Moy <Matthieu.Moy@grenoble-inp.fr>
Cc: Git Mailing List <git@vger.kernel.org>
Subject: Re: [PATCH] git svn : hook before 'git svn dcommit'
Date: Sat, 02 Jul 2011 19:25:25 +0200	[thread overview]
Message-ID: <4E0F5485.9010201@gmail.com> (raw)
In-Reply-To: <vpqboxcu6td.fsf@bauges.imag.fr>


Le 02/07/2011 15:54, Matthieu Moy a écrit :
> Frédéric Heitzmann<frederic.heitzmann@gmail.com>  writes:
>
>> The 'pre-svn-dcommit' hook si called before 'git svn dcommit', which aborts
>> if return value is not zero.
>> ---
>>   git-svn.perl |   19 +++++++++++++++++++
> What about documentation?
Should documentation be part of githooks or git-svn man page ?
I vote for the latest, in order to avoid
In any case, what do you think of the following help message ?

+HOOKS
+-----
+
+The 'pre-svn-dcommit' hook is called by 'git svn dcommit' and can be 
used to
+prevent some diff to be committed to a SVN repository. It may typically be
+used to filter some intermediate patches, which were committed into git but
+must not find their way to the SVN repository.
+
+If the hook exists with a non zero-status, 'git svn dcommit' will abort.
+
+

[...]

  SEE ALSO
  --------
-linkgit:git-rebase[1]
+linkgit:git-rebase[1], linkgit:githooks[5]

-- 

>> +       if ($? == -1) {
>> +               print "[pre_svn_dcommit_hook] failed to execute $hook:
>> $!\n";
> whitespace damage (extra newline)
>

As for the 'whitespace damage", I do not understand what you mean.
The \n look mandatory to me.
You may look at 'info perlfunc' for the original code snippet (see 
'system' function).

--
Fred

  reply	other threads:[~2011-07-02 17:25 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-07-02 12:48 [PATCH] git svn : hook before 'git svn dcommit' Frédéric Heitzmann
2011-07-02 13:54 ` Matthieu Moy
2011-07-02 17:25   ` Frédéric Heitzmann [this message]
2011-07-02 21:59     ` Matthieu Moy
2011-07-03 20:49       ` Frédéric Heitzmann
2011-07-03 20:49         ` [PATCH 1/2] " Frédéric Heitzmann
2011-07-03 20:49         ` [PATCH 2/2] git svn : documentation of 'pre-svn-dcommit' Frédéric Heitzmann
2011-07-03 21:00         ` [PATCH] git svn : hook before 'git svn dcommit' Matthieu Moy
2011-07-04  5:54           ` Frédéric Heitzmann
2011-07-05 20:44             ` [PATCH v2] " Frédéric Heitzmann
2011-07-09 12:18               ` Frédéric Heitzmann

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

  List information: http://vger.kernel.org/majordomo-info.html

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=4E0F5485.9010201@gmail.com \
    --to=frederic.heitzmann@gmail.com \
    --cc=Matthieu.Moy@grenoble-inp.fr \
    --cc=git@vger.kernel.org \
    /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.
Code repositories for project(s) associated with this public inbox

	https://80x24.org/mirrors/git.git

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 read-only IMAP folder(s) and NNTP newsgroup(s).