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

2 messages, 2 authors, 2016-06-15 · open the first message on its own page

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

From: Matthieu Moy <hidden>
Date: 2016-06-15 22:51:32

Frédéric Heitzmann [off-list ref] 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?
+       if ($? == -1) {
+               print "[pre_svn_dcommit_hook] failed to execute $hook:
$!\n";
whitespace damage (extra newline)

-- 
Matthieu Moy
http://www-verimag.imag.fr/~moy/

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

From: Frédéric Heitzmann <hidden>
Date: 2016-06-15 22:51:32

Le 02/07/2011 15:54, Matthieu Moy a écrit :
Frédéric Heitzmann[off-list ref]  writes:
quoted
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]

-- 
quoted
+       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
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help