Commit Graph

7581 Commits

Author SHA1 Message Date
Edward Thomson
ddf9532498 Merge pull request #2783 from libgit2/cmn/treebuilder-new
treebuilder: rename _create() to _new()
2014-12-29 09:30:05 -06:00
Edward Thomson
61cf3823e3 Merge pull request #2777 from sba1/amigaos-get-timer
Added git__timer() variant for AmigaOS.
2014-12-29 09:26:57 -06:00
Sebastian Bauer
7cf86f923a Added AmigaOS-specific implementation of git__timer().
The clock_gettime() function is normally not available under
AmigaOS, hence another solution is required. We are using now
GetUpTime() that is present in current versions of this
operating system.
2014-12-28 10:35:47 +01:00
Carlos Martín Nieto
208a2c8aef treebuilder: rename _create() to _new()
This function is a constructor, so let's name it like one and leave
_create() for the reference functions, which do create/write the
reference.
2014-12-27 12:09:11 +00:00
Carlos Martín Nieto
aad27e6ef6 Add a few missing CHANGELOG entries 2014-12-27 11:56:00 +00:00
Carlos Martín Nieto
5692dcf181 Merge pull request #2772 from ethomson/case_changing_rename
Case changing rename
2014-12-24 06:24:42 +00:00
Carlos Martín Nieto
171c2ff121 Merge pull request #2778 from ethomson/whitespace_85
don't treat 0x85 as whitespace
2014-12-24 06:23:36 +00:00
Carlos Martín Nieto
d6398d3558 Merge pull request #2779 from ethomson/openssl_export
global: include sys/openssl.h for GIT_EXPORT of fn
2014-12-24 06:19:02 +00:00
Edward Thomson
73f0278e5d global: include sys/openssl.h for GIT_EXPORT of fn
The openssl setup function needs to be GIT_EXPORT'ed, be sure
to include the `sys/openssl.h` header so that it is appropriately
decorated as an export function.
2014-12-23 16:40:01 -06:00
Edward Thomson
fe5f7722f5 don't treat 0x85 as whitespace
A byte value of 0x85 is not whitespace, we were conflating that with
U+0085 (UTF8: 0xc2 0x85).  This caused us to incorrectly treat valid
multibyte characters like U+88C5 (UTF8: 0xe8 0xa3 0x85) as whitespace.
2014-12-23 11:27:01 -06:00
Edward Thomson
40d791545a Always checkout with case sensitive iterator
On a case-insensitive filesystem, we need to deal with case-changing
renames (eg, foo -> FOO) by removing the old and adding the new,
exactly as if we were on a case-sensitive filesystem.

Update the `checkout::tree::can_cancel_checkout_from_notify` test, now
that notifications are always sent case sensitively.
2014-12-23 10:14:04 -06:00
Edward Thomson
61ee5b0e57 Introduce test for checkout case-changing rename 2014-12-23 10:14:01 -06:00
Carlos Martín Nieto
e8cd432123 Merge pull request #2775 from ethomson/index_entrycounts
index: reuc and name entrycounts should be size_t
2014-12-23 14:09:01 +00:00
Edward Thomson
2fe8157e1b index: reuc and name entrycounts should be size_t
For the REUC and NAME entries, we use size_t internally, and we take
size_t for the get_byindex() functions, but the entrycount() functions
strangely cast to an unsigned int instead.
2014-12-22 18:42:03 -06:00
Edward Thomson
0bb237ed89 Merge pull request #2773 from ethomson/findpkgconfig
cmake: include FindPkgConfig for windows
2014-12-22 13:10:04 -06:00
Edward Thomson
6e1205ef62 cmake: include FindPkgConfig for windows
Apparently FindPkgConfig is not included by default on VS builds,
only Unix and Unix-like (mingw) builds.
2014-12-22 12:40:04 -06:00
Edward Thomson
62d66a4ac5 Merge pull request #2745 from libgit2/cmn/pkg-config-ssh
Find libssh2 via pkg-config
2014-12-22 10:22:03 -06:00
Edward Thomson
d147900ea4 Merge pull request #2759 from libgit2/cmn/openssl-sys
Make OpenSSL locking warnings more severe
2014-12-20 21:24:45 -06:00
Edward Thomson
25a03d4ad4 Merge pull request #2760 from libgit2/cmn/init-readme
Mention the init function in the README
2014-12-20 21:23:55 -06:00
Edward Thomson
c7d9839f54 Merge pull request #2763 from libgit2/cmn/local-proto-progress
Show progress output on fetch for the local transport
2014-12-20 21:22:30 -06:00
Edward Thomson
0de26b7c4a Merge pull request #2767 from linquize/winpath
More Windows Path checking
2014-12-20 21:18:15 -06:00
Carlos Martín Nieto
6afc0bfad9 Merge pull request #2768 from dprofeta/fix/c++-refs
Fix public header on sys/refs.h
2014-12-20 08:06:48 +00:00
Linquize
6987a580f7 Add more Windows reserved filenames 2014-12-19 23:54:42 +08:00
Linquize
6fd00266a8 COM0 is a valid path, although Windows Explorer does not allow to create this 2014-12-19 23:54:01 +08:00
Damien PROFETA
ceb651c9b0 Fix public header on sys/refs.h
GIT_BEGIN/END_DECL were missing from sys/refs.h and preventing
compilation with g++ as the symbol were mangled.
2014-12-19 15:31:49 +01:00
Carlos Martín Nieto
629417bd10 Fix ming32 compilation
We need to know what wchar_t and MAX_PATH are. Including common.h takes
care of that for us.
2014-12-19 08:08:47 +00:00
Edward Thomson
ddf9d7d455 Merge branch 'hf/master_patch' 2014-12-18 21:12:05 -06:00
Vicent Marti
247b3f4ee5 Merge remote-tracking branch 'origin/master_patch' 2014-12-18 21:47:22 +01:00
Edward Thomson
2842831800 index tests: test capitalization before mkdir 2014-12-18 12:41:59 -06:00
Carlos Martín Nieto
c90ed5b558 Plug leaks 2014-12-18 02:11:06 +01:00
Carlos Martín Nieto
c679bf42f5 Create miscapitialised dirs for case-sensitive filesystems
We need these directories to exist so cl_git_mkfile() can create the
files we ask it to.
2014-12-18 02:07:36 +01:00
Edward Thomson
dce7b1a4e7 treebuilder: take a repository for path validation
Path validation may be influenced by `core.protectHFS` and
`core.protectNTFS` configuration settings, thus treebuilders
can take a repository to influence their configuration.
2014-12-17 13:05:27 -05:00
Edward Thomson
ec74b40cee Introduce core.protectHFS and core.protectNTFS
Validate HFS ignored char ".git" paths when `core.protectHFS` is
specified.  Validate NTFS invalid ".git" paths when `core.protectNTFS`
is specified.
2014-12-17 12:52:07 -05:00
Vicent Marti
8e35527de2 path: Use UTF8 iteration for HFS chars 2014-12-16 10:24:18 -06:00
Edward Thomson
11d67b754d checkout: disallow bad paths on HFS
HFS filesystems ignore some characters like U+200C.  When these
characters are included in a path, they will be ignored for the
purposes of comparison with other paths.  Thus, if you have a ".git"
folder, a folder of ".git<U+200C>" will also match.  Protect our
".git" folder by ensuring that ".git<U+200C>" and friends do not match it.
2014-12-16 10:08:59 -06:00
Edward Thomson
ee5da720e5 reference_create: validate loose names
Validate loose reference names on Win32.
2014-12-16 10:08:56 -06:00
Edward Thomson
a64119e396 checkout: disallow bad paths on win32
Disallow:
 1. paths with trailing dot
 2. paths with trailing space
 3. paths with trailing colon
 4. paths that are 8.3 short names of .git folders ("GIT~1")
 5. paths that are reserved path names (COM1, LPT1, etc).
 6. paths with reserved DOS characters (colons, asterisks, etc)

