Commit Graph

8049 Commits

Author SHA1 Message Date
Carlos Martín Nieto
d1c281a552 cred: add convenience function to get the username
Since each cred defines the username on their own, introduce
git_cred__username to retrieve the username pointer from them.
2014-06-26 22:58:38 +02:00
Carlos Martín Nieto
54da69588e cred: introduce username-only cred
This exists as ssh needs to know about the username to use before it can
query for the supported authentication methods.
2014-06-26 22:58:38 +02:00
Carlos Martín Nieto
d7f962f408 ssh: request credentials again on authentication failure
Instead of completely giving up on the first failure, ask for
credentials as long as we fail to authenticate.
2014-06-26 22:58:38 +02:00
Carlos Martín Nieto
8873728f37 Introduce GIT_EAUTH
Introduce this error code to signal an authentication failure.
2014-06-26 22:58:38 +02:00
Vicent Marti
0145afe635 Merge pull request #2445 from ethomson/checkout_conflict_test
checkout::conflict tests: only test owner mode
2014-06-26 18:24:13 +02:00
Edward Thomson
f4046267dc checkout::conflict tests: only test owner mode
The checkout::conflict type conflict tests were failing because
they were overly assertive about the resultant mode, testing
group & other bits, which failed miserably for people who had a
umask less restrictive than 022.  Only test the resultant owner bits.
2014-06-26 09:16:12 -04:00
Philip Kelley
9c46409d38 Merge pull request #2444 from libgit2/phkelley/flexarray
Fixes #2443 Zero size arrays are an extension
2014-06-26 08:01:01 -04:00
Philip Kelley
f36d57b9bf Fixes #2443 Zero size arrays are an extension 2014-06-26 07:48:09 -04:00
Vicent Marti
86cb34cb11 Merge pull request #2442 from libgit2/cmn/leaks
Fix a couple of leaks
2014-06-25 21:43:52 +02:00
Carlos Martín Nieto
c19b1c0442 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.
2014-06-25 21:35:58 +02:00
Carlos Martín Nieto
966fb20702 tree: free in error conditions
As reported by coverity, we would leak some memory in error conditions.
2014-06-25 21:25:44 +02:00
Carlos Martín Nieto
5e0f47c375 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.
2014-06-25 21:20:39 +02:00
Carlos Martín Nieto
c61dc1a92e travis: build the master branch
We need to tell Travis to build the master branch or it won't build it
or the pull requests.
2014-06-25 17:12:44 +02:00
Vicent Marti
1fe562434d Merge pull request #2435 from ethomson/text_attr
Update text=auto / core.autocrlf=false behavior
2014-06-25 15:14:20 +02:00
Vicent Marti
a252b9e245 Merge pull request #2439 from ethomson/revert_export
Export git_revert_commit
2014-06-25 15:14:14 +02:00
Edward Thomson
4e813a8b60 Export git_revert_commit 2014-06-25 09:11:16 -04:00
Edward Thomson
d412165f94 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.
2014-06-24 13:46:32 -04:00
Carlos Martín Nieto
e1fc03c9ba Add CHANGELOG entry for mixed-EOL fix 2014-06-24 17:56:27 +02:00
Carlos Martín Nieto
3ddd0d929d Merge remote-tracking branch 'upstream/cmn/mixed-eol-passthrough' 2014-06-24 17:55:15 +02:00
Carlos Martín Nieto
29fe897d80 Add CHANGELOG entry for treebuilder map 2014-06-24 17:52:52 +02:00
Carlos Martín Nieto
5e37874dd4 Merge remote-tracking branch 'upstream/cmn/treebuilder-perf' 2014-06-24 17:51:45 +02:00
Carlos Martín Nieto
130cb54801 Add CHANGELOG entry for shared packs 2014-06-24 17:37:41 +02:00
Carlos Martín Nieto
5815266981 Merge branch 'cmn/global-mwf' 2014-06-24 17:35:14 +02:00
Vicent Marti
35757155f5 Merge pull request #2434 from libgit2/rb/contributing-updates
Update CONTRIBUTING and PROJECTS
2014-06-24 17:30:47 +02:00
Carlos Martín Nieto
5a76ad35aa 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.
2014-06-23 22:27:12 +02:00
Carlos Martín Nieto
b3b66c5793 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.
2014-06-23 21:50:36 +02:00
Carlos Martín Nieto
d30447cbaf Add a CHANGELOG entry for the filebuf change 2014-06-23 18:02:59 +02:00
Carlos Martín Nieto
461da57aff Merge remote-tracking branch 'upstream/cmn/filebuf-atomic-unlock' 2014-06-23 17:32:30 +02:00
Russell Belfer
b247a39d87 missing paren 2014-06-20 10:15:03 -07:00
Russell Belfer
a142ed91e5 Update CONTRIBUTING and PROJECTS
This updates CONTRIBUTING to reflect the changes to use the
master branch and make explicit recommendations about updating
CHANGELOG.md and providing test coverage.  Also, this includes
some old updates to PROJECTS.md that I wrote to expand the list
of projects, pulling in things from old feature requests.
2014-06-20 10:10:38 -07:00
Vicent Marti
28f087c864 libgit2 v0.21.0 2014-06-20 14:42:16 +02:00
Carlos Martín Nieto
b529c5f96d ssh: propagate the error code from the auth callback
We need to be able to get a GIT_EUSER back through the outermost call.
2014-06-17 10:51:17 +02:00
Carlos Martín Nieto
22618906a5 ssh: detect authentication methods
Before calling the credentials callback, ask the sever which
authentication methods it supports and report that to the user, instead
of simply reporting everything that the transport supports.

