Commit Graph

4488 Commits

Author SHA1 Message Date
Vicent Martí
c45d9c4661 Merge pull request #1451 from nulltoken/topic/support_taggerless_tags
Support tags with no tagger nor message
2013-03-31 14:07:15 -07:00
Philip Kelley
8cc2f2d86f Win32 error reporting: Support WinHTTP errors 2013-03-31 12:10:27 -04:00
nulltoken
24cb87e2a6 tag: Fix parsing when no tagger nor message 2013-03-31 14:36:51 +02:00
nulltoken
5a5bd64024 tests: Fix indentations 2013-03-31 14:17:38 +02:00
Carlos Martín Nieto
97016f29ab branch: refactor git_branch_remote_name
Return the size we'd need to write to instead of simply an
error. Split the function into two to be used later by the upstream
configuration functions.
2013-03-31 12:51:53 +02:00
Philip Kelley
0227fa2a35 Avoid pre-Win7 WinHTTP self-redirect quirk 2013-03-30 21:36:04 -04:00
Carlos Martín Nieto
a258d8e357 branch: rename 'tracking' to 'upstream'
The term 'tracking' is overloaded. Help distinguish what we mean by
using 'upstream' for this part of the library.
2013-03-30 15:45:57 +01:00
Carlos Martín Nieto
81b8c9df46 transport: don't try to export nonexistent function 2013-03-30 04:50:53 +01:00
Edward Thomson
f938259f7c Merge pull request #1446 from ethomson/free
Clean up some memleaks in tests
2013-03-29 16:44:00 -07:00
Edward Thomson
0e60b637ea free! 2013-03-29 18:36:11 -05:00
Vicent Martí
1d5220dcd1 Merge pull request #1445 from ethomson/reset_unmerged
remove unmerged files during reset hard
2013-03-29 10:13:54 -07:00
Edward Thomson
54a1a04291 remove unmerged files during reset hard 2013-03-29 12:07:00 -05:00
Russell Belfer
8cfd54f0d8 Fix Windows/Win32 warning 2013-03-26 12:27:15 -07:00
Vicent Martí
0b061b5bfa Merge pull request #1436 from schu/opts-cache-size
opts: allow configuration of odb cache size
2013-03-26 11:05:57 -07:00
Vicent Martí
86d24ce40c Merge pull request #1439 from arrbee/recurse-ignored-dirs
Several diff and status fixes
2013-03-26 10:42:30 -07:00
Russell Belfer
ccfa68055c Fix some diff ignores and submodule dirty workdir
This started out trying to look at the problems from issue #1425
and gradually grew to a broader set of fixes.  There are two core
things fixed here:

1. When you had an ignore like "/bin" which is rooted at the top
   of your tree, instead of immediately adding the "bin/" entry
   as an ignored item in the diff, we were returning all of the
   direct descendants of the directory as ignored items.  This
   changes things to immediately ignore the directory.  Note that
   this effects the behavior in test_status_ignore__subdirectories
   so that we no longer exactly match core gits ignore behavior,
   but the new behavior probably makes more sense (i.e. we now
   will include an ignored directory inside an untracked directory
   that we previously would have left off).
2. When a submodule only contained working directory changes, the
   diff code was always considering it unmodified which was just
   an outright bug. The HEAD SHA of the submodule matches the SHA
   in the parent repo index, and since the SHAs matches, the diff
   code was overwriting the actual status with UNMODIFIED.

These fixes broke existing tests test_diff_workdir__submodules and
test_status_ignore__subdirectories but looking it over, I actually
think the new results are correct and the old results were wrong.
@nulltoken had actually commented on the subdirectory ignore issue
previously.

I also included in the tests some debugging versions of the
shared iteration callback routines that print status or diff
information.  These aren't used actively in the tests, but can be
quickly swapped in to test code to give a better picture of what
is being scanned in some of the complex test scenarios.
2013-03-25 23:58:40 -07:00
Russell Belfer
37ee70fab4 Implement GIT_STATUS_OPT_EXCLUDE_SUBMODULES
This option has been sitting unimplemented for a while, so I
finally went through and implemented it along with some tests.

As part of this, I improved the implementation of
GIT_DIFF_IGNORE_SUBMODULES so it be more diligent about avoiding
extra work and about leaving off delta records for submodules to
the greatest extent possible (though it may include them still
if you are request TYPECHANGE records).
2013-03-25 22:19:39 -07:00
Vicent Martí
d2a4a54bf9 Merge pull request #1438 from ethomson/checkout_stat
don't stat until the file is written
2013-03-25 21:46:51 -07:00
Edward Thomson
d828f118b3 don't stat until the file is written 2013-03-25 18:16:02 -07:00
Russell Belfer
0c289dd7c6 Recursing into ignored dirs for diff and status
This implements working versions of GIT_DIFF_RECURSE_IGNORED_DIRS
and GIT_STATUS_OPT_RECURSE_IGNORED_DIRS along with some tests for
the newly available behaviors.  This is not turned on by default
for status, but can be accessed via the options to the extended
version of the command.
2013-03-25 16:40:16 -07:00
Vicent Martí
f2850f33ca Merge pull request #1437 from phkelley/redirect
http: Support 302 Found (arrbee did most of the work)
2013-03-25 15:30:37 -07:00
Philip Kelley
f273b5d6a1 Add a valgrind suppression for glibc's getaddrinfo cache 2013-03-25 18:15:54 -04:00
Philip Kelley
35e0f3c629 Refine the redirect check condition 2013-03-25 17:59:30 -04:00
Vicent Martí
f17951d6ea Merge pull request #1431 from libgit2/autocrlf-fixes
Fix crlf handling, particularly when autocrlf=true
2013-03-25 14:42:53 -07:00
Philip Kelley
2c7f7a66e9 http: Support 302 Found (arrbee did most of the work) 2013-03-25 17:35:36 -04:00
Russell Belfer
3658e81e34 Move crlf conversion into buf_text
This adds crlf/lf conversion functions into buf_text with more
efficient implementations that bypass the high level buffer
functions.  They attempt to minimize the number of reallocations
done and they directly write the buffer data as needed if they
know that there is enough memory allocated to memcpy data.

