New issue

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

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix tag detection for git clone/update scripts #1404

Merged
merged 1 commit into from Jun 26, 2015

Conversation

Projects
None yet
2 participants
@remram44
Contributor

remram44 commented Jun 22, 2015

Amends #993

Checking that the object type is "tag" only works for annotated tags. If case someone decides to make a lightweight tag (or does it by mistake), it will now correctly be handled.

Interestingly, this only seems to be used by 'vistrails', so I don't think it will fix build warnings like:

[INFO] [PIP] Installing UVCMETRICS from GIT_REPOSITORY;git://github.com/UV-CDAT/uvcmetrics.git
fatal: ambiguous argument 'origin/uvcdat-2.2.0': unknown revision or path not in the working tree.
Use '--' to separate paths from revisions, like this:
'git <command> [<revision>...] -- [<file>...]'

which I think just leak through from ExternalProject but are not actual errors(?)

Fix tag detection for git clone/update scripts
Checking that the object type is "tag" only works for annotated tags. If
case someone decides to make a lightweight tag (or does it by mistake),
it will now correctly be handled.

@remram44 remram44 added the Build label Jun 22, 2015

@@ -3,7 +3,7 @@
cd "@CMAKE_INSTALL_PREFIX@"
"@GIT_EXECUTABLE@" clone --no-checkout --depth 1 -b @BRANCH@ @GIT_URL@ "@GIT_TARGET@"

This comment has been minimized.

@aashish24

aashish24 Jun 23, 2015

Contributor

I thought the problem would be here with -b option since that would not respect light weight tags.

This comment has been minimized.

@remram44

remram44 Jun 23, 2015

Contributor

-b works with lightweight tags as far as I can tell

This comment has been minimized.

@aashish24

aashish24 Jun 24, 2015

Contributor

On certain git versions it does not (you should see reporting on this if you do a google search). I would suggest, we take out the -b option, and just checkout the right branch / tag afterwards.

This comment has been minimized.

@remram44

remram44 Jun 24, 2015

Contributor

Will do

This comment has been minimized.

@remram44

remram44 Jun 24, 2015

Contributor

It looks like --depth cannot be used if we get rid of -b, else git only gets HEAD and the ref we need might not be fetched at all.

@aashish24

This comment has been minimized.

Contributor

aashish24 commented Jun 26, 2015

In that case, merging this one. We will deal with this issue later then.

aashish24 added a commit that referenced this pull request Jun 26, 2015

Merge pull request #1404 from UV-CDAT/fix-git-tags
Fix tag detection for git clone/update scripts

@aashish24 aashish24 merged commit 36152a9 into master Jun 26, 2015

4 checks passed

continuous-integration/kitware-buildbot/uvcdat-garant-linux-release/ Build done.
Details
continuous-integration/kitware-buildbot/uvcdat-test-laptop-linux-release/ Build done.
Details
continuous-integration/travis-ci/pr The Travis CI build passed
Details
continuous-integration/travis-ci/push The Travis CI build passed
Details

@aashish24 aashish24 deleted the fix-git-tags branch Jun 26, 2015

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