Ben Straub
31dda64716
Rename internal function.
2012-06-07 12:16:39 -07:00
Ben Straub
1a728066c3
Remove 'git__' prefix from a static function.
2012-06-06 13:04:08 -07:00
Ben Straub
d6391a626f
Rev-parse: stop referencing freed memory.
...
Converted an internal utility to return an oid,
rather than a tree entry (whose lifetime is tied
to the parent tree, which was freed before
returning).
2012-06-06 13:00:12 -07:00
Ben Straub
19d35d528c
Prefer git__free() to free().
2012-06-06 12:31:48 -07:00
Ben Straub
8a385c0482
Move git__date_parse declaration to util.h.
2012-06-06 12:25:22 -07:00
Ben Straub
2c2cde47b8
Fix signatures for tree calls.
2012-06-06 08:41:39 -07:00
Ben Straub
734efe4b8e
Rev-parse: implement ":/foo" syntax.
2012-06-01 14:18:52 -07:00
Ben Straub
b183a92fc2
Rev-parse: Plug memory leaks.
2012-05-31 13:42:58 -07:00
Ben Straub
244d2f6b80
Rev-parse: add "tag:README" syntax.
2012-05-30 16:52:11 -07:00
Ben Straub
dd9e4abc1b
Approxidate: use libgit2 naming/calling conventions.
...
Also use git_time_t (64-bit integer) for time
values, although the 2038 problem is still present
on 32-bit machines.
2012-05-30 11:46:42 -07:00
Ben Straub
1ce4cc0164
Fix date.c build in msvc.
...
Ported the win32 implementations of gmtime_r,
localtime_r, and gettimeofday to be part of the
posix compatibility layer, and fixed
git_signature_now to use them.
2012-05-15 15:41:05 -07:00
Ben Straub
72b86bae50
Rev-parse: better error handling for chaining.
...
Fixed an error where "nonexistant^N" or similar
would fall into an assert. This now properly returns
an error.
2012-05-11 11:58:02 -07:00
Ben Straub
94952ded3a
Rev-parse: proper error checking.
2012-05-11 11:35:50 -07:00
Ben Straub
7e79d389a4
Rev-parse: regex check for "git describe" output.
2012-05-11 11:35:50 -07:00
Ben Straub
b41384b473
Plugging memory leak.
2012-05-11 11:35:50 -07:00
Ben Straub
c8a33547a0
Rev-parse: now capturing and reporting regex errors.
2012-05-11 11:35:50 -07:00
Ben Straub
2b35c45f1b
Rev-parse: now @{-N} syntax searches in the right direction!
2012-05-11 11:35:50 -07:00
Ben Straub
46c2ead05d
Now properly handling branches with "-g" in their names.
2012-05-11 11:35:50 -07:00
Ben Straub
ec6a632a1b
Simplifying revparse_lookup_fully_qualified_ref.
2012-05-11 11:35:50 -07:00
Ben Straub
a346992f7e
Rev-parse: @{time} syntax.
...
Ported date.c (for approxidate_careful) from git.git
revision aa39b85. Trimmed out the parts we're not
using.
2012-05-11 11:35:50 -07:00
Ben Straub
886f183ac3
Rev-parse: "ref^{/regex}" syntax.
2012-05-11 11:31:30 -07:00
Ben Straub
bae780e084
Rev-parse: fixing double-freeing. Thanks, Visual Studio!
2012-05-11 11:31:30 -07:00
Ben Straub
a6346302e6
Rev-parse: "ref@{upstream}" syntax.
...
Added tracking configuration to the test repo's
config to support unit tests.
2012-05-11 11:30:47 -07:00
Ben Straub
65bc26d54a
Fixed last 2 memory leaks in rev-parse.
2012-05-11 11:30:46 -07:00
Ben Straub
27ee848397
Rev-parse: plugging (most) memory leaks.
2012-05-11 11:30:46 -07:00
Ben Straub
e88b8bd593
Incorporating feedback from @tanoku.
...
Removed repeated strlen's, and unnecessary loop-termination variable.
2012-05-11 11:30:46 -07:00
Ben Straub
a51bdbcfa1
Implementing rev-parse's ref@{n} and @{-n} syntaxes.
...
Added some reflags to the test repo to support
unit tests.
2012-05-11 11:30:46 -07:00
Ben Straub
38533d5acf
Implementing rev-parse's "ref~2" syntax.
...
Also extended the test suite to include chaining
operators, e.g. "master^2~3^4".
2012-05-11 11:30:46 -07:00
Ben Straub
e0887d8178
Removed goto from state machine loop.
2012-05-11 11:30:46 -07:00
Ben Straub
7149a6252c
Returning error if dereferencing operation fails.
2012-05-11 11:30:46 -07:00
Ben Straub
387d01b857
Implemented rev-parse "^{type}" syntax.
2012-05-11 11:30:45 -07:00
Ben Straub
9d7bdf7119
Implemented rev-parse's "^{}" syntax.
2012-05-11 11:30:45 -07:00
Ben Straub
f597ea8978
Implemented partial caret syntax for rev-parse.
...
Supported forms:
- "^n"
- "^0"
- "^"
Still missing: all of the "^{…}" variants.
2012-05-11 11:30:45 -07:00
Ben Straub
023c6f69ed
Simpler states and initial structure.
...
New tests for "foo^2" syntax, but they don't pass
yet. Support for chaining these, i.e.
"foo^2~3^{u}~1' is starting to shape up.
2012-05-11 11:30:45 -07:00
Ben Straub
ac250c56c7
First stab at implementation of rev-parse.
...
This version supports refspecs of these kinds:
- Full & partial SHAs
- Output from "git describe"
- "/refs/heads/master" (full ref names)
- "master" (partial ref names)
- "FETCH_HEAD" (named heads)
2012-05-11 11:30:45 -07:00