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

Re: [PATCH] Document git-svn's first-parent rule

From
EWEric Wong <normalperson@yhbt.net>
Date
Nov 16, 2009, 23:14 UTC
Message-ID
<20091116231455.GA13460@dcvr.yhbt.net>
In-Reply-To
<ea845c8757a629d692bb6cd3827887f0e811c044.1258366486.git.trast@student.ethz.ch>
Thomas Rast <trast@student.ethz.ch> wrote:
Show 9 quoted lines
> git-svn has the following rule to detect the SVN base for its
> operations: find the first git-svn-id line reachable through
> first-parent ancestry.  IOW,
> 
>   git log --grep=^git-svn-id: --first-parent -1
> 
> Document this, as it is very important when using merges with git-svn.
> 
> Signed-off-by: Thomas Rast <trast@student.ethz.ch>
Thanks Thomas,
Acked-by: Eric Wong <normalperson@yhbt.net>
Show 26 quoted lines
> ---
>  Documentation/git-svn.txt |   10 ++++++++++
>  1 files changed, 10 insertions(+), 0 deletions(-)
> 
> diff --git a/Documentation/git-svn.txt b/Documentation/git-svn.txt
> index 1812890..6da4151 100644
> --- a/Documentation/git-svn.txt
> +++ b/Documentation/git-svn.txt
> @@ -735,6 +735,16 @@ merges you've made.  Furthermore, if you merge or pull from a git branch
>  that is a mirror of an SVN branch, 'dcommit' may commit to the wrong
>  branch.
>  
> +If you do merge, note the following rule: 'git svn dcommit' will
> +attempt to commit on top of the SVN commit named in
> +------------------------------------------------------------------------
> +git log --grep=^git-svn-id: --first-parent -1
> +------------------------------------------------------------------------
> +You 'must' therefore ensure that the most recent commit of the branch
> +you want to dcommit to is the 'first' parent of the merge.  Chaos will
> +ensue otherwise, especially if the first parent is an older commit on
> +the same SVN branch.
> +
>  'git clone' does not clone branches under the refs/remotes/ hierarchy or
>  any 'git svn' metadata, or config.  So repositories created and managed with
>  using 'git svn' should use 'rsync' for cloning, if cloning is to be done
> -- 
Previous: Thomas RastNext: Junio C Hamano
Message 2 of 5 in “Document git-svn's first-parent rule”
  1. Document git-svn's first-parent ruleThomas Rast, Nov 16, 2009
  2. Eric WongNov 16, 2009
  3. Junio C HamanoNov 17, 2009
  4. Eric WongNov 17, 2009
  5. Junio C HamanoNov 17, 2009

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.