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

Re: git-cvsimport "you may need to merge manually"

From
Junio C Hamano <junkio@cox.net>
Date
Mar 17, 2006, 03:23 UTC
Message-ID
<7vk6at7o06.fsf@assigned-by-dhcp.cox.net>
In-Reply-To
<86r75122yj.fsf@blue.stonehenge.com>
merlyn@stonehenge.com (Randal L. Schwartz) writes:
Show 8 quoted lines
> Junio> I do not use cvsimport but I wonder what Commit ID 985ca7
> Junio> contains.  Can you try "git show 985ca7" and see if that is the
> Junio> commit you want?
>
> To bring the tree clean, I issued "git commit -a -m 'cvs sync'", and
> "git-whatchanged -p" shows the most recent commit with the diff actually
> *backed out* the most recent change in CVS, and the next change down was
> actually the good one.  Weird.  Do I need to start all over again?

So the commit ID reported before the command says Done. was actually what you wanted, but that latest tree was not checked out cvsimport, so "git status" reported "you have these changes" (it should have said "you have these backed-out", but there is no way for it to know), and obviously your commit on top of that is to back it out.

I just tried it on a copy of my day-job CVS repository. Indeed what it does seem quite strange.

    ...
    skip patchset 1019: 1142562992 before 1142562992
    skip patchset 1020: 1142563093 before 1142563093
    Fetching Makefile   v 1.10
    Update Makefile: 871 bytes
    Tree ID 4c51717e01fb08b6d15bc6e35d48142d2d5b94e7
    Parent ID 98d49aa57b93552cea82ce20c880bad4bcc5ebfc
    Committed patch 1021 (master 2006-03-17 03:04:31)
    Commit ID ad6c4fb908df7057d5564bf22cf9e0f9f3e743f2
    DONE

It updated the 'master' branch head, it reported the tip commit ID before saying DONE, and that commit ID is stored in refs/heads/master. However, it does not seem to touch index nor working tree files (I did not get "you may need to do merge" message, by the way).

Since I know I was just trying things out, I do not care what is in my index nor in the working tree files, so I could at this point say:

	$ git reset --hard

to sync the master tree, but in general you may be running cvsimport into a dirty tree, in which case you are screwed.

I think reverting this commit would help, but I do not remember offhand what the breakage this patch was trying to fix.

    commit a541211ef4136eb7464c4466d20b60b8580efc44
    Author: Matthias Urlichs <smurf@smurf.noris.de>
    Date:   Tue Mar 7 10:08:34 2006 +0100
        cvsimport: Remove master-updating code
        The code which tried to update the master branch was somewhat broken.
        => People should do that manually, with "git merge".
        Signed-off-by: Matthias Urlichs <smurf@smurf.noris.de>
        Signed-off-by: Junio C Hamano <junkio@cox.net>

... Ugh, and after I wrote all of the above, the version of git I have at work predates that commit X-<. So maybe this was fixed with that commit, and you are expected to say:

	$ git pull . origin

assuming that you are on "master" branch and cvsimoprt tracks CVS head with "origin" branch, that is.

Smurf, help?
Previous: Randal L. SchwartzNext: Randal L. Schwartz
Message 5 of 13 in “git-cvsimport "you may need to merge manually"”
  1. Randal L. SchwartzMar 17, 2006
  2. Junio C HamanoMar 17, 2006
  3. Randal L. SchwartzMar 17, 2006
  4. Randal L. SchwartzMar 17, 2006
  5. Junio C HamanoMar 17, 2006
  6. Randal L. SchwartzMar 17, 2006
  7. Junio C HamanoMar 17, 2006
  8. Randal L. SchwartzMar 17, 2006
  9. Junio C HamanoMar 18, 2006
  10. smurf@smurf.noris.deMar 17, 2006
  11. Junio C HamanoMar 17, 2006
  12. smurf@smurf.noris.deMar 17, 2006
  13. Junio C HamanoMar 17, 2006

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.