Ben Straub
92ad5a5cda
Rebasing onto libgit2/development: cleanup.
2012-05-11 11:55:20 -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
d13c1a8b60
Fixing broken tests.
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
5748fdee52
Rev-parse chaining: adding the longest chain
...
in the test repo.
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
bfc13e7985
Adding comment documentation for rev-parse api.
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
Carlos Martín Nieto
fb49bdf9c7
examples: update network examples error handling
...
Use giterr_last() and make sure it's not NULL.
2012-05-10 16:52:12 +02:00
Vicent Martí
a9d9965b35
clar: Update from upstream
2012-05-09 22:55:01 +02:00
Vicent Martí
4374f1871f
Merge pull request #678 from nulltoken/fix/msvc-weird-error
...
Fix MSVC compilation issue
2012-05-09 12:34:13 -07:00
nulltoken
1956693fa0
Fix MSVC compilation issue
...
exp() is already defined in math.h. This leads to LMSVC complaining
..\..\libgit2\tests-clar\diff\blob.c(5): error C2365: 'exp' : redefinition; previous definition was 'function'
Renaming the variable fixes this issue.
2012-05-09 21:14:49 +02:00
Russell Belfer
2aa1e94d30
Fix 64-bit build warning
2012-05-09 10:30:34 -07:00
Russell Belfer
075d6e7dd7
Merge pull request #679 from nulltoken/fix/git__isspace
...
util: Fix git__isspace() implementation
2012-05-09 10:18:54 -07:00
Michael Schubert
b470019f7f
tests-clar/diff: fix missing-prototype warning
2012-05-09 18:02:13 +02:00
Carlos Martín Nieto
11678b3718
fetch: filter tag annotation pseudo-refs while generating wants
...
These objects aren't considered as being advertised, so asking for
them will cause the remote end to close the connection. This makes the
checking in update_tips() unnecessary, because they don't get inserted
in the list.
2012-05-09 16:18:13 +02:00
Carlos Martín Nieto
0536afcaa9
remote: don't try to create tag annotations as refs/tags/v0.1.0^{}
...
Skip them for now. Eventually we might want to filter these out
earler.
2012-05-09 14:10:30 +02:00
nulltoken
9cd25d0003
util: Fix git__isspace() implementation
...
The characters <space>, <form-feed>, <newline>, <carriage-return>, <tab>, and <vertical-tab> are part of the "space" definition.
cf. http://www.kernel.org/doc/man-pages/online/pages/man5/locale.5.html
2012-05-09 13:21:21 +02:00
Carlos Martín Nieto
a640d79e84
indexer: close the pack's fd before renaming it
...
Windows gets upset if we rename a file with an open descriptor.
2012-05-09 13:11:50 +02:00
Vicent Martí
0f49200c9a
msvc: Do not use isspace
...
Locale-aware bullshit bitting my ass again yo
2012-05-09 04:37:02 +02:00
Vicent Martí
e65752bb32
Merge pull request #677 from arrbee/status-without-head
...
Add support for diffing index with no HEAD
2012-05-08 16:06:27 -07:00
Russell Belfer
7e000ab2ec
Add support for diffing index with no HEAD
...
When a repo is first created, there is no HEAD yet and attempting
to diff files in the index was showing nothing because a tree
iterator could not be constructed. This adds an "empty" iterator
and falls back on that when the head cannot be looked up.
2012-05-08 15:03:59 -07:00
Vicent Martí
fd5faae346
message: Cleanup
2012-05-08 23:55:37 +02:00
Vicent Martí
b1e2ba275a
message: Proper OOM handling
2012-05-08 23:43:52 +02:00
Vicent Martí
c99bdacf71
Merge pull request #670 from nulltoken/ntk/topic/clean-commit_message
...
Clean commit and tag messages
2012-05-08 14:13:43 -07:00
Russell Belfer
364f51bdca
Merge pull request #668 from nulltoken/topic/binary-blobs
...
Enhancing the blob diffing experience
2012-05-08 13:56:21 -07:00
Vicent Martí
1f796cd180
Merge pull request #676 from carlosmn/remotes
...
Add git_remote_add() and change signature for _new()
2012-05-08 13:42:11 -07:00
Russell Belfer
19579847f6
Clean up warnings and tests
2012-05-08 13:23:00 -07:00
Carlos Martín Nieto
baaa8a447e
remotes: change git_remote_new's signature
...
Add a fetch refspec arguemnt and make the arguments (name, url,
refspec), as that order makes more sense.
2012-05-08 21:36:40 +02:00
Carlos Martín Nieto
a209a025c6
remote: add git_remote_add()
...
Helper function to create a remote with the default settings
2012-05-08 21:36:40 +02:00
Carlos Martín Nieto
3df9cc5922
config: don't use freed memory on error
...
Change the order and set a NULL so we don't try to access freed memory
in case of an error.
2012-05-08 21:35:51 +02:00