Commit Graph

7459 Commits

Author SHA1 Message Date
Edward Thomson
aea676336c Don't run the ssh clone tests against http remotes 2014-08-14 10:18:20 -05:00
Vicent Marti
fb48a51c63 Merge pull request #2469 from ethomson/transport2
Custom transport: minor cleanups
2014-08-14 17:01:02 +02:00
Edward Thomson
c180c06586 Custom transport: minor cleanups
* Move the transport registration mechanisms into a new header under
   'sys/' because this is advanced stuff.
 * Remove the 'priority' argument from the registration as it adds
   unnecessary complexity.  (Since transports cannot decline to operate,
   only the highest priority transport is ever executed.)  Users who
   require per-priority transports can implement that in their custom
   transport themselves.
 * Simplify registration further by taking a scheme (eg "http") instead
   of a prefix (eg "http://").
2014-08-14 08:52:20 -05:00
Vicent Marti
49d5ec7137 Merge pull request #2517 from ethomson/no_win_unreadable
Don't include the unreadable tests on win32
2014-08-13 23:38:53 +02:00
Edward Thomson
c8402334d2 Don't include the unreadable tests on win32 2014-08-13 17:23:07 -04:00
Vicent Marti
0707feee37 Merge pull request #2513 from ethomson/giterr_null_msg
Allow NULL error message prefix when class=GITERR_OS
2014-08-13 21:23:23 +02:00
Edward Thomson
e62f96dea5 Allow NULL error message prefix when class=GITERR_OS 2014-08-13 14:55:24 -04:00
Linquize
c6ba8a3765 Can read large file larger than 2GB on Windows 2014-08-10 22:00:04 +08:00
Vicent Marti
59403f1ff5 Merge pull request #2509 from libgit2/cmn/immediate-multiline
config: a multiline var can start immediately
2014-08-09 12:24:02 +02:00
Carlos Martín Nieto
9dac1f9579 config: a multiline var can start immediately
In the check for multiline, we traverse the backslashes from the end
backwards and int the end assert that we haven't gone past the beginning
of the line. We make sure of this in the loop condition, but we also
check in the return value.

However, for certain configurations, a line in a multiline variable
might be empty to aid formatting. In that case, 'end' == 'start', since
we ended up looking at the first char which made it a multiline.

There is no need for the (end > start) check in the return, since the
loop guarantees we won't go further back than the first char in the
line, and we do accept the first char to be the final backslash.

This fixes #2483.
2014-08-09 11:06:49 +02:00
Vicent Marti
bb9e6028b8 Merge pull request #2507 from libgit2/rb/timer-typo
Typo in timer constants
2014-08-09 00:35:08 +02:00
Rob Rix
bbe13802b7 Demonstrate a trailing slash failure.
`git help ignore` has this to say about trailing slashes:

> If the pattern ends with a slash, it is removed for the purpose of
> the following description, but it would only find a match with a
> directory. In other words, foo/ will match a directory foo and
> paths underneath it, but will not match a regular file or a
> symbolic link foo (this is consistent with the way how pathspec
> works in general in Git).

Sure enough, having manually performed the same steps as this test,
`git status` tells us the following:

	# On branch master
	#
	# Initial commit
	#
	# Changes to be committed:
	#   (use "git rm --cached <file>..." to unstage)
	#
	#	new file:   force.txt
	#
	# Untracked files:
	#   (use "git add <file>..." to include in what will be committed)
	#
	#	../.gitignore
	#	child1/
	#	child2/

i.e. neither child1 nor child2 is ignored.
2014-08-08 15:19:16 -07:00
Russell Belfer
a0cacc82d5 For negative matches, always use leading dir match 2014-08-08 15:19:15 -07:00
Carlos Martín Nieto
aa5cdf63bf status: failing test with slash-star
When writing 'bin/*' in the rules, this means we ignore very file inside
bin/ individually, but do not ignore the directory itself. Thus the
status listing should list both files under bin/, one untracked and one
ignored.
2014-08-08 14:53:22 -07:00
Russell Belfer
f25bc0b2e6 Fix rejection of parent dir of negated ignores
While scanning through a directory hierarchy, this prevents a
positive ignore match on a parent directory from blocking the scan
of a directory when a negative match rule exists for files inside
the directory.
2014-08-08 14:51:36 -07:00
Vicent Marti
35f186b6ca Merge pull request #2506 from libgit2/rb/ignore-pipes-etc
Don't report status on named pipes
2014-08-08 22:28:27 +02:00
Russell Belfer
f18234fad6 Don't report status on named pipes
Git skips entries in directories that are not S_ISDIR, S_ISREG, or
S_ISLNK, so let's make libgit2 do the same thing.
2014-08-08 13:17:50 -07:00
Vicent Marti
8f759ac0b3 Merge pull request #2471 from jacquesg/compatibility-cleanup
Compatibility/Portability cleanup
2014-08-07 18:00:57 +02:00
Russell Belfer
3822d2cc4f Fix typo in timer normalization constants
The effect of this would be that various update callbacks would
not be made at the correct interval.
2014-08-05 15:06:45 -07:00
Jacques Germishuys
07d03d3145 Introduce some consistency in definition/declaration ordering 2014-08-05 20:52:00 +02:00
Jacques Germishuys
662f90e6ec Move p_realpath logic to realpath.c 2014-08-05 20:52:00 +02:00
Jacques Germishuys
c7dd0a56bf Use p_snprintf also in tests 2014-08-05 20:51:59 +02:00
Jacques Germishuys
c983604eb1 Consistently use p_snprintf 2014-08-05 20:51:59 +02:00
Jacques Germishuys
2f795d8fc5 Cleanup portability/compatibility layer
* Removes mingw-compat.h
* Cleans up separation of compiler/platform idiosyncrasies
* Unifies mingw/msvc stat structures and functions
* (Tries to) hide more compiler specific implementation details (even in our internal API)
2014-08-05 20:51:59 +02:00
Jacques Germishuys
d07fd4425f Define WINHTTP_IGNORE_REQUEST_TOTAL_LENGTH if not defined 2014-08-05 20:51:59 +02:00
Jacques Germishuys
959a93e716 Silence unused variables warnings 2014-08-05 20:51:59 +02:00
Vicent Marti
e0af2517bf Merge pull request #2503 from jacquesg/solaris-http-parser
Solaris doesn't necessarily have stdint.h, use inttypes.h
2014-08-05 20:28:22 +02:00
Jacques Germishuys
66d1595436 Solaris doesn't necessarily have stdint.h, use inttypes.h 2014-08-05 19:51:29 +02:00
Sven Strickroth
b8add6c42e Allow to propagate checkout callbacks to git HARD reset
Signed-off-by: Sven Strickroth <email@cs-ware.de>
2014-08-03 16:29:51 +02:00
Carlos Martín Nieto
7db0e6ee48 merge: expose multiple merge bases
We always calculate multiple merge bases, but up to now we had only
exposed the "best" merge base.

