-
Notifications
You must be signed in to change notification settings - Fork 2.4k
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
Introduce git_describe_xxxx() #1066
Conversation
You can probably 🔨 all of the test-repo files except for refs, objects, and |
git_describe_opts *opts; | ||
}; | ||
|
||
int get_name (const char *refname, void *payload) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Could this be made static?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Fixed
I've cleaned the test repo as much as possible. However, I've kept the logs and the index. I may remove them when I'm completely done with this feature if I don't rely on them. |
@ben thanks for this very early feedback! 😉 |
No problem. I like where you're going with this. 🚆 |
Rebooted! |
ZOMG! Passing tests! |
GIT_DESCRIBE_DEFAULT, | ||
GIT_DESCRIBE_TAGS, | ||
GIT_DESCRIBE_ALL, | ||
} git_describe_strategy_t; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
These values could use a bit of documentation.
So far so good! I see you've still got lots of |
Built with the following script: #!/bin/sh test_tick () { sleep 10 } test_tick && echo one >file && git add file && git commit -m initial && one=$(git rev-parse HEAD) && git describe --always HEAD && test_tick && echo two >file && git add file && git commit -m second && two=$(git rev-parse HEAD) && test_tick && echo three >file && git add file && git commit -m third && test_tick && echo A >file && git add file && git commit -m A && test_tick && git tag -a -m A A && test_tick && echo c >file && git add file && git commit -m c && test_tick && git tag c && git reset --hard $two && test_tick && echo B >side && git add side && git commit -m B && test_tick && git tag -a -m B B && test_tick && git merge -m Merged c && merged=$(git rev-parse HEAD) && git reset --hard $two && test_tick && echo D >another && git add another && git commit -m D && test_tick && git tag -a -m D D && test_tick && git tag -a -m R R && test_tick && echo DD >another && git commit -a -m another && test_tick && git tag e && test_tick && echo DDD >another && git commit -a -m "yet another" && test_tick && git merge -m Merged $merged && test_tick && echo X >file && echo X >side && git add file side && git commit -m x
Hi, is there any progress since January on implementation of git describe? Thanks. |
+1 on desiring this feature fwiw |
I've started to take a look at this, hopefully there'll be something to share soon. I think that I'm going to separate the API into two distinct bits, one which searches for the matching name, and one which prints it. The current code is very much git-like in that it prints from the middle of the function which is gathering data. I'd like to see us have |
superseded by #2592 |
git_describe_objects()
git_describe_objects()
testsgit_describe_workdir()
git_describe_workdir()
testsabbreviated_size
fromgit_describe_opts
or implement it