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

Re: git svn and the post-receive hook

From
Pascal Obry <pascal@obry.net>
Date
Aug 2, 2008, 19:20 UTC
Message-ID
<4894B387.4040004@obry.net>
In-Reply-To
<7vwsizl0l9.fsf@gitster.siamese.dyndns.org>
Junio,
> Are you saying that there may be breakages that is made at the Subversion
> side, and you would want to catch it?
Exactly.
> What would you do _after_ finding out that somebody screwed up and you
> have a borked history on the Subversion side already?
Notify the developer(s) about the problem(s).
Show 15 quoted lines
> I do not think this belongs to "git svn rebase" (let alone "git rebase",
> no way --- you won't rewrite nor reject the upstream even if you find
> problems with it).
> 
> I understand that you would at least want to notice the damange to the
> history that happened at the remote end, and I agree it would make sense
> to do something like:
> 
> 	$ git command-that-updates-the-remote-tracking-branch git-svn
>         $ check-history git-svn@{1}..git-svn
> 
> The "command-that-updates" could be "svn fetch" or just a simple "fetch".
> 
> But the "check-history" script will be very specific to your project, and
> I do not think it makes sense to make it a hook to the "command-that-updates".

Hum... Any hook is very specific to a project. That's why it is a hook and not a built-in command.

BTW, I do not see why this would be a problem with git-svn whereas the post-receive hook is fine for Git. In many projects rewriting history is not permitted but post-receive is quite handy to do some checks.

post-received receive 3 parameters:
   - sha before
   - sha after
   - refname
It is perfectly usable after a git-svn rebase.
Pascal.
-- 
--|------------------------------------------------------
--| Pascal Obry                           Team-Ada Member
--| 45, rue Gabriel Peri - 78114 Magny Les Hameaux FRANCE
--|------------------------------------------------------
--|              http://www.obry.net
--| "The best way to travel is by means of imagination"
--|
--| gpg --keyserver wwwkeys.pgp.net --recv-key C1082595
Previous: Junio C HamanoNext: Junio C Hamano
Message 5 of 7 in “git svn and the post-receive hook”
  1. Pascal ObryAug 2, 2008
  2. Miklos VajnaAug 2, 2008
  3. Junio C HamanoAug 2, 2008
  4. Junio C HamanoAug 2, 2008
  5. Pascal ObryAug 2, 2008
  6. Junio C HamanoAug 2, 2008
  7. Miklos VajnaAug 2, 2008

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.