|
711b1096
|
2011-06-14T13:08:30
|
|
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>
|
|
8bb198e6
|
2011-05-17T16:39:09
|
|
config: implement config writing
After each variable gets set, we store it in our list (not completely
in the right position, but the close enough). Then we write out the
new config file in the same way that git.git does it (keep the rest of
the file intact and insert or replace the variable in its line).
Overwriting variables and adding new ones is supported (even on new
sections), though deleting isn't yet.
Signed-off-by: Carlos Martín Nieto <cmn@elego.de>
|
|
3b3577c7
|
2011-06-07T23:32:14
|
|
config: store new variables with the internal representation of the section
The section name should be stored in its case-sensitive variant when
we are adding a new variable. Use the internalize_section function to
do just that.
Signed-off-by: Carlos Martín Nieto <cmn@elego.de>
|
|
5ab50417
|
2011-06-07T22:49:13
|
|
Remove an unfortunate optimisation from cvar_match_section
The (rather late) early-exit code, which provides a negligible
optimisation causes cvar_match_section to return false negatives when
it's called with a section name instead of a full variable name.
Remove this optimisation.
Signed-off-by: Carlos Martín Nieto <cmn@elego.de>
|
|
340fc0d4
|
2011-06-07T03:39:19
|
|
threads: Cleanup TLS declarations
This time for good.
|
|
9d77d83a
|
2011-06-07T03:38:09
|
|
Revert "threads: Fix TLS declarations"
This commit uploaded an old broken test. Oops!
|
|
1097dacd
|
2011-06-06T18:33:38
|
|
Merge pull request #240 from Romain-Geissler/tree-object-type
Tree: Added a function that returns the type of a tree entry.
|
|
9b1692eb
|
2011-06-06T18:31:21
|
|
Merge pull request #239 from pegonma/oid_prefix
Search objects of different types given OID prefix
|
|
1b0d92b1
|
2011-06-06T18:28:11
|
|
Merge pull request #238 from pegonma/git_oid_ncmp
Better name for git_oid_match
|
|
fe79750b
|
2011-06-06T18:27:29
|
|
Merge pull request #236 from Jopie64/development
Fix build errors on MSVC
|
|
00c31dd2
|
2011-06-06T18:26:50
|
|
Merge pull request #234 from Romain-Geissler/entry-count-API-uniformisation
[Tree | Index] API uniformisation
|
|
2c9e7fa3
|
2011-06-06T18:24:37
|
|
Merge pull request #232 from schu/ref-available-cb
reference_rename: respect all references v2
|
|
64fe8c62
|
2011-06-07T03:22:32
|
|
threads: Fix TLS declarations
Cleanup the thread-utils file. Do not define TLS if libgit2 is not
threadsafe.
|
|
7d170a4b
|
2011-06-06T18:11:15
|
|
Merge pull request #231 from Romain-Geissler/discovery-path-v2
[Discovery path] Fix and tests
|
|
ff9a4c13
|
2011-06-06T17:14:30
|
|
Tree: Added a function that returns the type of a tree entry.
|
|
c09093cc
|
2011-06-06T10:55:36
|
|
Renamed git_oid_match to git_oid_ncmp.
As suggested by carlosmn, git_oid_ncmp would probably
be a better name than git_oid_match, for it does the same
as git_oid_cmp but only up to a certain amount of hex digits.
|
|
790c6c95
|
2011-06-06T11:55:48
|
|
Added methods to search objects of different types
given an OID prefix.
|
|
c5d8745f
|
2011-06-06T10:55:54
|
|
Tree: Some more size_t to unsigned int type change.
|
|
efcc87c9
|
2011-06-06T10:02:07
|
|
Repository: A little fix in error code. GIT_ENOTFOUND is returned when a gitfile is malformed and GIT_ENOTAREPO when the pointed dir is not a repo.
Fixed tests so that it check the right error code.
|
|
f9213015
|
2011-06-06T01:54:59
|
|
filebuf: Fix printf buffer overflows
The filebuf was not being properly written after a flush. This should
cut it now.
Fixes #228
|
|
2b397327
|
2011-06-06T01:54:25
|
|
refs: Improve error messages
|
|
5ec05d07
|
2011-06-06T01:26:01
|
|
Repository: Fixed retrieve_device return type.
|
|
393a9f9e
|
2011-06-06T00:33:23
|
|
Fix build errors on MSVC
|
|
f11e0797
|
2011-06-05T21:19:03
|
|
Index: API uniformisation: Use unsigned int for all index number.
Feature Added: Search an unmerged entry by path (git_index_get_unmerged
renamed to git_index_get_unmerged_bypath) or by index (git_index_get_unmerged_byindex).
|
|
e5c80097
|
2011-06-05T21:18:05
|
|
Tree: API uniformasation: Use unsigned int for all index number.
|
|
76b15cb1
|
2011-06-05T20:47:30
|
|
Raise GIT_EEXISTS in case of conflicting ref names instead of passing
the error returned by the subsystem; clarify error message.
Fix tiny typo.
Signed-off-by: schu <schu-github@schulog.org>
|
|
1b6d8163
|
2011-06-05T19:22:32
|
|
Teach reference_rename() to really respect other references
Add a new function reference_available() to check if a reference name
actually is free and can be used.
Signed-off-by: schu <schu-github@schulog.org>
|
|
fd21c6f6
|
2011-05-29T22:36:26
|
|
Add test case checking we do not corrupt the repository when renaming
Signed-off-by: schu <schu-github@schulog.org>
|
|
76e9e3b7
|
2011-06-05T00:23:24
|
|
Tests: Added tests for git_repository_discover.
Unfortunately, the across_fs flag can't be tested automaticly, as we can't
create a temporary new filesystem.
|
|
a993e4fe
|
2011-06-05T00:20:35
|
|
Fileops: Fixed gitfo_mkdir_recurs so that it proprely works with a path without trailing slash.
It used to discard the last directory if the path didn't have a trailing slash.
|
|
f2a60854
|
2011-06-05T00:18:34
|
|
Repository: Fixed the path returned by read_gitfile (remove trailing slashes)
|
|
8b05e780
|
2011-06-05T00:17:26
|
|
Repository: Fixed a bug in read_gitfile (proprely remove trailings newlines)
|
|
602ee38b
|
2011-06-04T20:44:14
|
|
repository: Export all internal paths
|
|
9d9bab5c
|
2011-06-04T16:28:39
|
|
Repository: Fixed some errors with ceiling_dirs in git_repository_discover.
Now the ceiling_dirs are compared with their symbolic free version (like base_path).
The ceiling dirs check is now performed after getting the parent directory.
|
|
793545ef
|
2011-06-03T17:41:53
|
|
Merge pull request #227 from Romain-Geissler/discovery-path-v2
Discovery path v2
|
|
fd0574e5
|
2011-06-04T01:01:20
|
|
Repository: Added the git_repository_discover function that finds by itself the git directory that manage a given directory path.
|
|
222cf1d4
|
2011-06-04T00:14:37
|
|
Repository: Splitted the repository destructor into a helper part (only free directories path) and the complete public destructor.
|
|
6a01b6bd
|
2011-06-04T00:10:55
|
|
Repository: Added read_gitfile that allows you to read a .git file and extract the git directory path.
|
|
f2e6b877
|
2011-06-03T23:44:38
|
|
Repository: Added some util functions that we'll need to discover repository path.
retrieve_device returns the file device for a given path (so that we can detect device change while walking through parent directories).
abspath returns a canonicalized path, symbolic link free.
retrieive_ceiling_directories_offset returns the biggest path offset that path match in the ceiling directory list (so that we can stop at ceiling directories).
|
|
1549cba9
|
2011-06-03T21:18:24
|
|
Filebuf: Fixed a TODO in filebuf (real lock in lock_file)
Added gitfo_creat_locked and gitfo_creat_locked_force
|
|
3a42e0a3
|
2011-06-03T21:38:55
|
|
index: Add `git_index_entry_stage` method
As suggested by Romain-Geissler
|
|
bc648491
|
2011-06-03T21:09:14
|
|
Fileops: Added gitfo_isfile.
Conflicts:
src/fileops.c
|
|
26a98ec8
|
2011-06-03T20:47:56
|
|
Fileops: Added a fourth argument to the path prettifying functions to use an alternate basepath.
Fixed a Windows TO-DO in the prettifying functions.
|
|
bb88da7f
|
2011-06-03T19:38:46
|
|
Sha1Lookup: Fixed two MSVC compilation warnings.
|
|
0291b5b7
|
2011-06-03T19:59:16
|
|
odb: Fix loading ODB alternates
Fixed an issue with the `strtokz implementation and added support for
comments and relative paths in the alternates file.
|
|
04fdc10d
|
2011-06-03T19:26:45
|
|
Fileops:retrieve_path_root_offset is now named gitfo_retrieve_path_root_offset (like other public functions). Added platform specific directory separator definition.
|
|
1e9b7a09
|
2011-06-02T15:12:37
|
|
Merge pull request #144 from nordsturm/fix_fakewstream
Fix fake wstream write
|
|
7107b599
|
2011-06-02T01:03:52
|
|
odb-pack: More variable declarations
|
|
7b5fe049
|
2011-06-02T00:47:51
|
|
odb-pack: Do not declare variables mid-function
|
|
fea400f8
|
2011-06-01T23:41:30
|
|
signature: Fix compilation
|
|
d0323a5f
|
2011-06-01T21:25:56
|
|
short-oid: Cleanup
|
|
aea8a638
|
2011-05-29T18:00:35
|
|
Implemented read_unique_short_oid method for loose backend.
|
|
6c8ca697
|
2011-05-29T17:57:25
|
|
Fixed some error messages related to searching objects from a short oid. Fixed forgot to check that prefix length is greater than minimum prefix length in read_unique_short_oid method from pack backend.
|
|
7d74cd44
|
2011-05-29T11:46:42
|
|
Deleted unused method git_cached_object_match, since we do not explore the cache when searching objects from a short oid.
|
|
da03c9f3
|
2011-05-29T11:45:34
|
|
Changed return value of git_oid_match to be consistent with the other compare methods (0 means oids match). Added method to compare prefixes of hex formatted oids.
|
|
ac2b94ad
|
2011-05-28T21:24:25
|
|
Added a GIT_OID_MINPREFIXLEN constant to define the minimum length allowed for oid prefixes (set to 4, like in git). Consequently updated some object lookup methods and their documentation.
|
|
dd453c4d
|
2011-05-27T22:46:41
|
|
Added git.git sha1 lookup method to replace simple binary search in pack backend.
Implemented find_unique_short_oid for pack backend, based on git sha1 lookup method;
finding an object given its full oid is just a particular case of searching
the unique object matching an oid prefix (short oid).
Added git_odb_read_unique_short_oid, which iterates over all the backends to
find and read the unique object matching the given oid prefix.
Added a git_object_lookup_short_oid method to find the unique object in
the repository matching a given oid prefix : it generalizes git_object_lookup
which now does nothing but calls git_object_lookup_short_oid.
|
|
53c0bd81
|
2011-05-27T22:37:10
|
|
Added error for ambiguous oid prefixes. Added methods to compare the first nth hexadecimal characters (i.e. packets of 4 bits) of OIDs.
|
|
ecd6fdf1
|
2011-05-27T18:49:09
|
|
Added a read_unique_short_oid method to backends, to make it possible to find objects from sha1 prefixes in the future. Default implementations throw GIT_ENOTIMPLEMENTED for strict prefixes (i.e. length < GIT_OID_HEXSZ).
|
|
4a51e998
|
2011-06-01T12:57:47
|
|
Merge pull request #224 from glesserd/tagparsing
Fix tag and signature parsing
|
|
dd8a2070
|
2011-06-01T12:54:15
|
|
Merge pull request #215 from schu/typos
Fix typos
|
|
46d359d1
|
2011-06-01T12:53:46
|
|
Merge pull request #218 from schu/tests-fflush
test_lib.c: flush stdout after every test-run
|
|
a7fdce62
|
2011-06-01T12:53:16
|
|
Merge pull request #223 from carlosmn/valgrind
Plug a leak in the index unmerged entries vector
|
|
9db04160
|
2011-06-01T12:52:50
|
|
Merge pull request #222 from carlosmn/config-bugfix
Config bugfix
|
|
50b7334e
|
2011-06-01T09:58:21
|
|
Merge pull request #206 from nulltoken/topic/is-bare
Add git_repository_is_bare() accessor
|
|
786ad84f
|
2011-06-01T18:51:54
|
|
index: Cleanup tree parsing
|
|
a02fc2cd
|
2011-05-24T15:24:45
|
|
index: correctly parse invalidated TREE extensions
A TREE extension with an entry count of -1 means that it was
invalidated and we should ignore it. Do so instead of returning an
error.
This fixes issue #202
Signed-off-by: Carlos Martín Nieto <cmn@elego.de>
|
|
cdd9fd47
|
2011-05-24T14:55:34
|
|
Allow read_tree_internal to return an error code
There are two reasons why read_tree_internal might return a NULL
tree. The first one is a corrupt index, but the second one is an
invalidated TREE extension. Up to now, its only way to communicate
with its caller was through the return value being NULL or not.
Allow read_tree_internal to report its exit status independently from
the tree pointer.
Signed-off-by: Carlos Martín Nieto <cmn@elego.de>
|
|
f7e59c4d
|
2011-06-01T18:34:21
|
|
index: Change the memory management for repo indexes
The `git_repository_index` call now returns a brand new index that must
be manually free'd.
|
|
ef5ffed3
|
2011-06-01T18:23:36
|
|
object: Update documentation
|
|
fbfc7580
|
2011-05-31T18:38:59
|
|
Fix tag and signature parsing
Before this commit, malformed tag and signature were considered as
valid by the parser. See the test t3800-mktag.sh of git to see example
of malformed tag and signature.
|
|
fc0ee5bd
|
2011-05-31T17:54:50
|
|
Add test for empty config file
Signed-off-by: Carlos Martín Nieto <cmn@elego.de>
|
|
c7e6e958
|
2011-05-31T17:44:55
|
|
Don't try to parse an empty config file
Signed-off-by: Carlos Martín Nieto <cmn@elego.de>
|
|
30d0550d
|
2011-05-31T16:31:19
|
|
Add test for invalid ext header
Signed-off-by: Carlos Martín Nieto <cmn@elego.de>
|
|
38d0bc1e
|
2011-05-31T16:06:01
|
|
Add config test for empty line
Signed-off-by: Carlos Martín Nieto <cmn@elego.de>
|
|
5892277c
|
2011-05-31T15:16:25
|
|
Config parse header ext: don't allow text after closing quote
Nothing is allowed betwen the closing quotation mark and the ] so
return an error if there is.
Signed-off-by: Carlos Martín Nieto <cmn@elego.de>
|
|
7288d8b6
|
2011-05-31T15:11:49
|
|
Parse section header ext: don't leak on error
Also free the subsection if we find too many quotes
Signed-off-by: Carlos Martín Nieto <cmn@elego.de>
|
|
7bc9e2aa
|
2011-05-31T15:06:22
|
|
Guard against double-freeing the current section
If parse_section_header{,_ext} return an error, current_section
doesn't get allocated. Set it to NULL after freeing so we don't try to
free it again.
This fixes part 2-2 of Issue #210.
Signed-off-by: Carlos Martín Nieto <cmn@elego.de>
|
|
f2abee47
|
2011-05-29T01:24:09
|
|
cfg_readline: really ignore empty lines
Simplify cfg_readline and at the same time fix it so that it does
really ignore empty lines.
This fixes point 2-1 of Issue #210
Signed-off-by: Carlos Martín Nieto <cmn@elego.de>
|
|
a5f43b95
|
2011-05-31T13:48:44
|
|
Config file open: don't free memory that doesn't belong to us
On error, it would free the configuration object even though it didn't
own that memory, which would cause a double-free.
This fixes the first part of Issue #210
Signed-off-by: Carlos Martín Nieto <cmn@elego.de>
|
|
71da57ae
|
2011-05-31T16:49:15
|
|
Plug a leak in the index unmerged entries vector
Signed-off-by: Carlos Martín Nieto <cmn@elego.de>
|
|
a7ed1625
|
2011-05-30T21:13:11
|
|
test_lib.c: flush stdout after every test-run
Make sure the user immediately sees the feedback, '.' or 'F', for a
test. If it's only in the buffer, it may gets "lost" in case of error.
Signed-off-by: schu <schu-github@schulog.org>
|
|
286349c6
|
2011-05-29T20:15:27
|
|
Fix tiny typo
Signed-off-by: nulltoken <emeric.fermas@gmail.com>
Signed-off-by: schu <schu-github@schulog.org>
|
|
f5a86fef
|
2011-05-29T17:44:14
|
|
gitfo_isdir: fix error message
Signed-off-by: schu <schu-github@schulog.org>
|
|
fa9bcd81
|
2011-05-24T21:48:07
|
|
Add git_repository_is_bare() accessor
|
|
4191d529
|
2011-05-24T10:02:33
|
|
Merge pull request #204 from nulltoken/fix/build-msvc
Fix compilation warnings in MSVC
|
|
3a1c4310
|
2011-05-24T18:55:35
|
|
Fix compilation warnings in MSVC
This allows to successfully build libgit2 with waf on Windows.
|
|
8146fe7c
|
2011-05-23T21:41:13
|
|
index: Fix unused error messages
|
|
d320c52d
|
2011-05-19T15:59:18
|
|
index.c: Move to new error handling mechanism
|
|
ec9edd56
|
2011-05-19T15:46:36
|
|
config_file.c: Move to new error handling mechanism
|
|
a6d647d2
|
2011-05-19T15:37:10
|
|
win32/pthread.c: Move to new error handling mechanism
|
|
7c8b597e
|
2011-05-19T15:36:09
|
|
win32/map.c: Move to new error handling mechanism
|
|
450ac186
|
2011-05-19T15:29:22
|
|
unix/map.c: Move to new error handling mechanism
|
|
57435a6d
|
2011-05-19T15:24:24
|
|
backends/sqlite.c: Move to new error handling mechanism
|
|
43a0bc01
|
2011-05-19T15:17:06
|
|
backends/hiredis.c: Move to new error handling mechanism
|
|
33b1d19e
|
2011-05-19T15:13:40
|
|
util.c: Move to new error handling mechanism
|
|
bc06a4ee
|
2011-05-19T15:10:54
|
|
tree.c: Move to new error handling mechanism
|
|
6e34ee61
|
2011-05-19T15:07:41
|
|
tag.c: Move to new error handling mechanism
|
|
00556496
|
2011-05-19T14:59:10
|
|
signature.c: Move to new error handling mechanism
|
|
c0cd9d50
|
2011-05-19T14:57:41
|
|
revwalk.c: Move to new error handling mechanism
|