]>
git.proxmox.com Git - libgit2.git/log
Vicent Marti [Mon, 19 Sep 2011 02:41:00 +0000 (05:41 +0300)]
Backport t18 fixes to Clay
Vicent Martí [Mon, 19 Sep 2011 02:40:29 +0000 (19:40 -0700)]
Merge pull request #409 from nulltoken/ntk/fix/status-tests-segfault
Fix git_status_foreach tests
Vicent Martí [Mon, 19 Sep 2011 02:38:14 +0000 (19:38 -0700)]
Merge pull request #411 from boyski/gcc4
Don't use '__attribute__ visibility' with gcc unless it's at version 4 or better
David Boyce [Mon, 19 Sep 2011 01:27:25 +0000 (21:27 -0400)]
Don't use '__attribute__ visibility' with gcc unless it's at
version 4 or better.
Vicent Marti [Mon, 19 Sep 2011 00:34:49 +0000 (03:34 +0300)]
Tabify everything
There were quite a few places were spaces were being used instead of
tabs. Try to catch them all. This should hopefully not break anything.
Except for `git blame`. Oh well.
Vicent Marti [Sun, 18 Sep 2011 22:54:32 +0000 (01:54 +0300)]
Cleanup legal data
1. The license header is technically not valid if it doesn't have a
copyright signature.
2. The COPYING file has been updated with the different licenses used in
the project.
3. The full GPLv2 header in each file annoys me.
nulltoken [Sat, 17 Sep 2011 14:28:18 +0000 (16:28 +0200)]
Add some forgotten asserts in the status tests
nulltoken [Sat, 17 Sep 2011 14:07:28 +0000 (16:07 +0200)]
Fix a off-by-one error in the git_status_foreach tests
Provided the tests fail (which they should not) and the callback is invoked too many times, this prevents the tests from segfaulting.
Vicent Marti [Fri, 16 Sep 2011 17:48:57 +0000 (19:48 +0200)]
Update Clay script
Vicent Marti [Fri, 16 Sep 2011 17:42:44 +0000 (19:42 +0200)]
Fix Clay compilation under Win32
Vicent Marti [Fri, 16 Sep 2011 03:39:52 +0000 (05:39 +0200)]
Rename Clay target in CMakeLists
This allows to build both test suites at the same time
Vicent Marti [Fri, 16 Sep 2011 03:47:18 +0000 (05:47 +0200)]
Regenerate test suite
Vicent Marti [Fri, 16 Sep 2011 03:46:18 +0000 (05:46 +0200)]
Add missing prototypes
Vicent Marti [Fri, 16 Sep 2011 03:44:21 +0000 (05:44 +0200)]
Revert changes to t18
...Ops, I broke the old test when porting it to Clay.
Vicent Marti [Fri, 16 Sep 2011 03:12:56 +0000 (05:12 +0200)]
Add sample "Status" clay tests
nulltoken [Sun, 11 Sep 2011 16:46:08 +0000 (18:46 +0200)]
status: enhance determination of statuses for a whole directory
- Should increase performance through usage of a walker
- No callback invocation for unaltered entries
nulltoken [Fri, 2 Sep 2011 11:44:42 +0000 (13:44 +0200)]
status: enhance determination of status for a single file
- fix retrieval of a file status when working against a newly initialized repository
- reduce memory pressure
- prevents a directory from being tested
nulltoken [Mon, 8 Aug 2011 11:40:17 +0000 (13:40 +0200)]
repository: Add git_repository_head()
nulltoken [Fri, 2 Sep 2011 08:07:42 +0000 (10:07 +0200)]
Mark the resources in the test folder as binary to prevent unexpected line-feed conversion
Vicent Marti [Wed, 14 Sep 2011 23:12:46 +0000 (01:12 +0200)]
Come out and Clay
Vicent Martí [Tue, 13 Sep 2011 17:51:27 +0000 (10:51 -0700)]
Merge pull request #401 from boyski/document-git-success
Document GIT_SUCCESS
David Boyce [Tue, 13 Sep 2011 16:30:25 +0000 (12:30 -0400)]
Standardized doxygen @return lines for int functions to say "GIT_SUCCESS or an error code".
Vicent Martí [Thu, 8 Sep 2011 21:20:19 +0000 (14:20 -0700)]
Merge pull request #391 from sschuberth/development
Warning fixes
Sebastian Schuberth [Thu, 8 Sep 2011 15:13:32 +0000 (17:13 +0200)]
Add myself to the list of Git authors who consent
Sebastian Schuberth [Thu, 8 Sep 2011 14:43:58 +0000 (16:43 +0200)]
Fix an integral overflow on 64-bit
Sebastian Schuberth [Thu, 8 Sep 2011 12:31:37 +0000 (14:31 +0200)]
Add casts to get rid of some warnings when filling zlib structures
Sebastian Schuberth [Thu, 8 Sep 2011 12:29:54 +0000 (14:29 +0200)]
Get rid of a superfluous pointer cast
Sebastian Schuberth [Thu, 8 Sep 2011 12:22:29 +0000 (14:22 +0200)]
Fix minor indentation issues (spaces to tabs)
Sebastian Schuberth [Thu, 8 Sep 2011 12:21:17 +0000 (14:21 +0200)]
Fix some random size_t vs. int conversion warnings
Vicent Martí [Fri, 2 Sep 2011 13:08:47 +0000 (06:08 -0700)]
Merge pull request #388 from lambourg/master
pull request for #387
Jerome Lambourg [Fri, 2 Sep 2011 11:00:27 +0000 (13:00 +0200)]
Fix for issue #387
Vicent Marti [Wed, 31 Aug 2011 01:45:34 +0000 (03:45 +0200)]
Fix compilation in MinGW
Vicent Marti [Tue, 30 Aug 2011 18:32:33 +0000 (11:32 -0700)]
posix: Fix undeclared prototype
Vicent Marti [Tue, 30 Aug 2011 18:27:36 +0000 (11:27 -0700)]
repository: Fix signed/unsigned comp.
Vicent Marti [Tue, 30 Aug 2011 17:48:13 +0000 (19:48 +0200)]
netops: This is the proper check
Vicent Martí [Tue, 30 Aug 2011 17:46:40 +0000 (10:46 -0700)]
Merge pull request #380 from kiryl/no-release-debug
CMakeLists: no need in split debug/release build
Vicent Marti [Tue, 30 Aug 2011 17:44:09 +0000 (19:44 +0200)]
netops: Use the size_t, Luke
Carlos Martín Nieto [Mon, 22 Aug 2011 13:43:57 +0000 (15:43 +0200)]
Add git_remote_new
As we no longer expose the transport functions, this is now the only
way to connect to a remote when given an URL instead of a remote name
Signed-off-by: Carlos Martín Nieto <carlos@cmartin.tk>
Carlos Martín Nieto [Mon, 22 Aug 2011 13:18:19 +0000 (15:18 +0200)]
Don't hide the transport details
Transports shouldn't get used outside of the library, so don't expose
accessor functions.
Signed-off-by: Carlos Martín Nieto <carlos@cmartin.tk>
Carlos Martín Nieto [Fri, 19 Aug 2011 07:03:19 +0000 (09:03 +0200)]
Fix Windows compilation
Sockets on Windows are unsigned, so define a type GIT_SOCKET which is
signed or unsigned depending on the platform.
Thanks to Em for his patience with this.
Signed-off-by: Carlos Martín Nieto <carlos@cmartin.tk>
Vicent Marti [Tue, 30 Aug 2011 11:34:14 +0000 (13:34 +0200)]
compat: Move `mkstemp` to the POSIX compat layer
Vicent Marti [Tue, 30 Aug 2011 11:10:26 +0000 (13:10 +0200)]
network: <select.h> is not available in MinGW
Vicent Martí [Tue, 30 Aug 2011 10:39:28 +0000 (03:39 -0700)]
Merge pull request #378 from kiryl/Wuninitialized
Wuninitialized
Vicent Martí [Fri, 26 Aug 2011 03:42:03 +0000 (20:42 -0700)]
Merge pull request #379 from kiryl/STRLEN
Drop STRLEN() macros
Kirill A. Shutemov [Thu, 25 Aug 2011 20:57:06 +0000 (23:57 +0300)]
pkt: use sizeof() instead of strlen() to avoid variable length array
Signed-off-by: Kirill A. Shutemov <kirill@shutemov.name>
Kirill A. Shutemov [Thu, 25 Aug 2011 11:22:57 +0000 (14:22 +0300)]
Drop STRLEN() macros
There is no need in STRLEN macros. Compilers can do this trivial
optimization on its own.
Signed-off-by: Kirill A. Shutemov <kirill@shutemov.name>
Kirill A. Shutemov [Thu, 25 Aug 2011 11:31:19 +0000 (14:31 +0300)]
CMakeLists: no need in split debug/release build
With GNU toolchain there's no need to split debug/release build.
It's useful to have -O2 in debug envitonment since GCC show more
warnings in this case. -O2 -g works fine.
For release purpose, debug information can be stripted on later stage.
Signed-off-by: Kirill A. Shutemov <kirill@shutemov.name>
Kirill A. Shutemov [Wed, 24 Aug 2011 17:11:15 +0000 (20:11 +0300)]
transport_git: add missed error handling
Signed-off-by: Kirill A. Shutemov <kirill@shutemov.name>
Kirill A. Shutemov [Wed, 24 Aug 2011 17:10:50 +0000 (20:10 +0300)]
Fix false positive -Wuninitialized warnings
GCC produces several -Wuninitialized warnings. Most of them can be fixed
if we make visible for gcc that git__throw() and git__rethrow() always
return first argument.
Signed-off-by: Kirill A. Shutemov <kirill@shutemov.name>
Vicent Marti [Thu, 18 Aug 2011 00:28:34 +0000 (02:28 +0200)]
transport: Merge bitfield
I don't think MSVC merges these automatically.
Vicent Marti [Thu, 18 Aug 2011 00:13:51 +0000 (02:13 +0200)]
posix: Properly handle `snprintf` in all platforms
Vicent Marti [Tue, 16 Aug 2011 11:05:05 +0000 (13:05 +0200)]
odb: Do not pass around a header when hashing
Carlos Martín Nieto [Sat, 13 Aug 2011 18:18:29 +0000 (20:18 +0200)]
Keep sending want lines if the server doesn't anwer a flush
Some servers take a long time to answer and expect us to keep sending
want lines; otherwise they close the connection. Avoid this by waiting
for one second for the server to answer. If the timeout runs out,
treat is as a NAK and keep sending want lines.
Signed-off-by: Carlos Martín Nieto <carlos@cmartin.tk>
Carlos Martín Nieto [Fri, 12 Aug 2011 20:44:35 +0000 (22:44 +0200)]
Actually implement object negotiation
Only signal that we need a pack if we do need it and don't send a want
just because it's the first. If we don't need to download the pack,
then we can skip all of the negotiation and just return success.
Signed-off-by: Carlos Martín Nieto <carlos@cmartin.tk>
Carlos Martín Nieto [Fri, 12 Aug 2011 17:02:36 +0000 (19:02 +0200)]
Implement and bind local_send_wants
Signed-off-by: Carlos Martín Nieto <carlos@cmartin.tk>
Carlos Martín Nieto [Wed, 10 Aug 2011 18:49:43 +0000 (20:49 +0200)]
Move negotiation to the transport
There are many ways how a transport might negotiate with the server,
so instead of making it fit into the smart protocol model, let the
transport do its thing. For now, the git protocol limits itself to
send only 160 "have" lines so we don't flood the server.
Signed-off-by: Carlos Martín Nieto <carlos@cmartin.tk>
Carlos Martín Nieto [Wed, 10 Aug 2011 16:35:37 +0000 (18:35 +0200)]
Update transport lifetime documentation
The original was written before any code was written and had nothing
to do with the way things are actually done.
Signed-off-by: Carlos Martín Nieto <carlos@cmartin.tk>
Carlos Martín Nieto [Wed, 10 Aug 2011 12:46:18 +0000 (14:46 +0200)]
Use time sorting in fetch
This is what the docs say tha we should use.
Signed-off-by: Carlos Martín Nieto <carlos@cmartin.tk>
Carlos Martín Nieto [Sun, 7 Aug 2011 12:27:47 +0000 (14:27 +0200)]
Be smarter about selecting wants
There is no need to inspect what the local repository is like. Only
check whether the objects exist locally.
Signed-off-by: Carlos Martín Nieto <carlos@cmartin.tk>
Carlos Martín Nieto [Sun, 7 Aug 2011 12:02:04 +0000 (14:02 +0200)]
Remove enum git_whn
Instead, use flags inside the git_remote_head structure.
Signed-off-by: Carlos Martín Nieto <carlos@cmartin.tk>
Carlos Martín Nieto [Sun, 7 Aug 2011 08:26:33 +0000 (10:26 +0200)]
Assert a filename in indexer creation
Signed-off-by: Carlos Martín Nieto <carlos@cmartin.tk>
Carlos Martín Nieto [Sun, 7 Aug 2011 08:23:53 +0000 (10:23 +0200)]
Don't try to download the packfile too early
Make sure we only try to download the pack if we find the pack header
in the stream, and not if the server takes a bit longer to send us the
last NAK.
Signed-off-by: Carlos Martín Nieto <carlos@cmartin.tk>
Carlos Martín Nieto [Sat, 6 Aug 2011 11:48:52 +0000 (13:48 +0200)]
Add git_remote_update_tips
This function updates the references in the local reference storage to
match the ones in the remote.
Signed-off-by: Carlos Martín Nieto <carlos@cmartin.tk>
Carlos Martín Nieto [Fri, 5 Aug 2011 22:35:20 +0000 (00:35 +0200)]
Implement cooperative caching
When indexing a file with ref deltas, a temporary cache for the
offsets has to be built, as we don't have an index file yet. If the
user takes the responsiblity for filling the cache, the packing code
will look there first when it finds a ref delta.
Signed-off-by: Carlos Martín Nieto <carlos@cmartin.tk>
Carlos Martín Nieto [Fri, 5 Aug 2011 16:20:00 +0000 (18:20 +0200)]
Rethrow pack entry offset error
Signed-off-by: Carlos Martín Nieto <carlos@cmartin.tk>
Carlos Martín Nieto [Fri, 5 Aug 2011 16:11:30 +0000 (18:11 +0200)]
Use strcpy+strcat as memcpy was overlapping
Signed-off-by: Carlos Martín Nieto <carlos@cmartin.tk>
Carlos Martín Nieto [Fri, 5 Aug 2011 13:45:05 +0000 (15:45 +0200)]
Use common capabilities
Signed-off-by: Carlos Martín Nieto <carlos@cmartin.tk>
Carlos Martín Nieto [Thu, 4 Aug 2011 20:42:58 +0000 (22:42 +0200)]
Only wait for pack if we need it
Provide the git_remote_download function to instruct the library to
downlad the packfile and let the user know the temporary location.
Signed-off-by: Carlos Martín Nieto <carlos@cmartin.tk>
Carlos Martín Nieto [Thu, 4 Aug 2011 15:50:50 +0000 (17:50 +0200)]
Tell the user where the downloaded packfile is stored
Signed-off-by: Carlos Martín Nieto <carlos@cmartin.tk>
Carlos Martín Nieto [Thu, 4 Aug 2011 11:07:55 +0000 (13:07 +0200)]
Don't expose the fetch code to the user
Move the generation of the want-list to be done from the negotiate
function, and keep the filtered references inside the remote
structure.
Signed-off-by: Carlos Martín Nieto <carlos@cmartin.tk>
Carlos Martín Nieto [Wed, 3 Aug 2011 20:03:57 +0000 (22:03 +0200)]
Bind the configuration and remotes to a repository
Configurations when taken from a repository and remotes should be
identifiable as coming from a particular repository. This allows us to
reduce the amount of variables that the user has to keep track of.
Signed-off-by: Carlos Martín Nieto <carlos@cmartin.tk>
Carlos Martín Nieto [Sun, 31 Jul 2011 00:40:43 +0000 (02:40 +0200)]
Download pack
Signed-off-by: Carlos Martín Nieto <carlos@cmartin.tk>
Carlos Martín Nieto [Sat, 30 Jul 2011 23:16:47 +0000 (01:16 +0200)]
Move have sending
Signed-off-by: Carlos Martín Nieto <carlos@cmartin.tk>
Carlos Martín Nieto [Sat, 30 Jul 2011 20:29:00 +0000 (22:29 +0200)]
Implement sending haves
Signed-off-by: Carlos Martín Nieto <carlos@cmartin.tk>
Carlos Martín Nieto [Sat, 30 Jul 2011 16:56:20 +0000 (18:56 +0200)]
Add a generic send_wants
Signed-off-by: Carlos Martín Nieto <carlos@cmartin.tk>
Carlos Martín Nieto [Fri, 24 Jun 2011 14:23:19 +0000 (16:23 +0200)]
negotiation
Carlos Martín Nieto [Fri, 24 Jun 2011 22:23:48 +0000 (00:23 +0200)]
git_pkt_send_wants
Carlos Martín Nieto [Wed, 22 Jun 2011 12:53:01 +0000 (14:53 +0200)]
Add git_fetch_list_want which creates the "want" list
Signed-off-by: Carlos Martín Nieto <carlos@cmartin.tk>
Vicent Martí [Thu, 18 Aug 2011 00:33:44 +0000 (17:33 -0700)]
Merge pull request #375 from schu/cleanup
cleanup: some nitpicking and missing free's.
schu [Wed, 17 Aug 2011 13:58:03 +0000 (15:58 +0200)]
refs.c: remove two lines of dead code
Signed-off-by: schu <schu-github@schulog.org>
schu [Wed, 17 Aug 2011 13:50:19 +0000 (15:50 +0200)]
reflog.c: fix memory leaks
Signed-off-by: schu <schu-github@schulog.org>
schu [Wed, 17 Aug 2011 13:20:43 +0000 (15:20 +0200)]
git__strndup: immediately return NULL when ENOMEM
Signed-off-by: schu <schu-github@schulog.org>
schu [Wed, 17 Aug 2011 12:05:41 +0000 (14:05 +0200)]
config_file.c: fix memory leaks
Signed-off-by: schu <schu-github@schulog.org>
schu [Wed, 17 Aug 2011 10:14:47 +0000 (12:14 +0200)]
tsort.c: fix include of common.h
Signed-off-by: schu <schu-github@schulog.org>
schu [Wed, 17 Aug 2011 10:14:12 +0000 (12:14 +0200)]
unix/posix.h: remove redundant include
Signed-off-by: schu <schu-github@schulog.org>
Vicent Martí [Tue, 16 Aug 2011 17:13:45 +0000 (10:13 -0700)]
Merge pull request #373 from carlosmn/fancy-branchname
Fix the reference character check for Unicode
Carlos Martín Nieto [Tue, 16 Aug 2011 16:16:44 +0000 (18:16 +0200)]
Fix the reference character check for Unicode
We need to do an unsigned comparison, as otherwise UTF-8 characters
might look like they have the sign bit set and the check will fail.
Signed-off-by: Carlos Martín Nieto <cmn@elego.de>
Vicent Martí [Tue, 16 Aug 2011 08:37:15 +0000 (01:37 -0700)]
Merge pull request #372 from schu/reflog-return-oid
reflog: assimilate API
schu [Tue, 16 Aug 2011 07:57:43 +0000 (09:57 +0200)]
reflog: fix memory leaks
Make sure to free the existing reflog when we run out or memory while
adding new entries.
Signed-off-by: schu <schu-github@schulog.org>
schu [Mon, 15 Aug 2011 16:56:27 +0000 (18:56 +0200)]
reflog: assimilate reflog API to return git_oid's
Rather than returning the OIDs out of the reflog as string return them
as git_oid.
Signed-off-by: schu <schu-github@schulog.org>
Vicent Martí [Sat, 13 Aug 2011 16:58:11 +0000 (09:58 -0700)]
Merge pull request #366 from belkiss/development
Add missing GIT_BEGIN_DECL and GIT_END_DECL to indexer header
Lambert CLARA [Sat, 13 Aug 2011 08:56:33 +0000 (10:56 +0200)]
Add missing GIT_BEGIN_DECL and GIT_END_DECL to indexer header
Vicent Martí [Fri, 12 Aug 2011 23:32:34 +0000 (16:32 -0700)]
Merge pull request #365 from carlosmn/pkg-config
Really fix pkg-config
Vicent Marti [Fri, 12 Aug 2011 23:24:19 +0000 (16:24 -0700)]
commit: Add support for Encoding header
Carlos Martín Nieto [Fri, 12 Aug 2011 21:57:44 +0000 (23:57 +0200)]
Really fix pkg-config
Without the @ONLY option, CONFIGURE_FILE would replace the variables
that are meant to be used to pkg-config at configure time.
Signed-off-by: Carlos Martín Nieto <carlos@cmartin.tk>
Vicent Marti [Wed, 10 Aug 2011 22:25:17 +0000 (15:25 -0700)]
Add common.h to types.h
Vicent Martí [Wed, 10 Aug 2011 19:55:39 +0000 (12:55 -0700)]
Merge pull request #363 from schu/test-discover0
t12-repo.c: fix failing test discover0
schu [Wed, 10 Aug 2011 19:19:21 +0000 (21:19 +0200)]
t12-repo.c: fix failing test discover0
discover0 tried to stat a non existing directory. Create it beforehand.
Signed-off-by: schu <schu-github@schulog.org>
Vicent Martí [Wed, 10 Aug 2011 00:08:44 +0000 (17:08 -0700)]
Merge pull request #359 from nulltoken/ntk/fix/discover-tests
Slight enhancement to the Discover test
Vicent Martí [Wed, 10 Aug 2011 00:08:18 +0000 (17:08 -0700)]
Merge pull request #355 from jdavid/fix-build
Fix "redefinition of typedef git_indexer" build error