Skip to content
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
Merged

Conversation

remram44
Copy link
Contributor

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(?)

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@"
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Will do

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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
Copy link
Contributor

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
Fix tag detection for git clone/update scripts
@aashish24 aashish24 merged commit 36152a9 into master Jun 26, 2015
@aashish24 aashish24 deleted the fix-git-tags branch June 26, 2015 13:00
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants