Commit Graph

85 Commits

Author SHA1 Message Date
Edward Thomson
359fc2d241 update copyrights 2013-01-08 17:31:27 -06:00
nulltoken
cc1466264a revparse: Deploy EINVALIDSPEC usage 2012-12-01 08:34:31 +01:00
Russell Belfer
a8122b5d4a Fix warnings on Win64 build 2012-11-27 13:18:29 -08:00
Ben Straub
2508cc66eb Rename ref and reflog apis for consistency 2012-11-27 13:17:45 -08:00
Michael Schubert
0066955d97 Fix a couple of warnings 2012-11-18 04:27:49 +01:00
nulltoken
b15df1d937 reflog: make entry_byindex() and drop() git compliant
Passing 0 as the index now retrieves the most recent entry instead
of the oldest one.
2012-11-17 18:30:35 -08:00
nulltoken
5912d74c69 revparse: properly handle refnames containing a @
Fix #994
2012-10-18 23:05:33 +02:00
nulltoken
74a2400514 refs: use constants for well-known names 2012-10-07 12:04:19 +02:00
nulltoken
77e06d7e85 refs: introduce git_reference_is_valid_name() 2012-09-25 07:49:15 +02:00
Russell Belfer
f335ecd6e1 Diff iterators
This refactors the diff output code so that an iterator object
can be used to traverse and generate the diffs, instead of just
the `foreach()` style with callbacks.  The code has been rearranged
so that the two styles can still share most functions.

This also replaces `GIT_REVWALKOVER` with `GIT_ITEROVER` and uses
that as a common error code for marking the end of iteration when
using a iterator style of object.
2012-09-05 15:17:24 -07:00
Vicent Marti
e25dda51c4 Merge remote-tracking branch 'nulltoken/topic/amd64-compat' into development
Conflicts:
	src/netops.c
	src/netops.h
	src/oid.c
2012-08-02 01:38:30 +02:00
nulltoken
b8457baae2 portability: Improve x86/amd64 compatibility 2012-07-24 16:10:12 +02:00
nulltoken
fb910281d6 branch: introduce git_branch_tracking() 2012-07-24 16:09:48 +02:00
Carlos Martín Nieto
7e48635d16 revparse: initialize 'parsed' in case the user doesn't give a number with the @-notation 2012-07-23 21:56:06 +02:00
Carlos Martín Nieto
279b45b05b revparse: don't allow an empty string
Asking the library for "" used to give HEAD, but that's trying to
impose a default at the wrong layer. Make it fail.
2012-07-23 21:32:45 +02:00
nulltoken
e2c81fca8f revparse: deploy git_object_peel() 2012-07-17 20:32:41 +02:00
nulltoken
b8748c1217 revparse: enhance parsing engine 2012-07-17 20:32:39 +02:00
nulltoken
b5f9011524 revparse: fix propagation of error 2012-07-12 22:33:48 +02:00
nulltoken
5a6f31f28b revparse: only allow decimal specifiers in carete and tilde synatx
passing 0 to git_strol(32|64) let the implementation guess if it's
    dealing with an octal number or a decimal one.

    Let's make it safe and ensure that both 'HEAD@{010}' and 'HEAD@{10}'
    point at the same commit.
2012-07-12 22:30:02 +02:00
nulltoken
d1b7921a48 revparse: fix disambiguation of refs and abbrev oids 2012-07-12 22:30:00 +02:00
nulltoken
bb89cf9478 revparse: simplify handling of the colon syntax 2012-07-12 22:29:58 +02:00
nulltoken
12595ab8f9 revparse: deploy git_reference_remote_tracking_from_branch() 2012-07-12 01:06:13 +02:00
nulltoken
2d012c0c72 revparse: deploy git_commit_nth_gen_ancestor() 2012-07-12 01:06:12 +02:00
nulltoken
8f17ed801f revparse: simplify the parsing of described object 2012-07-12 01:06:10 +02:00
nulltoken
3e82d6c6f0 revparse: unfound reference return ENOTFOUND 2012-07-07 12:16:15 +02:00
nulltoken
b8460c2015 revparse: do not segfault when retrieving the last entry 2012-07-07 12:16:14 +02:00
nulltoken
e727938112 revparse: fix disambiguation of refs 2012-07-07 12:16:13 +02:00
nulltoken
805c81594d revparse: unfound previous head return ENOTFOUND 2012-07-07 12:16:12 +02:00
nulltoken
6a5136e538 revparse: only allow decimal reflog ordinal specs
passing 0 to git_strol(32|64) let the implementation guess if it's
dealing with an octal number or a decimal one.

Let's make it safe and ensure that both 'HEAD@{010}' and 'HEAD@{10}'
point at the same commit.
2012-07-07 12:16:10 +02:00
nulltoken
29f72aa638 revparse: leverage git__isdigit() 2012-07-07 12:16:09 +02:00
nulltoken
cab65c2b23 revparse: detect incorrect "refname@{-n}" syntax 2012-07-07 12:16:08 +02:00
nulltoken
494ae940a0 revparse: fix parsing of date specifiers 2012-07-02 19:56:41 +02:00
nulltoken
52b938d55a revparse: unfound reflog entry returns ENOTFOUND 2012-06-29 17:23:18 +02:00
nulltoken
08ac23a5fd revparse: unfound reflog ref returns ENOTFOUND 2012-06-29 17:23:10 +02:00
nulltoken
4de89ce72a revparse: unfound partially-named ref returns ENOTFOUND 2012-06-29 17:22:43 +02:00
nulltoken
0e7af9e758 revparse: unfound nth parent returns ENOTFOUND 2012-06-28 19:12:42 +02:00
nulltoken
0d23c62c48 revparse: handle specs with caret and colon 2012-06-28 19:12:41 +02:00
nulltoken
5b68ba7e15 revparse: unfound treepath returns ENOTFOUND 2012-06-28 19:12:40 +02:00
nulltoken
faaa7c517c revparse: return trees through the "colon" syntax 2012-06-28 19:12:40 +02:00
nulltoken
e28dd29b6e revparse: replace spaces with tabs 2012-06-28 19:12:39 +02:00
Ben Straub
a15e7f8621 Fix indentation. 2012-06-19 21:12:04 -07:00
Ben Straub
eb6bc45f6d Avoid uninitialized variable error. 2012-06-19 21:11:48 -07:00
Carlos Martín Nieto
cdca82c784 Plug a few leaks 2012-06-20 00:46:34 +02:00
Carlos Martín Nieto
053b509668 revparse: handle a non-existent path in the colon syntax
oid_for_tree_path may not always find the path in the tree, in which
case we need to return an error. The current code doesn't do this and
results in undefined behavior.
2012-06-19 23:47:17 +02:00
Ben Straub
2c90145aad Fix potential segfault in revparse. 2012-06-19 09:25:55 -07:00
Vicent Marti
8c4c357f18 clar: Fix warnings 2012-06-19 02:43:36 +02:00
Michael Schubert
c073459371 revparse: remove unnecessary GIT_BEGIN_DECL 2012-06-12 11:34:01 +02:00
Vicent Martí
3f0358604e misc: Fix warnings from PVS Studio trial 2012-06-07 22:43:48 +02:00
Ben Straub
763b838152 Fixing rev-parse-induced Travis errors. 2012-06-07 13:22:50 -07:00
Ben Straub
327dc61f13 Prefer git__free (again). 2012-06-07 12:28:08 -07:00