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

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

From
EWEric Wong <normalperson@yhbt.net>
Date
Aug 17, 2011, 20:37 UTC
Message-ID
<20110817203701.GB24581@dcvr.yhbt.net>
In-Reply-To
<CALeToSUidWgiJ+PxuphnBZOQGNStNOO9==EswfLDpFr2GYy=nA@mail.gmail.com>
Frédéric Heitzmann <frederic.heitzmann@gmail.com> wrote:
Show 8 quoted lines
> 4) Before merging back to master and commitng to SVN, it is necessary
> to remove commits with reference data (git rebase -i --onto master
> master topic ...)
> 5) merge topic branch with master and git svn dcommit
> 
> -- end --
> 
> It is very easy to forget step 4, and svn commit lots of useless data.
I agree.
> Proposal 1)
> * commit reference data with some specific mark in the commit message
> (e.g. "NO_SVN")
> * use pre-svn-dcommit hook to detect such commits

The problem with this is hook standardization across committers and even across different machines/directories a committer may use.

Show 11 quoted lines
> Proposal 2) (not fully feasable for what I know)
> * git svn clone to a bare repo
> * clone a working repo from the the bare repo.
> * steps 2, 3, maybe 3bis, ... then 4
> * push commits to the bare repo, while using pre-receive or update
> hook to look for wrong commits, and abort if so.
> * use post-receive hook to trigger git svn dcommit
> 
> Main drawback for proposal 2 (appart from needing 2 repo instead of
> one) is that each time you want to update your working  repo, you have
> to git svn rebase the bare repo, then git pull.
Proposal 2 is way too complicated, I hate it.
> All things begin equal, proposal 1 seems to be the easier path, but it
> is highly debatable.
I had Proposal 3 in my original response:
> 2011/8/17 Eric Wong <normalperson@yhbt.net> wrote:
> > Perhaps an interactive option for dcommit would be just as useful?

1 and 3 can both implemented, but I think 3 would be easier to use/setup/standardize. I suspect it's also easier to train oneself to always use "dcommit -i". Perhaps even default to interactive mode like git-send-email does nowadays.

Unfortunately interactive dcommit requires more effort to implement.
-- 
Eric Wong
Previous: Frédéric HeitzmannNext: Frédéric Heitzmann
Message 5 of 9 in “git svn : hook before 'git svn dcommit'”
  1. git svn : hook before 'git svn dcommit'Frédéric Heitzmann, Aug 15, 2011
  2. Junio C HamanoAug 15, 2011
  3. Eric WongAug 17, 2011
  4. Frédéric HeitzmannAug 17, 2011
  5. Eric WongAug 17, 2011
  6. Frédéric HeitzmannAug 18, 2011
  7. Eric WongAug 20, 2011
  8. Peter BaumannAug 18, 2011
  9. Paul YoungSep 1, 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.