Vicent Marti
9ef9e8c3ad
tree: Use an internal append functiont to add new entries
2011-09-27 14:33:18 +02:00
Carlos Martín Nieto
8255c69b10
Make use of the tree cache
...
Taking advantage of the tree cache, git_tree_create_fromindex becomes
comparable in speed to git write-tree when the cache is available.
Signed-off-by: Carlos Martín Nieto <carlos@cmartin.tk>
2011-09-27 14:33:18 +02:00
Carlos Martín Nieto
3ba69ba8a4
Add git_tree_cache_get
...
Signed-off-by: Carlos Martín Nieto <cmn@elego.de>
2011-09-27 14:33:18 +02:00
Carlos Martín Nieto
b419fe2d8c
Invalidate the path when removing from the index
...
Signed-off-by: Carlos Martín Nieto <cmn@elego.de>
2011-09-27 14:33:18 +02:00
Carlos Martín Nieto
e23ede0de5
index: invalidate added paths
...
When a file is updated in the index, it's path needs to be invalidated
in the tree cache as the hash is no longer correct.
Signed-off-by: Carlos Martín Nieto <cmn@elego.de>
2011-09-27 14:33:18 +02:00
Carlos Martín Nieto
69bffab969
Add git_tree_cache_invalidate_path
...
Whenever a file is updated in the index, each tree leading towards it
needs to be invalidated. Provide the supporting function.
Signed-off-by: Carlos Martín Nieto <cmn@elego.de>
2011-09-27 14:33:18 +02:00
Carlos Martín Nieto
acd31b4ad6
tree cache: correctly handle invalidated trees
...
The fix introduced in a02fc2cd1
(2011-05-24; index: correctly parse
invalidated TREE extensions) threw out the rest of the data in the
extension if it found an invalidated entry. This was the result of
incorrect reading of the documentation.
Insted, keep reading the extension, as there may be cached data we can
use.
Signed-off-by: Carlos Martín Nieto <cmn@elego.de>
2011-09-27 14:33:18 +02:00
Carlos Martín Nieto
b183ffe77e
Make tree cache name a flex-array
...
Signed-off-by: Carlos Martín Nieto <cmn@elego.de>
2011-09-27 14:33:18 +02:00
Carlos Martín Nieto
b41713206b
Move the tree cache functions to their own file
...
Rename git_index_tree to git_tree_cache.
Signed-off-by: Carlos Martín Nieto <cmn@elego.de>
2011-09-27 14:33:18 +02:00
Vicent Marti
01d7fded1b
Revert "Rewrite getenv to use Win32 version on Windows"
...
This reverts commit e1b8644467
.
2011-09-27 14:33:18 +02:00
Vicent Martí
ea4dad8ec4
Merge pull request #424 from carlosmn/access-unicode
...
Implment p_access and use it in git_fileutils_exists
2011-09-25 06:52:01 -07:00
schu
ddeaa7fb68
t18-status.c: fix unused warnings
...
Signed-off-by: schu <schu-github@schulog.org>
2011-09-24 13:41:10 +02:00
Carlos Martín Nieto
dd44887ac6
Implment p_access and use it in git_fileutils_exists
...
Signed-off-by: Carlos Martín Nieto <carlos@cmartin.tk>
2011-09-23 00:00:05 +02:00
Paul Betts
76c15b7191
Revert changes to clay
2011-09-22 12:26:23 -07:00
Vicent Martí
01ab592b82
Merge pull request #421 from nulltoken/ntk/fix/config-get-set-long
...
config: make git_config_[get|set]_long() able to properly deal with 8 bytes wide values
2011-09-22 10:28:05 -07:00
Vicent Marti
87a26ad55e
Add HTTP sources to Clay suite
2011-09-22 20:23:42 +03:00
Vicent Martí
8114ee4c95
Merge pull request #405 from carlosmn/http-ls
...
Implement ls-remote over HTTP
2011-09-22 10:17:43 -07:00
nulltoken
ad196c6ae6
config: make git_config_[get|set]_long() able to properly deal with 8 bytes wide values
...
Should fix issue #419 .
Signed-off-by: nulltoken <emeric.fermas@gmail.com>
2011-09-22 18:58:47 +02:00
Carlos Martín Nieto
4ee8418a08
http: get rid of the global state
...
Move the header parsing state into the transport, making use of the
existing bitfield.
Signed-off-by: Carlos Martín Nieto <carlos@cmartin.tk>
2011-09-21 22:14:09 +02:00
Paul Betts
e1b8644467
Rewrite getenv to use Win32 version on Windows
2011-09-21 12:00:34 -07:00
Vicent Marti
e3ecf7e9ab
Do not have duplicate filenames
...
Two `posix.c` files may or may not break MSVC builds under 2008. Do not
have repeated objects.
You will need to clean & regenerate CMake.
2011-09-21 14:09:56 +03:00
Vicent Martí
805dc2a088
Merge pull request #415 from schu/ref-rename-regression
...
refs: fix git_reference_rename()
2011-09-20 15:52:16 -07:00
Vicent Martí
4e52d34026
Merge pull request #413 from libgit2/utf8-paths-win32
...
Rewrite p_* functions to use Unicode and marshal to UTF8 internally, take 2
2011-09-20 15:38:10 -07:00
Vicent Martí
b6dcc2ebc9
Merge pull request #414 from carlosmn/repo-discover-short
...
repsitory: use better error code if path is too short for discover
2011-09-20 15:37:55 -07:00
Vicent Marti
a58881274d
Fix clay under MinGW
2011-09-21 01:14:57 +03:00
Vicent Marti
9457a36ca0
Merge branch 'development' of github.com:libgit2/libgit2 into development
2011-09-21 01:10:11 +03:00
schu
93fdbe000c
refs: fix git_reference_rename()
...
reference_rename() recently failed when renaming an existing reference
refs/heads/foo/bar -> refs/heads/foo because of a change in the
underlying functions / error codes. Fixes #412 .
Signed-off-by: schu <schu-github@schulog.org>
2011-09-20 11:56:21 +02:00
schu
b4ec3c648f
refs: add additional test for reference renaming
...
Signed-off-by: nulltoken <emeric.fermas@gmail.com>
Signed-off-by: schu <schu-github@schulog.org>
2011-09-20 11:26:08 +02:00
Carlos Martín Nieto
c3fe018b12
repsitory: use better error code if path is too short for discover
...
GIT_EOVERFLOW means something different. Use GIT_ESHORTBUFFER. On the
way, remove a redundant sizeof(char).
Signed-off-by: Carlos Martín Nieto <cmn@elego.de>
2011-09-20 10:02:11 +02:00
Paul Betts
6d0ef97478
Fix opendir/readdir and friends on Win32 to use Unicode
2011-09-19 13:14:09 -07:00
Paul Betts
7998ae5ab1
Rewrite p_* functions to use Unicode and marshal to UTF8 internally
2011-09-19 13:14:04 -07:00
Paul Betts
c498701df7
Fix tests to use portable setenv
2011-09-19 10:38:44 -07:00
Paul Betts
222d057c22
Create cross-platform setenv
2011-09-19 10:34:52 -07:00
Vicent Marti
468d0d1e1e
Fix repository_config
call in network::remotes
2011-09-19 06:32:56 +03:00
Vicent Marti
19d869bb2e
Fix warning in status.c
2011-09-19 06:31:54 +03:00
Carlos Martín Nieto
3a2626f32a
Add remotes test to clay
...
Signed-off-by: Carlos Martín Nieto <carlos@cmartin.tk>
2011-09-19 06:17:28 +03:00
Vicent Marti
7aece9cfa2
Who makes the magic possible?
2011-09-19 06:14:54 +03:00
Vicent Martí
71a4c1f16f
Merge pull request #384 from kiryl/warnings
...
Add more -W flags to CFLAGS
2011-09-18 20:07:59 -07:00
Vicent Martí
a807607470
Merge pull request #397 from lambourg/development
...
Fix compilation issues with mingw64 headers
2011-09-18 20:00:19 -07:00
Vicent Martí
ae996e029f
Merge pull request #394 from carlosmn/tree-fromindex
...
Use git_treebuilder to write the index as a tree
2011-09-18 19:59:34 -07:00
Vicent Martí
6640266e5a
Merge pull request #398 from carlosmn/config-autohome
...
git_repository_config: open global config file automatically
2011-09-18 19:58:22 -07:00
Vicent Martí
71b84c639a
Merge pull request #408 from schu/fixup-status
...
Fixup status.c
2011-09-18 19:55:48 -07:00
Vicent Martí
3125929bc4
Merge pull request #393 from schu/unused-but-set-variable
...
filebuf.c: fix unused-but-set warning
2011-09-18 19:54:18 -07:00
Vicent Martí
b6ed727a45
Merge pull request #392 from sschuberth/development
...
Fix a bug and GCC warning introduced in 932669b
2011-09-18 19:52:40 -07:00
Vicent Martí
33760f1772
Merge pull request #400 from boyski/fixup-examples
...
Fix up examples code
2011-09-18 19:47:36 -07:00
Vicent Martí
b3c524d104
Merge pull request #399 from carlosmn/free-null
...
Add checks for NULL to the config and remote free functions
2011-09-18 19:46:12 -07:00
Vicent Marti
2014021b20
Backport t18 fixes to Clay
2011-09-19 05:41:25 +03:00
Vicent Martí
4d3c409c19
Merge pull request #409 from nulltoken/ntk/fix/status-tests-segfault
...
Fix git_status_foreach tests
2011-09-18 19:40:29 -07:00
Vicent Martí
e311519dce
Merge pull request #411 from boyski/gcc4
...
Don't use '__attribute__ visibility' with gcc unless it's at version 4 or better
2011-09-18 19:38:14 -07:00
David Boyce
d2a1861ea1
Don't use '__attribute__ visibility' with gcc unless it's at
...
version 4 or better.
2011-09-18 21:27:25 -04:00