Introduce git_oidarray which analogously to git_strarray lets us return
multiple ids.
2014-07-27 17:17:22 +02:00
Vicent Marti
59e3f45b61 Merge pull request #2487 from libgit2/cmn/revwalk-no-prealloc
Work around strict aliasing in array growth
2014-07-25 11:27:51 +02:00
Carlos Martín Nieto
b62a6a13b2 array: mark the array to grow as volatile
This works around strict aliasing rules letting some versions of
GCC (particularly on RHEL 6) thinking that they can skip updating the
size of the array when calculating the next element's offset.
2014-07-25 08:25:41 +02:00
Carlos Martín Nieto
9746b36cf9 revwalk: remove preallocation of the uninteresting commits
Preallocating two commits doesn't make much sense as leaving allocation
to the first array usage will allocate a sensible size with room for
growth.

This preallocation has also been hiding issues with strict aliasing in
the tests, as we have fairly simple histories and never trigger the
growth.
2014-07-24 17:52:28 +02:00
Vicent Marti
9de6ec5200 Merge pull request #2477 from ethomson/merge
Don't allow conflicts by default
2014-07-23 09:41:52 +02:00
Vicent Marti
243db06ce3 Merge pull request #2484 from libgit2/fix-git-status-list-new-unreadable-folder
Fix git status list new unreadable folder
2014-07-23 07:57:20 +02:00
Alan Rogers
85b7268e38 undo indentation change in diff_print.c 2014-07-23 12:17:02 +10:00
Vicent Marti
bf9a7e0607 Merge pull request #2485 from ethomson/cherrypick
Rename git_cherry_pick to git_cherrypick
2014-07-22 20:30:26 +02:00
Edward Thomson
0ba4dca526 git_cherry_pick -> git_cherrypick 2014-07-22 10:40:23 -04:00
Alan Rogers
7d0ab0fae0 Merge remote-tracking branch 'origin/master' into fix-git-status-list-new-unreadable-folder 2014-07-22 15:08:24 +10:00
Alan Rogers
e824e63de6 Remove debug printfs. 2014-07-22 11:25:56 +10:00
Alan Rogers
35b1471f01 Move the UNREADABLE enums to the correct group. 2014-07-22 11:17:42 +10:00
Edward Thomson
994404b506 Don't allow conflicts by default 2014-07-17 01:25:31 -04:00
Vicent Marti
091165c53b Merge pull request #2475 from libgit2/expose-buffer-binary-detection
Export git_buf_text_is_binary and git_buf_text_contains_nul.
2014-07-16 14:21:53 -07:00
joshaber
b3af2d80d2 Just put it all in buffer. 2014-07-16 13:34:25 -07:00
Vicent Marti
ec813d83e7 Merge pull request #2476 from linquize/config-lf-eof
When adding new config section, handle config file not ending with LF
2014-07-16 13:07:17 -07:00
Vicent Marti
8baeb8a480 ssh: Fix unused warning 2014-07-16 13:03:34 -07:00
Vicent Marti
84a85d1bec clone: should_clone? Of course we should clone. That's not the question 2014-07-16 13:03:07 -07:00
Vicent Marti
ed99e0b54f Merge pull request #2467 from ethomson/win_local_clone
Handle local file:/// paths on Windows
2014-07-16 13:00:15 -07:00
Linquize
693748694b Add unit test to test add section without lf at EOF 2014-07-16 21:54:53 +08:00
Linquize
991dab2dd0 Make sure \n is at the end of config file before a new section is written 2014-07-16 21:09:53 +08:00