Skip to content

Fix git clone & update helper scripts#993

Merged
aashish24 merged 3 commits intomasterfrom
fix-git-update
Feb 2, 2015
Merged

Fix git clone & update helper scripts#993
aashish24 merged 3 commits intomasterfrom
fix-git-update

Conversation

@remram44
Copy link
Copy Markdown
Contributor

Creating local branches is a bit weird, and moving them is definitely not a good idea.

This places Git in "detached head" mode without creating or changing local branches. Remember that BRANCH might very well be a tag name.

@remram44 remram44 added the Build label Jan 29, 2015
@remram44 remram44 force-pushed the fix-git-update branch 2 times, most recently from 1ddc15d to 833e806 Compare January 29, 2015 16:11
Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

Note that the local branch refs/heads/@BRANCH@ will still be created with upstream information (but not checked out); this is because of clone -b.

@aashish24
Copy link
Copy Markdown
Contributor

So the logic is:

  1. if tag then create the branch?
  2. if not create the headless branch?

@remram44
Copy link
Copy Markdown
Contributor Author

remram44 commented Feb 1, 2015

  1. If tag then no branch is created. Goes to detached head, like it already does, except that the update script will work too.
  2. If branchname then a local branch is created by "git clone". I guess I could just run branch -D to get rid of it. Goes to detached head, the update script will work (and won't create local branches).

@aashish24
Copy link
Copy Markdown
Contributor

Right..
For the 1) I was misled by my prompt that I have a branch checked out. In both cases it will be detached head.

@aashish24
Copy link
Copy Markdown
Contributor

LGTM 👍

aashish24 added a commit that referenced this pull request Feb 2, 2015
Fix git clone & update helper scripts
@aashish24 aashish24 merged commit de61b65 into master Feb 2, 2015
@aashish24 aashish24 deleted the fix-git-update branch February 2, 2015 14:12
@remram44
Copy link
Copy Markdown
Contributor Author

remram44 commented Jun 8, 2015

Interesting detail: this will fail if someone was to make a lightweight (old-style) tag instead of the new, preferred annotated tags (git tag -a). Apparently came up today with VisTrails' tag for uvcdat-2.2.0.

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.

2 participants