Vicent Marti
ab7941b5d9
test: Properly show error messages
2011-06-28 21:10:51 +02:00
Vicent Marti
c682886e8e
repo: Rename HEAD-related methods
2011-06-28 21:10:44 +02:00
Vicent Marti
e053c911cf
commit: Allow spaces inside email addresses
...
Core Git doesn't care when people use spaces in the email address, even
though this kind of foolery receives the capital punishment in several
states of the USA.
We must obey.
2011-06-28 19:52:41 +02:00
Vicent Martí
ccd59372d4
Merge pull request #279 from carlosmn/detached-orphan
...
Add detached and orphan convenience functions
2011-06-28 10:44:19 -07:00
Vicent Marti
9525e47df9
refs: Remove unused declarations
2011-06-28 19:43:36 +02:00
Vicent Martí
2fb520f19a
Merge pull request #277 from schu/sign-compare
...
Fix warning: signed and unsigned type in cond expr
2011-06-28 10:39:07 -07:00
Vicent Marti
d5afc0390c
Remove redundant methods from the API
...
A bunch of redundant methods have been removed from the external API.
- All the reference/tag creation methods with `_f` are gone. The force
flag is now passed as an argument to the normal create methods.
- All the different commit creation methods are gone; commit creation
now always requires a `git_commit` pointer for parents and a `git_tree`
pointer for tree, to ensure that corrupted commits cannot be generated.
- All the different tag creation methods are gone; tag creation now
always requires a `git_object` pointer to ensure that tags are not
created to inexisting objects.
2011-06-28 19:36:27 +02:00
Carlos Martín Nieto
35502d2ec4
Add git_repository_is_detached, git_repository_is_orphan
...
Signed-off-by: Carlos Martín Nieto <cmn@elego.de>
2011-06-28 16:59:51 +02:00
schu
7b608b3b96
git_blob_create_fromfile: remove old code
...
Remove call of gitfo_size, since we call gitfo_lstat anyway; remove some
old workaround code for gitfo_read, which is obsolete now.
Signed-off-by: schu <schu-github@schulog.org>
2011-06-27 12:37:46 +02:00
Vicent Marti
ce90d81f6f
revwalk: Do not set error string on revwalk over
2011-06-24 15:30:10 +02:00
Vicent Marti
3101a3e5b8
refs: Do not overflow when normalizing refnames
2011-06-23 02:29:11 +02:00
Vicent Martí
3bf3ad9f03
Merge pull request #269 from schu/infinite-append
...
gitfo_read: fix read-loop
2011-06-21 13:53:48 -07:00
Carlos Martín Nieto
4cea2f0369
Stat files with full pathnames
...
Call gitfo_lstat with the full pathname instead of the relative one,
which fails in case the current working directory is different from
the workdir.
Signed-off-by: Carlos Martín Nieto <cmn@elego.de>
2011-06-20 17:53:21 +02:00
Carlos Martín Nieto
cdb6f9bf5e
Allocate enough memory for the terminator in commit parsing
...
Also allow space for the null-terminator when allocating the buffer in
packfile_unpack_compressed. Up to now, the last newline had served as
a terminator, but 858ef372 searches for a double-newline and exposes
the problem.
Signed-off-by: Carlos Martín Nieto <cmn@elego.de>
2011-06-20 17:34:01 +02:00
schu
28f7869dee
gitfo_read: fix read-loop
...
Signed-off-by: schu <schu-github@schulog.org>
2011-06-20 17:28:59 +02:00
Vicent Marti
984ed6b6be
odb: Add GIT_EPASSTHROUGH
...
Allows a custom user backend to passthrough one of the callbacks. Used
for e.g. caching backends.
2011-06-19 12:50:45 +02:00
Vicent Marti
e35e9fb4c3
mingw: Fix compilation
2011-06-18 13:23:19 +02:00
Vicent Marti
2a406ab51c
config: Fix sorting of repository config files
2011-06-18 02:08:56 +02:00
Vicent Marti
19cb6857a4
config: Bring back git_config_open_global
...
Scott commands, I obey.
2011-06-18 01:50:48 +02:00
Vicent Marti
dbe70bd5c3
config: Fix compilation in MSVC
2011-06-18 01:12:58 +02:00
Vicent Marti
4007044553
config: Typorrrrl
2011-06-18 00:55:03 +02:00
Vicent Martí
deee4766a8
Merge pull request #267 from Jopie64/development
...
Fix compilation error in MSVC when compiling for c++
2011-06-17 15:44:26 -07:00
Vicent Marti
07ff881750
config: Cleanup external API
...
Do not mess with environment variables anymore. The new external API has
more helper methods, and everything is explicit.
2011-06-18 00:39:39 +02:00
Johan 't Hart
f061988667
Fix compilation error in MSVC when compiling for c++
2011-06-17 23:58:34 +02:00
Carlos Martín Nieto
f3dad3acd7
Add fall-back support to the configuration
...
If a config has several files, we need to check all of them before we
can say that a variable doesn't exist.
Signed-off-by: Carlos Martín Nieto <cmn@elego.de>
2011-06-17 22:30:30 +02:00
Carlos Martín Nieto
9ba9e513bc
Parse the repo's configuration when we load it
...
It's not enough to load the config, we also need to explicitely parse
it after we create it.
Signed-off-by: Carlos Martín Nieto <cmn@elego.de>
2011-06-17 22:30:29 +02:00
Carlos Martín Nieto
b22d147986
Add git_repository_config API
...
This function puts the global and repository configurations in one
git_config object and gives it to the user.
Signed-off-by: Carlos Martín Nieto <cmn@elego.de>
2011-06-17 22:30:29 +02:00
Carlos Martín Nieto
b76934de6c
Remove double-space
...
Noticed by txdv
Signed-off-by: Carlos Martín Nieto <cmn@elego.de>
2011-06-17 22:30:29 +02:00
Vicent Marti
c716b1878e
config: Fix unitialized variable warning
2011-06-17 19:47:58 +02:00
Vicent Martí
2414d000a1
Merge pull request #266 from carlosmn/valgrind
...
Plug memory leaks
2011-06-17 10:32:22 -07:00
Vicent Marti
02285482f1
fileops: Cast the GetProcAddress value
2011-06-17 19:19:30 +02:00
Vicent Marti
9c11bd0a06
fileops: Fix 'GetFinalPathNameByHandleA' in old platforms
2011-06-17 19:09:18 +02:00
Carlos Martín Nieto
b2e361cc5e
Plug two leaks in config writing
...
Signed-off-by: Carlos Martín Nieto <cmn@elego.de>
2011-06-16 20:22:05 +02:00
Carlos Martín Nieto
e7e0e20fc5
Simplify loose ref writing
...
There is no need to store the format outselves, as the library
provides git_filebuf_printf which takes care of the formatting itself.
Also get rid of an use of strcat + strcpy which is always a nice
thing.
Signed-off-by: Carlos Martín Nieto <cmn@elego.de>
2011-06-16 16:39:20 +02:00
Vicent Marti
f1d018513a
oid: Uniformize ncmp methods
...
Drop redundant methods. The ncmp method is now public
2011-06-16 02:50:08 +02:00
Vicent Marti
fa48608ec3
oid: Rename methods
...
Yeah. Finally. Fuck the old names, this ain't POSIX
and they don't make any sense at all.
2011-06-16 02:36:21 +02:00
Vicent Marti
43521d0688
refs: Rename git_referece_listcb to _foreach
...
Same name as `git_config_foreach`
2011-06-16 02:27:43 +02:00
Vicent Martí
607d164380
Merge pull request #248 from carlosmn/config
...
Implement config writing
2011-06-15 17:24:04 -07:00
Vicent Marti
536955f9d7
Add method to get the compiled version of the lib
2011-06-16 02:21:33 +02:00
Vicent Martí
ef9a6f4cbc
Merge pull request #261 from Romain-Geissler/discovery-path-v2
...
Fix: GIT_PATH_PATH_SEPARATOR is now a semi-colon under Windows.
2011-06-15 13:47:41 -07:00
Romain Geissler
0657e46dee
Fix: GIT_PATH_PATH_SEPARATOR is now a semi-colon under Windows.
...
GIT_PATH_LIST_SEPARATOR and GIT_PATH_MAX are made public so
that it's can be used by a client.
2011-06-15 22:11:18 +02:00
Vicent Martí
f2bb894e64
Merge pull request #251 from nulltoken/fix/msvc-warnings
...
Fix compilation warnings in MSVC
2011-06-15 12:15:11 -07:00
Vicent Martí
1aa1b09e73
Merge pull request #260 from nulltoken/fix/git_index_add
...
Fix git_index_add()
2011-06-15 12:11:59 -07:00
nulltoken
a64bf21bbb
blob: Fix git_blob_create_fromfile()
2011-06-15 21:10:10 +02:00
nulltoken
63fadf99dc
Add mode_t definition in MSVC compat layer
2011-06-15 19:45:33 +02:00
Scott Chacon
737406b7ab
fix gid_ misspelling
2011-06-14 09:31:19 -07:00
Vicent Marti
b023321669
Remove custom backends
...
All the custom backend code will be moved to a separate project,
together with the new MySQL backend.
2011-06-14 17:40:17 +02:00
Carlos Martín Nieto
2e18e29b57
Remove uneeded arpa/inet.h include
...
This header isn't needed at all and it shows a lot of warnings on
OpenBSD.
Signed-off-by: Carlos Martín Nieto <cmn@elego.de>
2011-06-14 17:03:25 +02:00
Carlos Martín Nieto
711b1096f3
Indent config variables with tags
...
Confg variables are indended using tags and not four spaces as was
being done by the code.
Signed-off-by: Carlos Martín Nieto <cmn@elego.de>
2011-06-14 13:09:40 +02:00
nulltoken
9e3aa94764
Fix compilation warnings in MSVC
2011-06-12 07:37:50 +02:00