Tests are added for these new functions.  The crlf.c code is
updated to use the new functions.

Removed the include of buf_text.h from filter.h and just include
it more narrowly in the places that need it.
2013-03-25 14:20:07 -07:00
Russell Belfer
050ab9950d Fix up checkout file contents checks
This fixes of the file contents checks in checkout to give
slightly better error messages by directly calling the underlying
clar assertions so the file and line number of the top level call
can be reported correctly, and renames the helpers to not start
with "test_" since that is kind of reserved by clar.

This also enables some of the CRLF tests on all platforms that
were previously Windows only (by pushing a check of the native
line endings into the test body).
2013-03-25 14:13:53 -07:00
Edward Thomson
4a15ea869c don't convert CRLF to CRCRLF 2013-03-25 14:03:16 -07:00
Russell Belfer
1098cfaeca Test fixes and cleanup
This fixes some places where the new tests were leaving the test
area in a bad state or were freeing data they should not free.
It also removes code that is extraneous to the core issue and
fixes an invalid SHA being looked up in one of the tests (which
was failing, but for the wrong reason).
2013-03-25 14:03:16 -07:00
Sven Strickroth
b8acb775e2 Added some tests for issue #1397
Signed-off-by: Sven Strickroth <email@cs-ware.de>
2013-03-25 14:03:16 -07:00
Russell Belfer
9733e80c2a Add has_cr_in_index check to CRLF filter
This adds a check to the drop_crlf filter path to check it the
file in the index already has a CR in it, in which case this will
not drop the CRs from the workdir file contents.

This uncovered a "bug" in `git_blob_create_fromworkdir` where the
full path to the file was passed to look up the attributes instead
of the relative path from the working directory root.  This meant
that the check in the index for a pre-existing entry of the same
name was failing.
2013-03-25 14:03:16 -07:00
Vicent Marti
13640d1bb8 oid: Do not parse OIDs longer than 40 2013-03-25 21:39:11 +01:00
Vicent Martí
1f10747854 Merge pull request #1428 from xavier-l/nul-terminated-oid
Nul terminated oid
2013-03-25 13:26:50 -07:00
Vicent Marti
c2ea65eec3 clar: Disable online tests. By now. 2013-03-25 21:24:18 +01:00
Russell Belfer
f7110e6ca3 Merge pull request #1427 from Lionelon/development
Fix link issue in network examples
2013-03-25 10:11:32 -07:00
Russell Belfer
c5b72fa2c6 Merge pull request #1435 from mcanes/development
Remove GIT_SUCCESS from documentation
2013-03-25 10:09:03 -07:00
Michael Schubert
f5e28202cb opts: allow configuration of odb cache size
Currently, the odb cache has a fixed size of 128 slots as defined by
GIT_DEFAULT_CACHE_SIZE. Allow users to set the size of the cache via
git_libgit2_opts().

Fixes #1035.
2013-03-25 15:45:56 +01:00
Miquel Canes Gonzalez
c2186230f3 Remove GIT_SUCCESS from documentation 2013-03-24 12:34:00 +01:00
Vicent Martí
3f21a23cc2 Merge pull request #1432 from arrbee/update-clar
Update clar and some test helpers clean up
2013-03-23 12:10:23 -07:00
Russell Belfer
1323c6d180 Add cl_repo_set_bool and cleanup tests
This adds a helper function for the cases where you want to
quickly set a single boolean config value for a repository.
This allowed me to remove a lot of code.
2013-03-22 14:27:56 -07:00
Russell Belfer
3ba0136243 Update cl_assert_equal_sz to be nicer
This makes the size_t comparison test nicer (assuming that the
values are actually not using the full length), and converts
some cases that were using it for pointer comparison to use the
macro that is designed for pointer comparison.
2013-03-22 14:23:38 -07:00
Russell Belfer
7202ec29e9 Update to latest Clar 2013-03-22 14:23:18 -07:00
Carlos Martín Nieto
33a59401c3 graph: make the ahead-behind docs clearer
Explain it in local-upstream branch terms so it's easier to grasp than
with the `one` and `two` naming from the merge-base code.
2013-03-22 20:27:59 +01:00
Xavier L.
b3c174835b Clarified string value 2013-03-21 14:50:28 -03:00
Xavier L
1e7b752375 git_oid_fromstrn already sets a maximum on the length of the string 2013-03-21 12:30:08 -04:00
Xavier L
7e527ca700 Added test case for new function 2013-03-21 12:16:31 -04:00
Xavier L
0c8efb38f9 Added an oid function that accepts nul-terminated strings 2013-03-21 11:59:01 -04:00
lionel vitte
e2886f1e7e Fix link issue in network examples 2013-03-20 21:13:43 +08:00
Philip Kelley
cd01dd5d63 Fix dumb mistake in the comparison function 2013-03-19 15:43:34 -04:00
Philip Kelley
bef2a12cc0 Convert enqueue_object to a function 2013-03-19 15:35:26 -04:00