git/list[1] front-page[2] threads[3] people[4] search[5] about
 

Re: [PATCH] git svn : hook before 'git svn dcommit'

From
Matthieu Moy <matthieu.moy@grenoble-inp.fr>
Date
Jul 2, 2011, 21:59 UTC
Message-ID
<vpqfwmos5sg.fsf@bauges.imag.fr>
In-Reply-To
<4E0F5485.9010201@gmail.com>
Frédéric Heitzmann <frederic.heitzmann@gmail.com> writes:
Show 10 quoted lines
> 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

I'd also put it in the git-svn page, since git-svn is somehow not really part of Git.

> +prevent some diff to be committed to a SVN repository.

I'd say "an SVN", not "a SVN", but the documentation already use both forms.

Show 10 quoted lines
>>> +       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).

I'm not talking about the \n, but the fact that what used to be a single line of code is broken in two parts in your message.

A patch hunk has lines starting with " ", "+" or "-", yours have a line starting with $. It won't apply with "patch" or "git apply", hence extra work for our maintainer.

Try using "git send-email" to avoid that.

And actually, read Documentation/SubmittingPatches, in particular the part about Signed-off-by.

-- 
Matthieu Moy
http://www-verimag.imag.fr/~moy/
Previous: Frédéric HeitzmannNext: Frédéric Heitzmann
Message 4 of 11 in “git svn : hook before 'git svn dcommit'”
  1. git svn : hook before 'git svn dcommit'Frédéric Heitzmann, Jul 2, 2011
  2. Matthieu MoyJul 2, 2011
  3. Frédéric HeitzmannJul 2, 2011
  4. Matthieu MoyJul 2, 2011
  5. git svn : hook before 'git svn dcommit'Frédéric Heitzmann, Jul 3, 2011
  6. 1/2 git svn : hook before 'git svn dcommit'Frédéric Heitzmann, Jul 3, 2011
  7. 2/2 git svn : documentation of 'pre-svn-dcommit'Frédéric Heitzmann, Jul 3, 2011
  8. Matthieu MoyJul 3, 2011
  9. Frédéric HeitzmannJul 4, 2011
  10. git svn : hook before 'git svn dcommit'Frédéric Heitzmann, Jul 5, 2011
  11. git svn : hook before 'git svn dcommit'Frédéric Heitzmann, Jul 9, 2011

Read the whole thread, see it on lore, or plain text.

$ cat FOOTERMessages come from the public archive at lore.kernel.org/git, fetched every hour. The front page is chosen and written each morning by an AI editor and can be wrong; the threads themselves are the record. About and API. For agents: an MCP server at https://gitlist.dev/mcp, and any thread, story or person page as Markdown by adding .md to its URL (or sending Accept: text/markdown). Details in /llms.txt.