Commit Graph

4132 Commits

Author SHA1 Message Date
Ben Straub
cd74cbba18 Plug test leaks 2013-01-31 14:38:22 -08:00
Ben Straub
cf7038a65c Enhance url parsing to include passwords 2013-01-31 14:04:21 -08:00
Ben Straub
7602cb7c0e Add user-from-url param to auth callback 2013-01-31 10:44:57 -08:00
Ben Straub
2234b2b031 Stash username from url (but don't use it yet) 2013-01-30 19:03:58 -08:00
Ben Straub
5f10853e90 Skip "user@" when finding hostname in url 2013-01-30 18:52:47 -08:00
Vicent Martí
5f9f69d983 Merge pull request #1297 from arrbee/diff-patch-line-totals
Add helper API for diff line stats from patch
2013-01-30 14:45:12 -08:00
Vicent Martí
a8182d495d Let people know that the ML is deprecated 2013-01-30 12:24:38 -08:00
Russell Belfer
3bf68be443 Free buffer at end of test 2013-01-30 11:25:20 -08:00
Russell Belfer
f1e2735c74 Add helper for diff line stats
This adds a `git_diff_patch_line_stats()` API that gets the total
number of adds, deletes, and context lines in a patch.  This will
make it a little easier to emulate `git diff --stat` and the like.

Right now, this relies on generating the `git_diff_patch` object,
which is a pretty heavyweight way to get stat information.  At
some future point, it would probably be nice to be able to get
this information without allocating the entire `git_diff_patch`,
but that's a much larger project.
2013-01-30 11:10:39 -08:00
Vicent Martí
d204121657 Merge pull request #1296 from arrbee/stricter-config-name-checks
Stricter config entry name validation
2013-01-29 13:57:53 -08:00
Vicent Martí
ea53203c38 Merge pull request #1295 from carlosmn/obsd
Fix p_realpath on OpenBSD
2013-01-29 13:54:30 -08:00
Russell Belfer
4657fc1cab Merge pull request #1285 from phkelley/vector
Vector improvements and their fallout
2013-01-29 13:54:08 -08:00
Philip Kelley
590365db54 Now with no multiply 2013-01-29 16:49:12 -05:00
Russell Belfer
501d35ccf8 Test config name validation
This is @nulltoken's work to test various invalid config section
and key names and make sure we are validating properly.
2013-01-29 12:16:59 -08:00
Russell Belfer
1e7799e8b8 Implement config key validation rules
This is a new implementation of core git's config key checking
rules that prevents non-alphanumeric characters (and '-') for
the top-level section and key names inside of config files.

This also validates the target section name when renaming
sections.
2013-01-29 12:15:18 -08:00
Russell Belfer
17c92beaca Test buf join with NULL behavior explicitly 2013-01-29 12:13:24 -08:00
Carlos Martín Nieto
67fcac567b Fix p_realpath on OpenBSD
OpenBSD's realpath(3) doesn't require the last part of the path to
exist. Override p_realpath in this OS to bring it in line with the
library's assumptions.
2013-01-29 18:46:17 +01:00
Vicent Martí
764b9e7146 Merge pull request #1289 from jwiegley/development
Added git_treebuilder_entrycount
2013-01-28 14:54:19 -08:00
John Wiegley
5fb9820664 Added git_treebuilder_entrycount
Conflicts:
	src/tree.c
2013-01-28 16:35:43 -06:00
Congyi Wu
96447d24f3 Fix 2 bugs in online::push tests.
- Fix stack corruption introduced in 9bccf33c due to passing pointer to
local variable _cred_acquire_called.
- Fix strcmp in do_verify_push_status when expected or actual push_status
  is NULL
2013-01-28 16:56:56 -05:00
Vicent Martí
e1859ea184 Merge pull request #1283 from lznuaa/master
Fix local repository clone failure
2013-01-27 13:15:48 -08:00
Philip Kelley
11d9f6b304 Vector improvements and their fallout 2013-01-27 14:17:07 -05:00
Frank Li
88183c1988 Fix fail clone local repository because can't found object
avoid use object which is already free

Signed-off-by: Frank Li <lznuaa@gmail.com>
2013-01-27 13:36:37 +08:00
Philip Kelley
aa3bf89df2 Fix a mutex leak in pack.c 2013-01-26 15:12:53 -05:00
Philip Kelley
f42beff7e2 Expand valgrind suppressions even more for libssl, libcrypto 2013-01-25 23:39:18 -05:00
Vicent Martí
4adb4815bf Merge pull request #1278 from sba1/cl-assert-equal-s
Use cl_assert_equal_s() instead of strcmp().
2013-01-25 20:37:39 -08:00
Vicent Martí
28db9f216d Merge pull request #1281 from phkelley/valgrind
Improve valgrind suppressions
2013-01-25 20:35:03 -08:00
Philip Kelley
5026aec2b3 Improve valgrind suppressions 2013-01-25 23:24:13 -05:00
Philip Kelley
cfc39f5078 Fix 3 memory leaks 2013-01-25 22:43:52 -05:00
Vicent Martí
ae386101d2 Merge pull request #1279 from carlosmn/config-trailing-backslash
config: support trailing backslashes
2013-01-25 12:02:21 -08:00
Vicent Martí
af2c03a7e9 Merge pull request #1280 from nulltoken/fix/clone-segfault
clone: Prevent segfault upon faulted remote creation
2013-01-25 12:01:36 -08:00
Carlos Martín Nieto
9f35754a0e config: support trailing backslashes
Check whether the backslash at the end of the line is being escaped or
not so as not to consider it a continuation marker when it's e.g. a
Windows-style path.
2013-01-25 13:29:28 +01:00
Michael Schubert
26ec6a6db3 tests-clar: ifdef GIT_WIN32 win helper functions 2013-01-25 13:07:26 +01:00
nulltoken
c5193e3c20 clone: Prevent segfault upon faulted remote creation 2013-01-25 12:26:09 +01:00
Sebastian Bauer
a7f8065f8c Use cl_assert_equal_s() instead of strcmp().
Replaced all cl_assert(!strcmp()) or semantically equivalent forms
by cl_assert_equal_s().
2013-01-25 06:55:56 +01:00
Vicent Martí
c9e9640356 Merge pull request #1277 from sba1/branch-name
Add git_branch_name()
2013-01-24 20:45:00 -08:00
Sebastian Bauer
c253056d24 Added git_branch_name().
This is a convenience function to get the branch name of a given
ref. The returned branch name is compatible with the name that can
be supplied e.g. to git_branch_lookup(). That is, the prefixes
"refs/heads" or "refs/remotes" are omitted.

Also added a new test for testing the new function.
2013-01-25 05:24:21 +01:00
Scott J. Goldman
5425097f03 index: Speed up loading a tree into the index
The index is empty; repeated tree entries cannot collide.

cc github/gitrpc#83
2013-01-24 18:55:39 -08:00
Philip Kelley
2ff4469afc Leak cleanup in push tests 2013-01-24 14:04:35 -05:00
Philip Kelley
3fbd7485d8 Merge pull request #1250 from jamill/push_update_tips
Update remote tips on push
2013-01-24 11:03:11 -08:00
Vicent Martí
ef4ef36e3c Merge pull request #1275 from ethomson/examples_windows
update examples to work on windows
2013-01-23 15:55:29 -08:00
Edward Thomson
c27e211219 update examples to work on windows 2013-01-23 17:38:00 -06:00
Vicent Marti
0d52cb4aea opts: Some basic tests 2013-01-24 00:09:55 +01:00
Vicent Marti
a0f777c87f opts: Add getters too 2013-01-23 23:44:34 +01:00
Vicent Martí
586f71ef2e Merge pull request #1273 from sba1/example-diff-fix
Don't clear the opt instance in the diff example.
2013-01-22 23:03:53 -08:00
Sebastian Bauer
75a0a80029 Don't clear the opt instance in the diff example.
The version field is overwritten otherwise. The opt instance is
already initialized properly.
2013-01-23 07:47:40 +01:00
Vicent Martí
b101fbf9a4 Merge pull request #1271 from libgit2/global-settings
Global options setter
2013-01-22 18:55:56 -08:00
Vicent Marti
59853eff99 Global options setter 2013-01-23 02:58:58 +01:00
Russell Belfer
8958fad770 Merge pull request #1270 from libgit2/packed-peeled-objects-fix
Allow peeled references without trailing newline at end of file
2013-01-22 16:02:43 -08:00
Scott J. Goldman
5c7b77c4f8 Seperate out a new test that verifies packed-refs with no trailing newline
as per @vmg's request
2013-01-22 16:01:03 -08:00