|
92a47824
|
2015-09-22T23:10:56
|
|
win32: propogate filename too long errors
|
|
aebddbe7
|
2015-09-21T06:01:03
|
|
Merge pull request #3434 from ethomson/reservednames
Win32 Reserved names: don't reserve names outside the working directory
|
|
538dfc88
|
2015-09-17T18:12:05
|
|
repository: only reserve repo dirs in the workdir
Check that the repository directory is beneath the workdir before
adding it to the list of reserved paths. If it is not, then there
is no possibility of checking out files into it, and it should not
be a reserved word.
This is a particular problem with submodules where the repo directory
may be in the super's .git directory.
|
|
cd677b8f
|
2015-09-18T12:28:05
|
|
config: buffer comments to match git's variable-adding
When there is a comment at the end of a section, git keeps it there,
while we write the new variable right at the end.
Keep comments buffered and dump them when we're going to output a
variable or section, or reach EOF. This puts us in line with the config
files which git produces.
|
|
9ce2e7b3
|
2015-09-17T12:48:37
|
|
`mkdir`: cope with root path on win32
|
|
e164ddb1
|
2015-09-17T12:23:19
|
|
win32: return EACCES in `p_lstat`
Don't coalesce all errors into ENOENT. At least identify EACCES.
All callers should be handling this case already, as the POSIX
`lstat` will return this.
|
|
81aaf370
|
2015-09-17T11:26:38
|
|
mkdir: chmod existing paths with `GIT_MKDIR_CHMOD`
|
|
e24c60db
|
2015-09-17T09:42:05
|
|
mkdir: find component paths for mkdir_relative
`git_futils_mkdir` does not blindly call `git_futils_mkdir_relative`.
`git_futils_mkdir_relative` is used when you have some base directory
and want to create some path inside of it, potentially removing blocking
symlinks and files in the process. This is not suitable for a general
recursive mkdir within the filesystem.
Instead, when `mkdir` is being recursive, locate the first existent
parent directory and use that as the base for `mkdir_relative`.
|
|
0862ec2e
|
2015-09-17T09:58:38
|
|
core::mkdir tests: ensure we don't stomp symlinks in mkdir
In `mkdir` and `mkdir_r`, ensure that we don't try to remove symlinks
that are in our way.
|
|
ac2fba0e
|
2015-09-16T15:07:27
|
|
git_futils_mkdir_*: make a relative-to-base mkdir
Untangle git_futils_mkdir from git_futils_mkdir_ext - the latter
assumes that we own everything beneath the base, as if it were
being called with a base of the repository or working directory,
and is tailored towards checkout and ensuring that there is no
bogosity beneath the base that must be cleaned up.
This is (at best) slow and (at worst) unsafe in the larger context
of a filesystem where we do not own things and cannot do things like
unlink symlinks that are in our way.
|
|
eea7c850
|
2015-09-16T05:44:27
|
|
checkout: overwrite files with differing modes
When a file exists on disk and we're checking out a file that differs
in executableness, remove the old file. This allows us to recreate the
new file with p_open, which will take the new mode into account and
handle setting the umask properly.
Remove any notion of chmod'ing existing files, since it is now handled
by the aforementioned removal and was incorrect, as it did not take
umask into account.
|
|
b0885675
|
2015-09-13T23:21:14
|
|
Merge pull request #3425 from ethomson/diriter_root
Handle `git_path_diriter` instances at the drive root on Windows
|
|
9d905541
|
2015-09-13T14:18:08
|
|
diriter: don't double '/' on posix
The canonical directory path of the root directory of a volume on
POSIX already ends in a slash (eg, `/`). This is true only at the
root. Do not add a slash to paths in this case.
|
|
26d7cf6e
|
2015-09-11T18:27:04
|
|
iterator: loop fs_iterator advance (don't recurse)
|
|
5a466bef
|
2015-09-13T13:59:41
|
|
diriter: don't double '/' on Windows
The canonical directory path of the root directory of a volume on
windows already ends in a slash (eg, `c:/`). This is true only
at the volume root. Do not add a slash to paths in this case.
|
|
e78aeefa
|
2015-09-13T19:43:39
|
|
Merge pull request #3420 from ethomson/iterator
iterator: advance the tree iterator smartly
|
|
548cb334
|
2015-09-13T16:32:24
|
|
Don't free config in `git_transaction_commit`.
The config is not owned by the transaction, so please don’t free it.
|
|
1e80bf27
|
2015-09-13T06:21:18
|
|
Merge branch 'cmn/ignore-dir-check'
|
|
657afd35
|
2015-09-13T06:18:49
|
|
ignore: add test and adjust style and comment for dir with wildmatch
The previous commit left the comment referencing the earlier state of
the code, change it to explain the current logic. While here, change the
logic to avoid repeating the copy of the base pattern.
|
|
305407e1
|
2015-09-13T06:03:12
|
|
Merge pull request #3370 from libgit2/cmn/submodule-refactor
submodule: refactor to be more explicit in the search
|
|
8ab4d0e1
|
2015-09-12T15:32:18
|
|
diff: check pathspec on non-files
When we're not doing pathspec matching, we let the iterator handle
file matching for us. However, we can only trust the iterator to
return *files* that match the pattern, because the iterator must
return directories that are not strictly in the pathlist, but that
are the parents of files that match the pattern, so that diff can
later recurse into them.
Thus, diff must examine non-files explicitly before including them
in the delta list.
|
|
220d6f8a
|
2015-09-11T20:06:14
|
|
mempack: expose clear function
|
|
707f6537
|
2015-09-11T16:35:14
|
|
Removing memory leak in mempack's free
It calls git_mempack_reset which reallocates the object array. git_oidmap_free is now called on it explicitly.
|
|
a1859e21
|
2015-09-11T17:38:28
|
|
iterator: advance the tree iterator smartly
While advancing the tree iterator, if we advance over things that
we aren't interested in, then call `current`. Which may *itself*
call advance.
While advancing the tree iterator, if we advance over things that
we aren't interested in, then call `current`. Which may *itself*
call advance.
While advancing the tree iterator, if we advance over things that
we aren't interested in, then call `current`. Which may *itself*
call advance.
While advancing the tree iterator, if we advance over things that
we aren't interested in, then call `current`. Which may *itself*
call advance.
While advancing the tree iterator, if we advance over things that
we aren't interested in, then call `current`. Which may *itself*
call advance.
Error: stack overflow.
|
|
8e177b2b
|
2015-09-10T14:44:52
|
|
Fixing dangling pointers in git_mempack_reset
git_mempack_reset was leaving free'd pointers in the oidmap.
|
|
f17525b0
|
2015-08-10T18:36:27
|
|
submodule: refactor to be more explicit in the search
When searching for information about a submdoule, let's be more explicit
in what we expect to find. We currently insert a submodule into the map
and change certain parameters when the config callback gets called.
Switch to asking for the configuration we're interested in, rather than
taking it in an arbitrary order.
|
|
6c21211c
|
2015-09-09T13:59:38
|
|
Merge pull request #3379 from theseion/additional_libssh2_error_reporting
report libssh2 error if list of authentication methods can't be retrieved
|
|
6d6020de
|
2015-09-08T18:34:51
|
|
Merge pull request #3353 from ethomson/wrongcase_add
index: canonicalize directory case when adding
|
|
2964cbea
|
2015-09-08T11:50:08
|
|
Merge pull request #3381 from leoyanggit/index_directory_iterator
New feature: add the ablility to iterate through a directory in index
|
|
a32bc85e
|
2015-08-07T12:43:49
|
|
git_index_add: allow case changing renames
On case insensitive platforms, allow `git_index_add` to provide a new
path for an existing index entry. Previously, we would maintain the
case in an index entry without the ability to change it (except by
removing an entry and re-adding it.)
Higher-level functions (like `git_index_add_bypath` and
`git_index_add_frombuffers`) continue to keep the old path for easier
usage.
|
|
280adb3f
|
2015-08-04T16:51:00
|
|
index: canonicalize directory case when adding
On case insensitive systems, when given a user-provided path in the
higher-level index addition functions (eg `git_index_add_bypath` /
`git_index_add_frombuffer`), examine the index to try to match the
given path to an existing directory.
Various mechanisms can cause the on-disk representation of a folder
to not match the representation in HEAD or the index - for example,
a case changing rename of some file `a/file.txt` to `A/file.txt`
will update the paths in the index, but not rename the folder on
disk.
If a user subsequently adds `a/other.txt`, then this should be stored
in the index as `A/other.txt`.
|
|
e1d27bca
|
2015-09-06T10:51:29
|
|
Merge pull request #3413 from libgit2/cmn/follow-symlink
filebuf: follow symlinks when creating a lock file
|
|
9fd4c9c8
|
2015-09-06T10:50:22
|
|
Merge pull request #3366 from libgit2/cmn/index-hashmap
Use a hashmap for path-based lookups in the index
|
|
d83b2e9f
|
2015-09-05T03:54:06
|
|
filebuf: follow symlinks when creating a lock file
We create a lockfile to update files under GIT_DIR. Sometimes these
files are actually located elsewhere and a symlink takes their place. In
that case we should lock and update the file at its final location
rather than overwrite the symlink.
|
|
c097f717
|
2015-08-17T15:02:02
|
|
New API: git_index_find_prefix
Find the first index entry matching a prefix.
|
|
81b76367
|
2015-09-04T13:30:49
|
|
index: put the icase insert choice in macros
This should let us see more clearly what we're doing and avoid the ugly
'if' we need every time we want to interact with the map.
|
|
21e7015c
|
2015-09-01T02:26:11
|
|
Merge pull request #3402 from ethomson/faster_diff
Provide path matching in the iterators (for faster diffs)
|
|
d53c8880
|
2015-08-30T19:25:47
|
|
iterator: saner pathlist matching for idx iterator
Some nicer refactoring for index iteration walks.
The index iterator doesn't binary search through the pathlist space,
since it lacks directory entries, and would have to binary search
each index entry and all its parents (eg, when presented with an index
entry of `foo/bar/file.c`, you would have to look in the pathlist for
`foo/bar/file.c`, `foo/bar` and `foo`). Since the index entries and the
pathlist are both nicely sorted, we walk the index entries in lockstep
with the pathlist like we do for other iteration/diff/merge walks.
|
|
56ed415a
|
2015-08-30T19:10:00
|
|
diff: drop `FILELIST_MATCH`
Now that non-pathspec matching diffs are implemented at the iterator
level, drop `FILELIST_MATCH`ing.
|
|
7b73739f
|
2015-08-30T18:56:39
|
|
checkout: use pathlist-based iterators
|
|
1af84271
|
2015-08-30T18:35:57
|
|
tree_iterator: use a pathlist
|
|
4a0dbeb0
|
2015-08-30T17:06:26
|
|
diff: use new iterator pathlist handling
When using literal pathspecs in diff with `GIT_DIFF_DISABLE_PATHSPEC_MATCH`
turn on the faster iterator pathlist handling.
Updates iterator pathspecs to include directory prefixes (eg, `foo/`)
for compatibility with `GIT_DIFF_DISABLE_PATHSPEC_MATCH`.
|
|
aa06ecaf
|
2015-08-28T19:30:08
|
|
Merge pull request #3352 from ethomson/hidden
win32: ensure hidden files can be staged
|
|
6c9352bf
|
2015-08-28T18:30:39
|
|
iterator: sort subdirs properly with pathlist
When given a pathlist, don't assume that directories sort before
files. Walk through any list of entries sorting before us to make
sure that we've exhausted all entries that *aren't* directories.
Eg, if we're searching for 'foo/bar', and we have a 'foo.c', keep
advancing the pathlist to keep looking for an entry prefixed with
'foo/'.
|
|
810cabb9
|
2015-07-28T20:04:11
|
|
racy-git: TODO to use improved diffing
|
|
ef206124
|
2015-07-28T19:55:37
|
|
Move filelist into the iterator handling itself.
|
|
ed1c6446
|
2015-07-28T11:41:27
|
|
iterator: use an options struct instead of args
|
|
19475924
|
2015-08-25T00:39:58
|
|
Merge pull request #3355 from palmin/palmin/fix-2830
Include the 4 characters not recognised as hex-number in parse_len
|
|
6d0defe3
|
2015-08-24T18:47:48
|
|
Fix 'If we're dealing with a directory' check
|
|
57af0b92
|
2015-08-19T00:46:28
|
|
cred: add a free function wrapper
|
|
47ed7e5a
|
2015-08-18T20:55:59
|
|
transport: provide a way to get the callbacks
libgit2 implementations of smart subtransports can simply reach through
the structure, but external implementors cannot.
Add these two functions as a way for the smart subtransports to get the
callbacks as set by the user.
|
|
26ea28f3
|
2015-08-17T15:18:47
|
|
Fix build warning: implicit declaration of function ‘git_transaction_config_new’
|
|
2d1d2bb5
|
2015-08-05T18:50:25
|
|
Include the 4 characters not recognised as hex-number when setting error in parse_len
|
|
252f86e1
|
2015-08-15T13:46:32
|
|
Merge pull request #3377 from dleehr/fix-push-cb
Fix bug in git_smart__push: push_transfer_progress cb is only called at end
|
|
0ba62ba5
|
2015-08-15T13:43:46
|
|
Merge pull request #3384 from libgit2/cmn/regex-nofail
diff: don't error out on an invalid regex
|
|
e451cd5c
|
2015-08-15T18:46:38
|
|
diff: don't error out on an invalid regex
When parsing user-provided regex patterns for functions, we must not
fail to provide a diff just because a pattern is not well
formed. Ignore it instead.
|
|
11bca2d2
|
2015-08-15T18:15:23
|
|
http: propagate the credentials callback's error code
When we ask for credentials, the user may choose to return EUSER to
indicate that an error has happened on its end and it wants to be given
back control.
We must therefore pass that back to the user instead of mentioning that
it was on_headers_complete() that returned an error code. Since we can,
we return the exact error code from the user (other than PASSTHROUGH)
since it doesn't cost anything, though using other error codes aren't
recommended.
|
|
755004ea
|
2015-08-14T22:12:59
|
|
Merge pull request #3362 from libgit2/cmn/curl-proxyauth-any
curl: use the most secure auth method for the proxy
|
|
af1d5239
|
2015-08-14T21:10:12
|
|
index: keep a hash table as well as a vector of entries
The hash table allows quick lookup of specific paths, while we use the
vector for enumeration.
|
|
ac02a694
|
2015-08-14T21:06:09
|
|
Add a hashmap for index entries
They are hashed case-insensitively and take the stage into account.
|
|
241414ee
|
2015-08-14T15:42:59
|
|
added a single line of additional error reporting from libssh2 when failing to retrieve the list of authentication methods
|
|
b0b2c722
|
2015-08-13T22:52:52
|
|
Fix bug in git_smart__push: push_transfer_progress cb is never called
The conditional checked cbs->transfer_progress then used the value in cbs->push_transfer_progress. In both cases it should be push_transfer_progress
|
|
9f1af7f2
|
2015-08-13T10:22:50
|
|
Merge pull request #3168 from libgit2/cmn/config-tx
Locking and transactional/atomic updates for config
|
|
5340d63d
|
2015-07-12T12:50:23
|
|
config: perform unlocking via git_transaction
This makes the API for commiting or discarding changes the same as for
references.
|
|
36f784b5
|
2015-06-01T20:02:23
|
|
config: expose locking via the main API
This lock/unlock pair allows for the cller to lock a configuration file
to avoid concurrent operations.
It also allows for a transactional approach to updating a configuration
file. If multiple updates must be made atomically, they can be done
while the config is locked.
|
|
b1667039
|
2015-06-01T19:17:03
|
|
config: implement basic transactional support
When a configuration file is locked, any updates made to it will be done
to the in-memory copy of the file. This allows for multiple updates to
happen while we hold the lock, preventing races during complex
config-file manipulation.
|
|
3ce9e4d2
|
2015-06-01T08:45:15
|
|
config: write the modified file to memory
Instead of writing into the filebuf directly, make the functions to
write the modified config file write into a buffer which can then be
dumped into the lockfile for committing.
This allows us to re-use the same code for modifying a locked
configuration, as we can simply skip the last step of dumping the data
to disk.
|
|
e3e017d4
|
2015-08-11T22:51:53
|
|
remote: don't confuse tag auto-follow rules with refspec matching
When we're looking to update a tag, we can't stop if the tag auto-follow
rules don't say to update it. The tag might still match the refspec we
were given.
|
|
dc035189
|
2015-08-06T13:02:35
|
|
curl: use the most secure auth method for the proxy
When curl uses a proxy, it will only use Basic unless we prompt it to
try to use the most secure on it has available.
This is something which git did recently, and it seems like a good idea.
|
|
eba784d2
|
2015-08-05T10:19:06
|
|
Fix duplicate basenames to support older VS
With Visual Studio versions 2008 and older they ignore the full path to files and only check
the basename of the file to find a collision. Additionally, having duplicate basenames can break
other build tools like GYP.
This fixes https://github.com/libgit2/libgit2/issues/3356
|
|
ef4857c2
|
2015-08-03T16:50:27
|
|
errors: tighten up git_error_state OOMs a bit more
When an error state is an OOM, make sure that we treat is specially
and do not try to free it.
|
|
bdec3363
|
2015-08-03T17:48:33
|
|
win32: ensure hidden files can be staged
|
|
854b701c
|
2015-08-03T15:02:02
|
|
Merge remote-tracking branches 'upstream/pr/3323' and 'upstream/pr/3329'
|
|
0fcfb60d
|
2015-07-27T10:10:18
|
|
Make giterr_restore aware of g_git_oom_error
Allow restoring a previously captured oom error, by
detecting when the captured message pointer points to the
static oom error message. This means there is no need
to strdup the message in giterr_detach.
|
|
25dbcf34
|
2015-07-27T09:59:07
|
|
Make giterr_detach no longer public
|
|
c2f17bda
|
2015-07-23T13:17:08
|
|
Ensure static oom error message not detached
Error messages that are detached are assumed to be dynamically
allocated. Passing a pointer to the static oom error message
can cause an attempt to free the static buffer later. This change
checks if the oom error message is about to be detached and detaches
a copy instead.
|
|
69adb781
|
2015-08-03T08:33:53
|
|
Merge pull request #3325 from libgit2/cmn/filebuf-rename-error
filebuf: remove lockfile upon rename errors
|
|
0dd8daea
|
2015-08-03T08:17:47
|
|
Merge pull request #3344 from libgit2/cmn/add-unreg-submodule
index: stage an unregistered submodule as well
|
|
ac728c24
|
2015-08-03T07:38:07
|
|
Handle ssh:// and git:// urls containing a '~' character.
For such a path '/~/...' the leading '/' is stripped so the server will
get a path starting with '~' and correctly handle it.
|
|
ea961abf
|
2015-08-01T19:53:53
|
|
index: stage an unregistered submodule as well
We previously added logic to `_add_bypath()` to update a submodule. Go
further and stage the submodule even if it's not registered to behave
like git.
|
|
c400bac4
|
2015-08-01T15:38:04
|
|
Merge pull request #3332 from phatblat/ben/doc-warnings
Resolve documentation warnings
|
|
c369b379
|
2015-07-31T16:23:11
|
|
Remove extra semicolon outside of a function
Without this change, compiling with gcc and pedantic generates warning:
ISO C does not allow extra ‘;’ outside of a function.
|
|
9d4b7d25
|
2015-07-29T16:46:47
|
|
Merge pull request #3328 from libgit2/cmn/iterator-skip-diriter
iterator: skip over errors in diriter init
|
|
31a76374
|
2015-07-29T22:23:00
|
|
case-insensitive check for WWW-Authenticate header
Fixes issue #3338
|
|
6d8f3a51
|
2015-07-28T08:28:33
|
|
Better param docs
|
|
f85fc367
|
2015-07-26T21:12:00
|
|
error: store the error messages in a reusable buffer
Instead of allocating a brand new buffer for each error string we want
to store, we can use a per-thread buffer to store the error string and
re-use the underlying storage. We already use the buffer to format the
string, so this mostly makes that more direct.
|
|
08afd227
|
2015-07-27T18:32:55
|
|
Fix remaining documentation warnings
|
|
12786e0f
|
2015-07-26T17:19:22
|
|
iterator: skip over errors in diriter init
An error here will typically mean that the directory was removed between
the time we iterated the parent and the time we wanted to visit it in
which case we should ignore it.
Other kinds of errors such as permissions (or transient errors) also
better dealt with by pretending we didn't see it.
|
|
19d9beb7
|
2015-07-24T19:22:41
|
|
filebuf: remove lockfile upon rename errors
When we have an error renaming the lockfile, we need to make sure
that we remove it upon cleanup. For this, we need to keep track of
whether we opened the file and whether the rename succeeded.
If we did create the lockfile but the rename did not succeed, we
remove the lockfile. This won't protect against all errors, but
the most common ones (target file is open) does get handled.
|
|
2dfd5eae
|
2015-07-24T15:05:16
|
|
Merge pull request #3307 from libgit2/cmn/submodule-backslash
Normalize submodule urls before looking at them
|
|
759b2230
|
2015-07-24T15:04:20
|
|
Merge pull request #3303 from libgit2/cmn/index-add-submodule
Allow adding a submodule through git_index_add_bypath
|
|
91dad181
|
2015-07-24T15:01:04
|
|
Merge pull request #3305 from libgit2/cmn/reflog-del-backend
refdb: delete a ref's reflog upon deletion
|
|
14e805a2
|
2015-07-24T14:59:38
|
|
Merge pull request #3304 from libgit2/cmn/checkout-free-stream
filter: make sure to close the stream even on error
|
|
4e0421fd
|
2015-07-23T10:00:55
|
|
Merge pull request #3317 from csware/fix-vista
Make libgit2 work on Windows Vista again
|
|
9830fbba
|
2015-07-22T11:33:18
|
|
Merge branch 'master' into fix-init-ordering
|
|
cf198fdf
|
2015-07-22T10:51:38
|
|
Increment `git__n_inits` before doing `init_once`.
Fixes #3318.
|
|
318bb763
|
2015-07-21T23:36:39
|
|
Make libgit2 work on Windows Vista again
(fixes issue #3316)
Signed-off-by: Sven Strickroth <email@cs-ware.de>
|
|
274f0b93
|
2015-07-15T09:17:35
|
|
Merge pull request #3311 from Fallso/MacroRedefinition
Fix macro redefinition warning
|
|
cec3569f
|
2015-07-14T15:33:56
|
|
Fix macro redefinition warning
|
|
ceb58739
|
2015-07-13T18:50:39
|
|
Merge pull request #3302 from libgit2/cmn/submodule-foreach-diff-path
List a submodule only once when the path matches a submodule in the index
|