|
b3af2d80
|
2014-07-16T13:34:25
|
|
Just put it all in buffer.
|
|
df4cba0f
|
2014-07-15T17:27:58
|
|
Export git_buf_text_is_binary and git_buf_text_contains_nul.
So that users don’t need to implement binary detection themselves.
|
|
a6d7e166
|
2014-07-11T16:51:43
|
|
Merge pull request #2466 from jacquesg/win2003-platform-sdk
Windows compatibility fixes
|
|
44cfb6f3
|
2014-07-11T16:49:23
|
|
Merge pull request #2463 from libgit2/cmn/ssh-factory-for-paths
ssh: provide a factory function for setting ssh paths
|
|
863dabda
|
2014-07-11T16:47:41
|
|
Merge pull request #2465 from libgit2/cmn/refspec-start-middle
Support refspecs with the asterisk in the middle
|
|
356b891e
|
2014-07-11T14:19:35
|
|
Merge pull request #2468 from Airbitz/pack-error-reporting
Properly report failure when expanding a packfile
|
|
01b432cf
|
2014-07-09T14:12:30
|
|
Properly report failure when expanding a packfile
|
|
02bf955f
|
2014-07-02T15:42:15
|
|
merge: don't open COMMIT_MSG unless we need to append conflicts
|
|
d4256ed5
|
2014-07-04T10:00:39
|
|
ssh: provide a factory function for setting ssh paths
git allows you to set which paths to use for the git server programs
when connecting over ssh; and we want to provide something similar.
We do this by providing a factory function which can be set as the
remote's transport callback which will set the given paths upon
creation.
|
|
59ceb432
|
2014-07-05T21:27:47
|
|
Define IO_REPARSE_TAG_SYMLINK if its not defined by WinNT.h
|
|
72090514
|
2014-07-05T21:27:21
|
|
Secure CRT is only available from Visual Studio 2005+
|
|
491ad0de
|
2014-07-05T21:26:35
|
|
qsort_r is only available from Visual Studio 2005+
|
|
cde32d4d
|
2014-07-05T21:25:55
|
|
Variadic macros is only available from Visual Studio 2005+
|
|
ab864e9c
|
2014-07-05T21:25:20
|
|
_stat64 is a function, __stat64 is the structure
|
|
b8365f21
|
2014-07-05T21:24:26
|
|
strnlen() is only available from Visual Studio 2005+
|
|
90c2b37f
|
2014-07-05T21:22:56
|
|
in_addr is defined in <Winsock2.h>, include before <ws2tcpip.h>
|
|
f5287fa6
|
2014-07-04T17:17:23
|
|
refspec: support asterisks in the middle of a pattern
We used to assume a refspec would only have an asterisk in the middle of
their respective pattern. This has not been a valid assumption for some
time now with git.
Instead of assuming where the asterisk is going to be, change the logic
to treat each pattern as having two halves with a replacement bit in the
middle, where the asterisk is.
|
|
9ed104a8
|
2014-07-04T17:16:17
|
|
refspec: short-circuit non-pattern refspecs on transform
When transforming a non-pattern refspec, we simply need to copy over the
opposite string. Move that logic up to the wrapper so we can assume a
pattern refspec in the transformation function.
|
|
ae241ae1
|
2014-07-03T20:20:00
|
|
Include libssh2.h before git2.h (transport.h)
|
|
b0ed61f8
|
2014-07-03T15:30:38
|
|
Merge pull request #2460 from libgit2/cmn/sched-yield
Move yield to the tests and enable for FreeBSD
|
|
905fb592
|
2014-07-03T05:47:34
|
|
Move yield to the tests and enable for FreeBSD
Move the definition of git_thread_yield() to the test which needs it and
add the correct definition for it for FreeBSD and derivatives.
Original patch adding FreeBSD and derivatives by @jacquesg.
|
|
193fe9cb
|
2014-07-03T02:41:10
|
|
Merge pull request #2459 from libgit2/cmn/http-url-path
netops: error out on url without a path
|
|
1380e7c6
|
2014-07-03T02:34:32
|
|
netops: error out on url without a path
In order to connect to a remote server, we need to provide a path to the
repository we're interested in. Consider the lack of path in the url an
error.
|
|
cb6e68c7
|
2014-07-02T16:45:02
|
|
Merge pull request #2449 from libgit2/cmn/maint-21
Maint fixes for ssl initing and ssh exposure
|
|
4df4ebd7
|
2014-07-02T15:29:14
|
|
Merge pull request #2453 from ethomson/checkout_index
git_checkout_index: checkout other indexes
|
|
b0ca1b18
|
2014-07-02T15:29:05
|
|
Merge pull request #2452 from libgit2/cmn/clone-custom-repo
Provide a callback to customize the repository on clone
|
|
de3cf801
|
2014-07-02T15:28:24
|
|
Merge pull request #2456 from libgit2/cmn/ssh-send-everything
ssh: libssh2_channel_write() behaves like send()
|
|
0963716b
|
2014-07-02T12:49:51
|
|
ssh: libssh2_channel_write() behaves like send()
When the stream writing function was written, it assume that
libssh2_channel_write() would always write all of the data to the
wire. This is only true for the first 32k of data, which it tries to
fit into one ssh packet.
Since it can perform short writes, call it in a loop like we do for
send(), advancing the buffer offset.
|
|
6812afaf
|
2014-06-30T21:36:38
|
|
clone: remote git_clone_into{,_local} from the public API
As git_clone now has callbacks to configure the details of the
repository and remote, remove the lower-level functions from the public
API, as they lack some of the logic from git_clone proper.
|
|
d58a64e9
|
2014-06-30T20:55:32
|
|
clone: add a callback for repository creation
Analogously to the remote creation callback, provide a way for the user
of git_clone() to create the repository with whichever options they
desire via callback.
|
|
967f5a76
|
2014-05-23T14:50:51
|
|
git_checkout_index: checkout other indexes
git_checkout_index can now check out other git_index's (that are not
necessarily the repository index). This allows checkout_index to use
the repository's index for stat cache information instead of the index
data being checked out. git_merge and friends now check out their
indexes directly instead of trying to blend it into the running index.
|
|
5fa8cda9
|
2014-06-30T12:05:25
|
|
Round up pool alloc sizes for alignment
To make sure that items returned from pool allocations are aligned
on nice boundaries, this rounds up all pool allocation sizes to a
multiple of 8. This adds a small amount of overhead to each item.
The rounding up could be made optional with an extra parameter to
the pool initialization that turned on rounding only for pools
where item alignment actually matters, but I think for the extra
code and complexity that would be involved, that it makes sense
just to burn a little bit of extra memory and enable this all the
time.
|
|
dcdb8500
|
2014-06-30T17:35:42
|
|
Merge pull request #2440 from phkelley/transports
Improvements to git_transport extensibility
|
|
e6b0ae7a
|
2014-06-30T09:19:05
|
|
ssl: init only once without threads
The OpenSSL library-loading functions do not expect to be called
multiple times. Add a flag in the non-threaded libgit2 init so we only
call once.
This fixes #2446.
|
|
bc8a0886
|
2014-06-27T11:51:35
|
|
Fix assert when receiving uncommon sideband packet
|
|
1697cd6f
|
2014-06-25T13:20:27
|
|
Improvements to git_transport extensibility
git_remote_set_transport now takes a transport factory rather than a transport
git_clone_options now allows the caller to specify a remote creation callback
|
|
f36d57b9
|
2014-06-26T07:48:09
|
|
Fixes #2443 Zero size arrays are an extension
|
|
c19b1c04
|
2014-06-25T21:35:58
|
|
pack: clean up error returns
Set a message when we fail to lock.
Also make the put function void, since it's called from free, which
cannot report errors. The only errors we can experience here are
internal state corruption, so we assert that we are trying to put a
pack which we have previously got.
|
|
966fb207
|
2014-06-25T21:25:44
|
|
tree: free in error conditions
As reported by coverity, we would leak some memory in error conditions.
|
|
5e0f47c3
|
2014-06-25T21:20:39
|
|
pack: free the new pack struct if we fail to insert
If we fail to insert the packfile in the map, make sure to free it.
This makes the free function only attempt to remove its mwindows from
the global list if we have opened the packfile to avoid accessing the
list unlocked.
|
|
d412165f
|
2014-06-18T16:54:32
|
|
Update text=auto / core.autocrlf=false behavior
Git for Windows 1.9.4 changed the behavior when the text=auto
attribute is specified and core.autocrlf=false. Previous observed
behavior would *not* filter files when going into the working
directory, the new behavior *does* filter. Update our behavior to match.
|
|
3ddd0d92
|
2014-06-24T17:55:15
|
|
Merge remote-tracking branch 'upstream/cmn/mixed-eol-passthrough'
|
|
5e37874d
|
2014-06-24T17:51:45
|
|
Merge remote-tracking branch 'upstream/cmn/treebuilder-perf'
|
|
58152669
|
2014-06-24T17:35:14
|
|
Merge branch 'cmn/global-mwf'
|
|
5a76ad35
|
2014-06-19T11:45:46
|
|
crlf: pass-through mixed EOL buffers from LF->CRLF
When checking out files, we're performing conversion into the user's
native line endings, but we only want to do it for files which have
consistent line endings. Refuse to perform the conversion for mixed-EOL
files.
The CRLF->LF filter is left as-is, as that conversion is considered to be
normalization by git and should force a conversion of the line endings.
|
|
b3b66c57
|
2014-06-18T17:13:12
|
|
Share packs across repository instances
Opening the same repository multiple times will currently open the same
file multiple times, as well as map the same region of the file multiple
times. This is not necessary, as the packfile data is immutable.
Instead of opening and closing packfiles directly, introduce an
indirection and allocate packfiles globally. This does mean locking on
each packfile open, but we already use this lock for the global mwindow
list so it doesn't introduce a new contention point.
|
|
461da57a
|
2014-06-23T17:32:30
|
|
Merge remote-tracking branch 'upstream/cmn/filebuf-atomic-unlock'
|
|
e93206e0
|
2014-06-14T12:58:03
|
|
Merge pull request #2421 from libgit2/cmn/init-ssl-once
netops: init OpenSSL once under lock
|
|
9c3e4e97
|
2014-06-13T02:35:33
|
|
http: fix typo in credentials logic
We want to check whether the credentials callback is NULL, not whether
the payload is.
|
|
081e76ba
|
2014-06-12T16:20:52
|
|
ssl: init everything all the time
Bring together all of the OpenSSL initialization to
git_threads_init() so it's together and doesn't need locks.
Moving it here also gives us libssh2 thread safety (when built against
openssl).
|
|
8f897b6f
|
2014-06-12T14:50:08
|
|
ssl: init also without threads
|
|
cf15ac8a
|
2014-06-12T03:20:34
|
|
ssl: cargo-cult thread safety
OpenSSL's tests init everything in the main thread, so let's do that.
|
|
5fa04943
|
2014-06-11T23:19:48
|
|
ssl: use locking
When using in a multithreaded context, OpenSSL needs to lock, and leaves
it up to application to provide said locks.
We were not doing this, and it's just luck that's kept us from crashing
up to now.
|
|
1d3364ac
|
2014-06-11T20:52:15
|
|
netops: init OpenSSL once under lock
The OpenSSL init functions are not reentrant, which means that running
multiple fetches in parallel can cause us to crash.
Use a mutex to init OpenSSL, and since we're adding this extra checks,
init it only once.
|
|
f9a97667
|
2014-06-11T00:06:44
|
|
revwalk: more sensible array handling
Instead of using a sentinel empty value to detect the last commit, let's
check for when we get a NULL from popping the stack, which lets us know
when we're done.
The current code causes us to read uninitialized data, although only on
RHEL/CentOS 6 in release mode. This is a readability win overall.
|
|
fcc60066
|
2014-06-09T22:59:32
|
|
treentry: no need for manual size book-keeping
We can simply ask the hasmap.
|
|
978fbb4c
|
2014-06-09T22:45:23
|
|
treebuilder: don't keep removed entries around
If the user wants to keep a copy for themselves, they should make a
copy. It adds unnecessary complexity to make sure the returned entries
are valid until the builder is cleared.
|
|
4d3f1f97
|
2014-06-09T04:38:22
|
|
treebuilder: use a map instead of vector to store the entries
Finding a filename in a vector means we need to resort it every time we
want to read from it, which includes every time we want to write to it
as well, as we want to find duplicate keys.
A hash-map fits what we want to do much more accurately, as we do not
care about sorting, but just the particular filename.
We still keep removed entries around, as the interface let you assume
they were going to be around until the treebuilder is cleared or freed,
but in this case that involves an append to a vector in the filter case,
which can now fail.
The only time we care about sorting is when we write out the tree, so
let's make that the only time we do any sorting.
|
|
2c11d2ee
|
2014-06-09T23:23:53
|
|
treebuilder: insert sorted
By inserting in the right position, we can keep the vector sorted,
making entry insertion almost twice as fast.
|
|
ce5e6617
|
2014-06-08T16:44:32
|
|
Merge pull request #2407 from libgit2/cmn/remote-rename-more
More remote rename fixes
|
|
1b4e29b7
|
2014-06-07T13:56:39
|
|
React to review feedback
|
|
fb591767
|
2014-06-07T12:51:48
|
|
Win32: Fix object::cache::threadmania test on x64
|
|
231f350d
|
2014-06-06T22:55:34
|
|
remote: don't free the remote on delete
This was a bad idea. Don't free except in the free function.
|
|
d1544564
|
2014-06-06T22:38:26
|
|
remote: handle symrefs when renaming
A symref inside the namespace gets renamed, we should make it point to
the target's new name.
This is for the origin/HEAD -> origin/master type of situations.
|
|
72bca13e
|
2014-06-06T16:33:54
|
|
remote: return problem refspecs instead of using a callback
There is no reason why we need to use a callback here. A string array
fits better with the usage, as this is not an event and we don't need
anything from the user.
|
|
61dcfe14
|
2014-06-06T15:57:37
|
|
remote: make sure the name stays valid on rename
We must make sure that the name pointer remains valid, so make sure to
allocate the new one before freeing the old one and swap them so the
user never sees an invalid pointer.
|
|
5a49ff9f
|
2014-06-06T15:54:42
|
|
remote: remove rename code for anonymous remotes
We don't allow renames of anonymous remotes, so there's no need to
handle them.
A remote is always associated with a repository, so there's no need to
check for that.
|
|
a52ab4b8
|
2014-06-06T01:09:49
|
|
remote: tighten up reference renaming
Tighten up which references we consider for renaming so we don't try to
rename unrelated ones and end up with unexplained references.
If there is a reference on the target namespace, git overwrites it, so
let's do the same.
|
|
e58281aa
|
2014-04-04T14:40:38
|
|
filebuf: make unlocking atomic
When renaming a lock file to its final location, we need to make sure
that it is replaced atomically.
We currently have a workaround for Windows by removing the target file.
This means that the target file, which may be a ref or a packfile, may
cease to exist for a short wile, which shold be avoided.
Implement the workaround only in Windows, by making sure that the file
we want to replace is writable.
|
|
90befde4
|
2014-06-03T22:10:34
|
|
Merge pull request #2399 from libgit2/cmn/path-to-path
clone: re-use the local transport's path resolution
|
|
dfcba09e
|
2014-06-03T13:05:20
|
|
Merge pull request #2395 from libgit2/cmn/ref-iter-concurrent
Concurrent ref iterator access
|
|
18d7896c
|
2014-06-03T21:47:53
|
|
clone: re-use the local transport's path resolution
Whe already worked out the kinks with the function used in the local
transport. Expose it and make use of it in the local clone method
instead of trying to work it out again.
|
|
bccb36eb
|
2014-06-03T17:25:59
|
|
Merge pull request #2389 from arthurschreiber/arthur/set-error-when-no-remote-found
Remote: Set an error when a remote cannot be found.
|
|
2d945f82
|
2014-06-02T17:44:51
|
|
refs: copy the packed refs on iteration
This lets us work without worrying about what's happening but work on a
snapshot.
|
|
8a9419aa
|
2014-06-01T02:16:07
|
|
remote: build up the list of refs to remove
When removing the remote-tracking branches, build up the list and remove
in two steps, working around an issue with the iterator. Removing while
we're iterating over the refs can cause us to miss references.
|
|
bc81220d
|
2014-05-31T10:19:55
|
|
minor cleanups
|
|
947a58c1
|
2014-05-30T13:19:49
|
|
Clean up the handling of large binary diffs
|
|
d723dbed
|
2014-05-30T19:26:49
|
|
Remote: Set an error when a remote cannot be found.
Inside `git_remote_load`, the calls to `get_optional_config` use
`giterr_clear` to unset any errors that are set due to missing config
keys. If neither a fetch nor a push url config was found for a remote,
we should set an error again.
|
|
49837fd4
|
2014-05-30T11:30:53
|
|
Ignore core.safecrlf=warn until we have a warn infrastructure
|
|
824f755f
|
2014-05-20T17:31:53
|
|
Refs: Introduce `git_refname_t`.
|
|
68f9d6b2
|
2014-05-15T22:44:50
|
|
Refs: Fix some issue when core.precomposeunicode = true.
This fixes two issues I found when core.precomposeunicode is enabled:
* When creating a reference with a NFD string, the returned
git_reference would return this NFD string as the reference’s
name. But when looking up the reference later, the name would
then be returned as NFC string.
* Renaming a reference would not honor the core.precomposeunicode and
apply no normalization to the new reference name.
|
|
5f0527ae
|
2014-05-30T13:06:34
|
|
config: initialize the error
The error would be uninitialized if we take a snapshot of a config with
no backends.
|
|
31c55152
|
2014-05-29T14:50:57
|
|
Merge pull request #2011 from libgit2/cmn/clone-local
Local clone
|
|
2614819c
|
2014-05-28T11:28:57
|
|
clone: allow for linking in local clone
If requested, git_clone_local_into() will try to link the object files
instead of copying them.
This only works on non-Windows (since it doesn't have this) when both
are on the same filesystem (which are unix semantics).
|
|
94f742ba
|
2014-05-28T10:18:05
|
|
fileops: allow linking files when copying directory structures
When passed the LINK_FILES flag, the recursive copy will hardlink files
instead of copying them.
|
|
c1dbfcbb
|
2014-05-28T10:07:23
|
|
clone: add flag not to link
|
|
121b2673
|
2013-12-23T11:12:31
|
|
clone: add flags to override whether to perform a local clone
|
|
a0b5f785
|
2013-12-22T15:39:54
|
|
clone: store the realpath when given a relative one
A call like git_clone("./foo", "./foo1") writes origin's url as './foo',
which makes it unusable, as they're relative to different things.
Go with git's behaviour and store the realpath as the url.
|
|
4386d80b
|
2013-12-21T17:18:21
|
|
clone: perform a "local clone" when given a local path
When git is given such a path, it will perform a "local clone",
bypassing the git-aware protocol and simply copying over all objects
that exist in the source.
Copy this behaviour when given a local path.
|
|
5d91bea2
|
2014-05-28T13:55:57
|
|
Merge pull request #2380 from libgit2/cmn/index-add-modes
index: check for valid filemodes on add
|
|
07c0eacd
|
2014-05-28T13:50:58
|
|
Merge pull request #2359 from e45lee/chmod-fix
Fixed permissions on template directories.
|
|
eff531e1
|
2014-05-27T20:58:20
|
|
Modify GIT_MERGE_CONFIG -> GIT_MERGE_PREFERENCE
|
|
de3f851e
|
2014-05-21T09:44:05
|
|
Staticify `merge_config`
|
|
22ab8881
|
2014-05-20T22:07:15
|
|
Use a config snapshot
|
|
a3622ba6
|
2014-05-16T13:54:40
|
|
Move GIT_MERGE_CONFIG_* to its own enum
|
|
d362093f
|
2014-05-08T15:41:36
|
|
Introduce GIT_MERGE_CONFIG_* for merge.ff settings
git_merge_analysis will now return GIT_MERGE_CONFIG_NO_FASTFORWARD
when merge.ff=false and GIT_MERGE_CONFIG_FASTFORWARD_ONLY when
merge.ff=true
|
|
517341c5
|
2014-05-23T22:41:35
|
|
Address style concerns in setting mkdir/copy flags.
|
|
530594c0
|
2014-05-23T05:53:41
|
|
odb: clear backend errors on successful read
We go through the different backends in order, so it's not an error if
at least one of the backends has the data we want.
|
|
052a2ffd
|
2014-05-22T16:01:02
|
|
index: check for valid filemodes on add
|
|
9331f98a
|
2014-05-22T12:52:31
|
|
smart: initialize the error variable
|