Git-svn merges and captures details

we use git-svn to manage SVN repo branches. We encounter the following problem: after several attempts by user X to branches, user Y would like to use git-svn to merge the changes in the branch to the trunk. The problem that we see is that commit messages for all individual merge operations look as if they were made by user Y, while the actual change in the branch was made by user X.

Is there a way to tell git-svn that when merging, use the original message / message author for this change, and not the person doing the merge?

+5
source share
3 answers

git -svn man . " git -svn rebase ( )" ". , , : -)

2 . -, svn , git. , Y trunk, svn , , X. git, , , , .

-, git, , svn. , git, . .

git 1.6.0.2, "" svn merge. svn 1.5 ​​ , svn log -g - :

------------------------------------------------------------------------
r5 | Y | 2008-09-24 15:17:12 +0200 (Wed, 24 Sep 2008) | 1 line

Merged release-1.0 into trunk
------------------------------------------------------------------------
r4 | X | 2008-09-24 15:16:13 +0200 (Wed, 24 Sep 2008) | 1 line
Merged via: r5

Return 1
------------------------------------------------------------------------
r3 | X | 2008-09-24 15:15:48 +0200 (Wed, 24 Sep 2008) | 2 lines
Merged via: r5

Create a branch

Y r5, X . , svn- -g:

       2          Y int main()
       2          Y {
G      4          X   return 1;
       2          Y }

, , Y , , X ( ) .

, svn 1.5.2, , , svn-. git, , .

: git 1.7.1, , - . , git - svn: mergeinfo, git merge, git svn dcommit svn: mergeinfo, , Subversion , , , . , git svn clone svn: mergeinfo , , svn merge ( ), git git .

+13

git , commit.

echo "$merge_sha1 $parent1_sha1 $parent2_sha1" >> .git/info/grafts

: , $merge_sha1 $parent1_sha1. SVN , :

git svn find-rev r$revnum $branch

Presto, 3 , .

+6

Try using the -add-author-from and -use-log-author options for git -svn.

+2
source

All Articles