In case of an error, we do fall back to listing all of them.
2014-06-17 10:51:17 +02:00
Vicent Marti
1589aa0c4d Merge pull request #2425 from libgit2/cmn/clone-auth-change
Don't use read-write accounts for the tests
2014-06-16 11:11:40 +02:00
Vicent Marti
e93206e0f5 Merge pull request #2421 from libgit2/cmn/init-ssl-once
netops: init OpenSSL once under lock
2014-06-14 12:58:03 +02:00
Carlos Martín Nieto
09561d33e4 test: remove assembla clone test
The assembla failure we were seeing referred to a private repository,
which is not what is there at the moment.

This reverts 1fd21b0342
2014-06-13 22:27:46 +02:00
Carlos Martín Nieto
3382d8b14f test: use read-only account
Don't write in plaintext the password of an account which has full
control over the repository. Instead use an account with read-only
access.
2014-06-13 22:24:43 +02:00
Carlos Martín Nieto
9c3e4e97f6 http: fix typo in credentials logic
We want to check whether the credentials callback is NULL, not whether
the payload is.
2014-06-13 02:35:33 +02:00
Carlos Martín Nieto
081e76bac2 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).
2014-06-12 16:58:25 +02:00
Carlos Martín Nieto
8f897b6f2f ssl: init also without threads 2014-06-12 14:50:08 +02:00
Carlos Martín Nieto
cf15ac8aa9 ssl: cargo-cult thread safety
OpenSSL's tests init everything in the main thread, so let's do that.
2014-06-12 14:37:03 +02:00
Carlos Martín Nieto
5fa0494328 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.
2014-06-11 23:19:48 +02:00
Carlos Martín Nieto
76f76162b2 remote: update documentation
Add docs for git_clone_local_t and move the docs for the
git_clone_options to each field.
2014-06-11 21:20:23 +02:00
Carlos Martín Nieto
1d3364ac9d 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.
2014-06-11 20:54:42 +02:00
Vicent Marti
3f3d21badd Merge pull request #2417 from libgit2/cmn/revwalk-array-fix
revwalk: more sensible array handling
2014-06-11 18:56:24 +02:00
Carlos Martín Nieto
b42ff7c016 zlib: disable warning 4142 on MSVC
This is about benign redefinition of types. We're not interested in it.
2014-06-11 18:33:55 +02:00
Carlos Martín Nieto
4f8ac2163b zlib: get rid of compress.c and uncompr.c 2014-06-11 18:33:55 +02:00
Carlos Martín Nieto
2bc76050e0 zlib: get rid of gz* 2014-06-11 18:33:55 +02:00
Carlos Martín Nieto
a9185589f9 zlib: add a few missing defines 2014-06-11 18:03:37 +02:00
Carlos Martín Nieto
bb54fad045 Merge branch 'cmn/zlib-update' into cmn/update-zlib 2014-06-11 16:36:34 +02:00