These paths would (without \\?\ syntax) be elided to other paths - for
example, ".git." would be written as ".git".  As a result, writing these
paths literally (using \\?\ syntax) makes them hard to operate with from
the shell, Windows Explorer or other tools.  Disallow these.
2014-12-16 10:08:53 -06:00
Vicent Marti
0d388adc86 index: Check for valid paths before creating an index entry 2014-12-16 10:08:49 -06:00
Vicent Marti
62155257d2 tree: Check for .git with case insensitivy 2014-12-16 10:08:46 -06:00
Edward Thomson
cceae9a25d win32: use NT-prefixed "\\?\" paths
When turning UTF-8 paths into UCS-2 paths for Windows, always use
the \\?\-prefixed paths.  Because this bypasses the system's
path canonicalization, handle the canonicalization functions ourselves.

We must:
 1. always use a backslash as a directory separator
 2. only use a single backslash between directories
 3. not rely on the system to translate "." and ".." in paths
 4. remove trailing backslashes, except at the drive root (C:\)
2014-12-16 10:08:43 -06:00
Carlos Martín Nieto
4fd2bda9ff local: send 'counting objects' output
Pretend we have a git process at the other end by creating a similar
progress output when inserting objects into the packbuilder.
2014-12-16 10:25:45 +01:00
Carlos Martín Nieto
3ded7f28c7 local: add failing test for sideband information
We do not currently generate any messages when we're counting the
objects, as might be expected from a local upload-pack. Assert that we
do call the function when working.
2014-12-16 10:05:49 +01:00
Carlos Martín Nieto
ed09e04462 Mention the init function in the README
This fixes #2731.
2014-12-14 16:19:08 +01:00
Carlos Martín Nieto
5192bcc52c Add the OpenSSL changes to the CHANGELOG
It seems these were forgotten when initially splitting this up.
2014-12-12 15:46:57 +01:00
Carlos Martín Nieto
263b1d6ed9 Make the OpenSSL locking function warnings more severe
Our git_openssl_set_locking() would ideally not exist. Make it clearer
that we provide it as a last resort and you should prefer anything else.
2014-12-12 15:46:57 +01:00
Edward Thomson
09debe1213 clar: wide character comparisons 2014-12-10 18:11:50 -05:00
Edward Thomson
3410084675 tests: use p_ instead of posix func directly 2014-12-10 18:11:50 -05:00
Edward Thomson
4eb97ef3bf Merge pull request #2756 from libgit2/cmn/push-error-concerns
Fold `git_push_unpack_ok()` into `git_push_finish()`
2014-12-10 14:15:15 -05:00
Carlos Martín Nieto
85a6d5f49c push: reword comment on finish()
This should make it clearer what the return value implies.
2014-12-10 18:55:54 +01:00
Carlos Martín Nieto
d524b2d3d1 push: fold unpack_ok() into finish()
The push cannot be successful if we sent a bad packfile. We should
return an error in that case instead of storing it elsewhere.
2014-12-10 18:55:54 +01:00