rcls / crap

Cvs Remote Access Program
GNU General Public License v3.0
46 stars 12 forks source link

Leaving a dirty working tree after incremental import #12

Closed YorkZ closed 8 years ago

YorkZ commented 8 years ago

After an incremental import, the working directory was dirty with a bunch of uncommitted changes. However, importing seemed to be correct, and I could simply issue a "git reset HEAD --hard".

On the other hand, if the current git branch was not master to start with, the working tree is clean after the import.

rcls commented 8 years ago

I am guessing that you have done the import without the "--remote" command line option?

This is a bit of a gotcha, because without --remote, I update "local" branches, but make no attempt to update the working directory. Unless you are using a bare git repository (no working directory), you really want that "--remote" option.

I think I could usefully do the following: make --remote=cvs the default, and add a --bare option for the current default.

If I've guessed wrong about what is happening, then please let me know the exact command line options you gave to crap-clone.

If you have been using crap-clone without the "--remote" option, then you should be able to rerun crap-clone with the option (& then clean up any local branches you no longer want). The first time you do this, it will do a full non-incremental import, unless you rename the files under .git/crap/ to include the "remote" name.

YorkZ commented 8 years ago

Thank you very much for your quick response. I think making it default to update the working tree is a good idea.

Do you mean that if I didn't use the --remote in the initial import, next time if I add --remote in the incremental import it will start over again? If so, I wouldn't do it because the initial import takes a long time.

I simply did a git reset HEAD --hard, this should be OK right?

Thanks,

York

rcls commented 8 years ago

Closing this as I believe that we resolved the issue last year. Please reopen if there is still a problem here.