Comments (5)
A reference points to a commit (or another reference).
It can't be a commit. getReference()
returns references, not commits.
There are two types of references:
- Tags are meant to not change. They're found under
refs/tags
- Branches are meant to always point to the latest commit. They're found under
refs/heads
.
There's also a special reference HEAD
, that points to what you last checked out.
If you're working on branch master
, HEAD
will point to refs/heads/master
, which will point to some commit.
So the title of the issue should be: Distinguish between tags and branches.
You found another bug: resolve()
fails on a tag.
from node-gitteh.
Duly noted and updated. :-)
from node-gitteh.
@balor, just by curiosity, can you post the error when you call resolve()
?
Also, are you installing by NPM or cloning the source?
from node-gitteh.
@jmendeth: here's a gist that will reproduce the issue: https://gist.github.com/6725caa86c012c4c6d64
from node-gitteh.
@blalor While probably not helpful to you now, I'll note that gitteh 0.17.x
is a refactor and approaches refs a bit differently.
gitteh.Reference
s don't actually have a resolve()
method in their latest incarnation (this can manually be achieved right now by recursively resolving the reference target
until direct
is true
), however they will eventually. The difference now is when you use gitteh.object
to resolve the reference target
to a gitteh Object, there is a property called type
that will determine whether you're looking at a commit, or a heavyweight Tag object.
from node-gitteh.
Related Issues (20)
- Warnings given when building gitteh HOT 1
- Is a callback required for 0.17.1? HOT 3
- Update documentation HOT 6
- The commit walker doesn't exist anymore HOT 3
- Nodenv error HOT 5
- use .gyp files to build extensions HOT 2
- Cannot read property 'bytes' of undefined HOT 2
- Synchronous openRepository Fails HOT 8
- { [Error: This transport isn't implemented. Sorry] code: 11 } HOT 4
- How is lib/gitteh.js generated? HOT 9
- File size or timestamp of blob? HOT 13
- Gitteh needs a primary maintainer! HOT 61
- How to generate the documentation? HOT 4
- Dependency issues HOT 1
- How can I stage lines and hunks? HOT 1
- basic clone crash on 10.7.2 HOT 2
- Implementing the push method on Remote object
- [email protected] install failed HOT 4
- can't use gitteh.clone method? HOT 1
- State of this repo HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from node-gitteh.