]> git.ipfire.org Git - thirdparty/git.git/commit - git-cvsimport.perl
cvsimport: honor -i and non -i upon subsequent imports
authorJunio C Hamano <junkio@cox.net>
Fri, 17 Mar 2006 22:08:39 +0000 (14:08 -0800)
committerJunio C Hamano <junkio@cox.net>
Fri, 17 Mar 2006 22:10:16 +0000 (14:10 -0800)
commit8a5f2eac5271ba1efed353c0c0a992d6471a8d05
treee9b9c77a62d617acb5cc1484e62f46a09af2c0d0
parent53dc4636275c966bb0781709fd0dded1cced4458
cvsimport: honor -i and non -i upon subsequent imports

Documentation says -i is "import only", so without it,
subsequent import should update the current branch and working
tree files in a sensible way.

"A sensible way" defined by this commit is "act as if it is a
git pull from foreign repository which happens to be CVS not
git".  So:

 - If importing into the current branch (note that cvsimport
   requires the tracking branch is pristine -- you checked out
   the tracking branch but it is your responsibility not to make
   your own commits there), fast forward the branch head and
   match the index and working tree using two-way merge, just
   like "git pull" does.

 - If importing into a separate tracking branch, update that
   branch head, and merge it into your current branch, again,
   just like "git pull" does.

Signed-off-by: Junio C Hamano <junkio@cox.net>
git-cvsimport.perl