Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

Already on GitHub? Sign in to your account

TAGged darcs repo before initial commit leads to fatal #10

Closed
amcphail opened this Issue Jan 9, 2012 · 3 comments

Comments

Projects
None yet
2 participants

amcphail commented Jan 9, 2012

I have a darcs repo that was tagged before any files were committed.

When I run darcs-to-git it fails on the first patch:

Importing patch 1 of 18:

================================================================================
PATCH : TAG 0.2.0.5
DATE  : 2010-07-05 02:03:49 +1200
AUTHOR: Vivian McPhail <YOURADDRESS> => Vivian McPhail <YOURADDRESS>
--------------------------------------------------------------------------------
You don't want to pull any patches, and that's fine with me!

fatal: Failed to resolve 'HEAD' as a valid ref.
../purcell-darcs-to-git-2ed49a9/darcs-to-git:153:in `run': Failed to run: ["git", "tag", "-a", "-f", "-m", "TAG 0.2.0.5\n\ndarcs-hash:20100704140349-af16d-46ee0763d020eccea99f5859b6912f4ecda78159.gz", "0.2.0.5"] (RuntimeError)
    from ../purcell-darcs-to-git-2ed49a9/darcs-to-git:365:in `commit_to_git_repo'
    from ../purcell-darcs-to-git-2ed49a9/darcs-to-git:333:in `pull_and_apply'
    from ../purcell-darcs-to-git-2ed49a9/darcs-to-git:553
    from ../purcell-darcs-to-git-2ed49a9/darcs-to-git:288:in `each_with_index'
    from ../purcell-darcs-to-git-2ed49a9/darcs-to-git:551:in `each'
    from ../purcell-darcs-to-git-2ed49a9/darcs-to-git:551:in `each_with_index'
    from ../purcell-darcs-to-git-2ed49a9/darcs-to-git:551
Owner

purcell commented Jan 9, 2012

Interesting. This is tricky to handle. There's no way to tag an empty repo in git, so ignoring the tag is the option I've chosen.

@purcell purcell closed this Jan 9, 2012

Would it be possible to check for this condition and apply the TAG patch
after the following patch?

On 10 January 2012 05:40, Steve Purcell <
reply@reply.github.com

wrote:

Interesting. This is tricky to handle. There's no way to tag an empty repo
in git, so ignoring the tag is the option I've chosen.


Reply to this email directly or view it on GitHub:
#10 (comment)


yolar et elver.

DISCLAIMER

This transmission contains information that may be confidential. It is
intended for the named addressee only. Unless you are the named addressee
you may not copy or use it or disclose it to anyone else.

Owner

purcell commented Jan 10, 2012

I'm not sure I agree that that would be desirable, because the same tag would then represent different content in the darcs and git repositories.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment