Commit Graph

1081 Commits

Author SHA1 Message Date
Vicent Martí
efc9e6700f Merge pull request #1856 from libgit2/cmn/no-orphans
No such thing as an orphan branch
2013-09-17 03:45:35 -07:00
Carlos Martín Nieto
605da51a2c No such thing as an orphan branch
Unfortunately git-core uses the term "unborn branch" and "orphan
branch" interchangeably. However, "orphan" is only really there for
the checkout command, which has the `--orphan` option so it doesn't
actually create the branch.

Branches never have parents, so the distinction of a branch with no
parents is odd to begin with. Crucially, the error messages deal with
unborn branches, so let's use that.
2013-09-17 09:50:30 +02:00
Etienne Samson
b622aabec0 Add a wrapper to provide the libssh2 error message 2013-09-16 23:07:19 +02:00
Linquize
f2df503bab git_clone supports optional init_options 2013-09-16 08:02:36 +08:00
Russell Belfer
6c38e60a00 Merge pull request #1838 from libgit2/cmn/first-parent
revwalk: allow simplifying by first-parent
2013-09-10 16:55:58 -07:00
Carlos Martín Nieto
15f7b9b8d9 revwalk: allow simplifying by first-parent
When enabled, only the first parent of each commit will be queued,
enabling a simple way of using first-parent simplification.
2013-09-09 20:31:14 +02:00
John Josef
f313843c8a fixing headers with bad values for objective-c 2013-09-09 13:53:22 -04:00
Russell Belfer
e0b4a8ac33 Merge pull request #1842 from uh-sem-blee/development
fixes issues with objective-git
2013-09-09 10:30:31 -07:00
Russell Belfer
4dfe38205b Comment updates 2013-09-09 10:24:48 -07:00
John Josef
917e5fa9a1 fixes issues with objective-git 2013-09-08 18:31:56 -04:00
nulltoken
031f3f8028 odb: Error when streaming in too [few|many] bytes 2013-09-07 23:00:20 +02:00
nulltoken
4047950f30 odb: Prevent stream_finalize_write() from overwriting
Now that #1785 is merged, git_odb_stream_finalize_write() calculates the object id before invoking the odb backend.

This commit gives a chance to the backend to check if it already knows this object.
2013-09-06 22:47:28 +02:00
Vicent Martí
e98535923b Merge pull request #1817 from libgit2/ntk/fix/backend/honor_refresh_capabilities
Of backends and refreshers...
2013-09-04 06:20:36 -07:00
nulltoken
b1a6c316a6 odb: Move the auto refresh logic to the pack backend
Previously, `git_object_read()`, `git_object_read_prefix()` and
`git_object_exists()` were implementing an auto refresh logic. When the
expected object couldn't be found in any backend, a call to
`git_odb_refresh()` was triggered and the lookup was once again performed
against all backends.

This commit removes this auto-refresh logic from the odb layer and pushes
it down into the pack-backend (as it's the only one currently exposing
a `refresh()` endpoint).
2013-09-04 07:44:53 +02:00
Vicent Martí
6208bd499b Merge pull request #1804 from ethomson/rewrites
Minor changes for rewrites
2013-09-03 12:29:18 -07:00
Vicent Martí
ac2e7dc6fb Merge pull request #1820 from linquize/git_oid_streq
Update documentation of git_oid_streq to remove outdated error code
2013-09-01 08:40:48 -07:00
Linquize
d45e9480e7 oid: git_oid_shorten_add() sets GITERR_INVALID when OID set is full 2013-08-31 18:22:50 +08:00
Linquize
e68938e0b9 Update documentation of git_oid_streq to remove outdated error code 2013-08-31 18:19:44 +08:00
Vicent Martí
dbecec37a7 Merge pull request #1805 from libgit2/threading-packed-load
Thread safety for the refdb_fs
2013-08-28 09:38:14 -07:00
Russell Belfer
b2d3efcbce Some documentation improvements 2013-08-28 09:31:32 -07:00
Edward Thomson
17c7fbf6d2 Split rewrites, status doesn't return rewrites
Ensure that we apply splits to rewrites, even if we're not
interested in examining it closely for rename/copy detection.

In keeping with core git, status should not display rewrites,
it should simply show files as "modified".
2013-08-28 08:30:19 -05:00
Vicent Martí
b8b22d774e Merge pull request #1772 from libgit2/config-iter
Configuration iterators redux
2013-08-28 06:04:51 -07:00
Nikolai Vladimirov
504850cdf5 refs: add git_reference_is_tag 2013-08-26 08:04:10 +03:00
Fraser Tweedale
3261444056 push: small documentation fix 2013-08-25 17:01:04 +10:00
Edward Thomson
67c177ef26 Don't expose git_hash_ctx since it's internal
And doing so makes the mingw build choke.
2013-08-19 11:42:50 -05:00
Vicent Martí
520287f63a Merge pull request #1785 from libgit2/cmn/odb-hash-frontend
odb: move hashing to the frontend for streaming
2013-08-19 02:17:00 -07:00
Carlos Martín Nieto
3d27687475 index: report when it's locked
Report the index being locked with its own error code in order to be
able to differentiate, as a locked index is typically the result of a
crashed process or concurrent access, both of which often require user
intervention to fix.
2013-08-19 10:30:44 +02:00
Carlos Martín Nieto
7a3764bee9 odb: document git_odb_stream
Clarify the role of each function and in particular mention that there
is no need for the backend or stream to worry about the object's id,
as it will be given when `finalize_write` is called.
2013-08-17 02:02:28 +02:00
Carlos Martín Nieto
fe0c6d4e71 odb: make it clearer that the id is calculated in the frontend
The frontend is in charge of calculating the id of the objects. Thus
the backends should treat it as a read-only value. The positioning in
the function signature made it seem as though it was an output
parameter.

Make the id const and move it from the front to behind the subject
(backend or stream).
2013-08-17 01:41:08 +02:00
Russell Belfer
ce23330fd6 Add new git_signature_default API using config
This adds a new API for creating a signature that uses the
config to look up "user.name" and "user.email".
2013-08-16 15:04:15 -07:00
Carlos Martín Nieto
8380b39a67 odb: perform the stream hashing in the frontend
Hash the data as it's coming into the stream and tell the backend what
its name is when finalizing the write. This makes it consistent with
the way a plain git_odb_write() performs the write.
2013-08-15 14:29:39 +02:00
Carlos Martín Nieto
376e6c9f96 odb: wrap the stream reading and writing functions
This is in preparation for moving the hashing to the frontend, which
requires us to handle the incoming data before passing it to the
backend's stream.
2013-08-15 14:29:27 +02:00
Carlos Martín Nieto
f4be8209af config: don't special-case the multivar iterator
Build it on top of the normal iterator instead, which lets use re-use
a lot of code.
2013-08-14 00:45:05 +02:00
Carlos Martín Nieto
7affc2f7de Include username in each credential type
Key-based authentication also needs an username, so include it in each
one.

Also stop assuming a default username of "git" in the ssh transport
which has no business making such a decision.
2013-08-12 12:07:21 +02:00
Carlos Martín Nieto
54f3a572b4 config: introduce a regex-filtering iterator 2013-08-12 11:40:57 +02:00
Carlos Martín Nieto
5880962d90 config: introduce _iterator_new()
As the name suggests, it iterates over all the entries
2013-08-12 11:40:57 +02:00
Russell Belfer
fbb6c0c84c Merge pull request #1764 from ethomson/status_renames_from_rewrites
Add rename from rewrites to status
2013-08-09 09:35:23 -07:00
Carlos Martín Nieto
1e96c9d534 config: add _next() and _iterator_free()
Make it look like the refs iterator API.
2013-08-08 20:47:06 +02:00
Carlos Martín Nieto
99dfb538ad config: working multivar iterator
Implement the foreach version as a wrapper around the iterator.
2013-08-08 20:38:42 +02:00
Ben Straub
5e96f31638 Merge pull request #1738 from libgit2/diff-patch-content-size
Add API for getting at git_diff_patch->content_size
2013-08-08 08:54:38 -07:00
Carlos Martín Nieto
cca5df6376 config: hopefully get the iterator to work on multivars 2013-08-08 16:59:39 +02:00
Carlos Martín Nieto
3a7ffc29c9 config: initial multivar iterator 2013-08-08 16:18:07 +02:00
Carlos Martín Nieto
eba7399251 config: move next() and free() into the iterator
Like we have in the references iterator, next and free belong in the
iterator itself.
2013-08-08 14:39:32 +02:00
Carlos Martín Nieto
4efa32903a config: get_multivar -> get_multivar_foreach
The plain function will return an iterator, so move this one out of
the way.
2013-08-08 13:57:01 +02:00
Carlos Martín Nieto
4d588d9713 Don't typedef a pointer
Make the iterator structure opaque and make sure it compiles.
2013-08-08 11:40:41 +02:00
Nico von Geyso
a603c19157 replaced foreach() with non callback based iterations in git_config_backend
new functions in struct git_config_backend:
  * iterator_new(...)
  * iterator_free(...)
  * next(...)

The old callback based foreach style can still be used with `git_config_backend_foreach_match`
2013-08-08 11:14:53 +02:00
Russell Belfer
437224b4b9 More tests for ambiguous OIDs across packs
The test coverage for ambiguous OIDs was pretty thin.  This adds
a bunch of new objects both in packs, across packs, and loose that
match to 8 characters so that we can test various cases of
ambiguous lookups.
2013-08-05 21:46:32 -07:00
Edward Thomson
e38f0d69ab Add rename from rewrites to status
In git_diff_paired_foreach, temporarily resort the
index->workdir diff list by index path so that we can
track a rename in the workdir from head->index->workdir.
2013-08-05 14:09:56 -05:00
Russell Belfer
9b7d02ff2d Update submodule documentation
Fixes #1762
2013-08-05 10:53:39 -07:00
Russell Belfer
eb1c1707ab Restore GIT_DIFF_LINE_BINARY usage
This restores the usage of GIT_DIFF_LINE_BINARY for the diff
output line that reads "Binary files x and y differ" so that it
can be optionally colorized independently of the file header.
2013-07-23 15:45:58 -07:00