Coder Social home page Coder Social logo

git: You are not currently on a branch about gpm HOT 3 OPEN

pote avatar pote commented on June 9, 2024 1
git: You are not currently on a branch

from gpm.

Comments (3)

xh3b4sd avatar xh3b4sd commented on June 9, 2024 1

Thanks for coming back. I think it is a good idea to checkout the default branch, do the go get magic, and checkout the desired revision. I am not a massive fan of storing information about the default branch. Git for instance does that somehow. See http://stackoverflow.com/questions/18726037/what-determines-default-branch-after-git-clone. Not sure about svn, mercurial etc..

from gpm.

pote avatar pote commented on June 9, 2024

That's weird! Definitely not intended.

Interesting: I just tested it on my local environment with gpm 1.4.0 and the same Godeps file as you, on first run I had no warnings, and on second run I have the same warning you are getting.

sample

Behind the scenes gpm uses go get, coupled with the -u flag to fetch any updates that have been pushed to the repository between last time you updated it and now. When the dependency is in a detached head state we get warnings from git.

This isn't necessarily a problem: as long as the following line is present it means the commit you requested is in the local history and has been set.

>> Setting github.com/alicebob/miniredis to version bb985e34f0942b1d770bf96e87f830cf38804abe

Although... I do agree its ugly. 😅

Would it be worthwhile to add code to solve this warning? I'll think of a way around it, off the top of my head I can think about storing the default branch and checking it out before the update, or simply suggest deleting the directory and fetching it again. I could also simply delete it automatically, but I'm not big on deleting things without explicit user conscent.

What do you think?

from gpm.

myusuf3 avatar myusuf3 commented on June 9, 2024

Let's not go the delete route. What @xh3b4sd suggested in his last comment looks good.

from gpm.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.