Commit Graph

7479 Commits

Author SHA1 Message Date
Carlos Martín Nieto
3fade40e39 remote: add test for pushing and deleting with the local transport 2014-11-23 21:29:35 +01:00
Carlos Martín Nieto
52ee0e8e6d remote: verify there is a push foreach callback set 2014-11-23 21:26:53 +01:00
Carlos Martín Nieto
f7fcb18f8a Plug leaks
Valgrind is now clean except for libssl and libgcrypt.
2014-11-23 15:51:31 +01:00
Carlos Martín Nieto
e06b1040d7 Merge pull request #2723 from ravindp/ravindp/fix_4_missing_delta_bases
Fix for misleading "missing delta bases" error.
2014-11-22 18:39:50 +01:00
Ravindra Patel
ec7e680c6c Fix for misleading "missing delta bases" error - Fix #2721. 2014-11-21 15:05:34 -05:00
Edward Thomson
e0482934e6 Merge pull request #2725 from libgit2/vmg/attr-null
Do not assume blob contents are NULL terminated
2014-11-21 13:16:42 -05:00
Vicent Marti
24cce2398f text: Null-terminate a string if we've been gouging it 2014-11-21 18:09:57 +01:00
Vicent Marti
b7fb71e39c notes: Use git__strndup 2014-11-21 17:38:55 +01:00
Vicent Marti
2e1e0f108f blame: Do not assume blob contents are NULL-terminated 2014-11-21 17:24:55 +01:00
Vicent Marti
1ba48b7caf notes: Do not assume blob contents are NULL-terminated 2014-11-21 17:21:34 +01:00
Vicent Marti
72d0024134 attr_file: Do not assume ODB data is NULL-terminated
That's a bad assumption to make, even though right now it holds
(because of the way we've implemented decompression of packfiles),
this may change in the future, given that ODB objects can be
binary data.

Furthermore, the ODB object can return a NULL pointer if the object
is empty. Copying the NULL pointer to the strbuf lets us handle it
like an empty string. Again, the NULL pointer is valid behavior because
you're supposed to check the *size* of the object before working
on it.
2014-11-21 17:21:34 +01:00
Vicent Marti
92e0b67930 buffer: Do not put anything if len is 0 2014-11-21 17:21:33 +01:00
Edward Thomson
6f4461763e Merge pull request #2710 from Therzok/shellcheckScripts
Run shell scripts through shellcheck
2014-11-21 10:59:20 -05:00
Carlos Martín Nieto
deadc43e1d Merge pull request #2720 from ravindp/master
Fix for memory leak issue in indexer.c, that surfaces on windows
2014-11-21 15:21:00 +01:00
Vicent Marti
c89f1cf9d6 Merge pull request #2724 from libgit2/vmg/empty
odb: `git_odb_object` contents are never NULL
2014-11-21 14:18:32 +01:00
Vicent Marti
e015665142 odb: git_odb_object contents are never NULL
This is a contract that we made in the library and that we need to uphold. The
contents of a blob can never be NULL because several parts of the library (including
the filter and attributes code) expect `git_blob_rawcontent` to always return a
valid pointer.
2014-11-21 14:09:53 +01:00
Ungureanu Marius
a4fccbbf9d Run shell scripts through shellcheck 2014-11-20 23:17:19 +02:00
Vicent Marti
fc6ac074ee Merge pull request #2713 from libgit2/jamill/push_fetch_first
Update message for error during push
2014-11-20 13:13:46 +01:00
Vicent Marti
fd10b110de Merge pull request #2717 from libgit2/cmn/remote-ls
Clarify the git_remote_ls() documentation
2014-11-20 13:12:49 +01:00
Vicent Marti
21361cb7fe Merge pull request #2719 from libgit2/cmn/fetch-twice
fetch: clear the connection data on close
2014-11-20 13:12:29 +01:00
Edward Thomson
d7674b5743 Merge pull request #2722 from libgit2/cmn/disable-ssh-check
travis: disable the cert callback on OSX
2014-11-19 19:12:59 -05:00
Carlos Martín Nieto
aa5a06c37d travis: disable the cert callback on OSX
The sshd on OSX has stopped responding to the setting which this test
assumes is there, so let's disable it until we can figure out what's
happening.
2014-11-20 00:52:52 +01:00
Carlos Martín Nieto
1ca61bdcb9 fetch: clear the connection data on close
When we fetch twice with the same remote object, we did not properly
clear the connection flags, so we would leak state from the last
connection.

This can cause the second fetch with the same remote object to fail if
using a HTTP URL where the server redirects to HTTPS, as the second
fetch would see `use_ssl` set and think the initial connection wanted to
downgrade the connection.
2014-11-19 20:57:15 +01:00
Ravindra Patel
7561f98d6d Fix for memory leak issue in indexer.c, that surfaces on windows 2014-11-19 14:54:30 -05:00
Carlos Martín Nieto
8fd7dd778d remote: don't say we free the remote on disconnect
On disconnect we simply ask the transport to close the connection, we do
not free it.
2014-11-19 15:49:47 +01:00
Carlos Martín Nieto
699dfcc3bc remote: clarify which list of references _ls() returns
Make it clear that this is not the ls-remote command but a way to access
the data we have and how long it's kept around.
2014-11-19 15:49:02 +01:00
Carlos Martín Nieto
4d86caec59 Remove two completed projects from the list 2014-11-18 18:32:25 +01:00
Edward Thomson
93b982b1c8 Merge pull request #2654 from linquize/missing-obj
Fix missing object in tests/resources/crlf by changing the tail commit
2014-11-18 12:12:19 -05:00
Edward Thomson
45301cca30 Merge pull request #2608 from libgit2/cmn/remote-push
Provide a convenience function `git_remote_push()`
2014-11-18 11:44:59 -05:00
Edward Thomson
8b5b814e55 Merge pull request #2671 from swisspol/remote_create_fix
Fixed active_refspecs field not initialized on new git_remote objects
2014-11-17 20:10:58 -05:00
Edward Thomson
7f1b73b7c8 Merge pull request #2693 from libgit2/cmn/push-refspec-refactor
push: use the common refspec parser
2014-11-17 17:03:55 -05:00
Edward Thomson
a4221ccb09 Merge pull request #2699 from swisspol/fix_warnings
Fixed a couple Clang warnings
2014-11-17 16:36:54 -05:00
Jameson Miller
a03f6caf5c Update message for error during push
When attempting to update a reference on a remote during push, and the
reference on the remote refers to a commit that does not exist locally,
then we should report a more clear error message.
2014-11-17 16:30:31 -05:00
Pierre-Olivier Latour
d3cd7da51f Fixed active_refspecs field not initialized on new git_remote objects
When creating a new remote, contrary to loading one from disk,
active_refspecs was not populated. This means that if using the new
remote to push, git_push_update_tips() will be a no-op since it
checks the refspecs passed during the push against the base ones
i.e. active_refspecs. And therefore the local refs won't be created
or updated after the push operation.
2014-11-17 22:46:22 +09:00
Carlos Martín Nieto
5915d7001b branch: consider an empty upstream remote config as not found 2014-11-17 14:28:22 +01:00
Carlos Martín Nieto
8aa707376a Merge branch 'openssl-lock-free' 2014-11-17 14:03:50 +01:00
Ungureanu Marius
d6ecc31140 Plug possible leak in the openssl locks 2014-11-17 14:03:15 +01:00
Carlos Martín Nieto
ce8822cb40 Merge pull request #2707 from swisspol/fix_include
Fixed git2.h not including threads.h anymore
2014-11-15 20:45:17 +01:00
Carlos Martín Nieto
624eb97fd5 Merge pull request #2708 from phatblat/pr/threading-doc
Fix typo in THREADING.md
2014-11-15 13:49:15 +01:00
Ben Chatelain
d698712bc7 Fix GCD typo 2014-11-14 21:16:03 -07:00
Pierre-Olivier Latour
889d8c8b8f Fixed git2.h not including threads.h anymore 2014-11-15 08:20:36 +09:00
Pierre-Olivier Latour
692c040843 Fixed a couple Clang warnings 2014-11-10 08:18:48 +09:00
Carlos Martín Nieto
aad638f3a1 push: use the common refspec parser
There is one well-known and well-tested parser which we should use,
instead of implementing parsing a second time.

The common parser is also augmented to copy the LHS into the RHS if the
latter is empty.

The expressions test had to change a bit, as we now catch a bad RHS of a
refspec locally.
2014-11-09 16:07:43 +01:00
Carlos Martín Nieto
65f6c1c7eb Merge pull request #2653 from ethomson/contributing
Add test information to contributing guidelines
2014-11-09 13:41:57 +01:00
Edward Thomson
057126c6d3 Merge pull request #2637 from libgit2/cmn/global-init
Rename git_threads_ to git_libgit2_
2014-11-08 18:15:02 -05:00
Carlos Martín Nieto
64e3e6d43a remote: use configured push refspecs if none are given
If the user does not pass any refspecs to push, try to use those
configured via the configuration or via add_push().
2014-11-09 00:01:58 +01:00
Carlos Martín Nieto
6eb9e39ce0 push: move main test function to git_remote_push()
We have the step-by-step method in the initialization function as we
want to remove references based on the list of references which are
already there, and we can use the convenience function for testing the
main push.
2014-11-09 00:01:58 +01:00
Carlos Martín Nieto
3149547b5a remote: introduce git_remote_push()
This function, similar in style to git_remote_fetch(), performs all the
steps required for a push, with a similar interface.

The remote callbacks struct has learnt about the push callbacks, letting
us set the callbacks a single time instead of setting some in the remote
and some in the push operation.
2014-11-09 00:01:58 +01:00
Carlos Martín Nieto
799e22ea0c Rename git_threads_ to git_libgit2_
This describes their purpose better, as we now initialize ssl and some
other global stuff in there. Calling the init function is not something
which has been optional for a while now.
2014-11-08 23:46:39 +01:00
Edward Thomson
4865cc3f06 Merge pull request #2673 from swisspol/2672
Fixed GIT_REMOTE_DOWNLOAD_TAGS_ALL to behave like git 1.9.0+
2014-11-08 17:45:38 -05:00