Commit Graph

2389 Commits

Author SHA1 Message Date
Edward Thomson
2be53a5da7 v1.5: update version numbers 2022-07-13 12:50:01 -04:00
Edward Thomson
fb68f18071 status: update documentation for default options 2022-06-13 21:44:05 -04:00
Edward Thomson
1ed1e19afa config: update config entry iteration lifecycle 2022-06-13 21:23:42 -04:00
Edward Thomson
cc4c37ca9e transport: remove git_transport_smart_proxy_options
Snuck in during refactoring; let's get rid of it.
2022-06-12 10:50:43 -04:00
lhchavez
0a7c00be7f Merge remote-tracking branch 'origin/main' into main 2022-06-11 14:31:16 -07:00
lhchavez
a75416761c Apply suggestions from code review
Co-authored-by: Edward Thomson <ethomson@github.com>
2022-06-11 14:29:15 -07:00
Aleksey Kulikov
9af5db9a5f docs: fix couple of typos 2022-04-28 17:06:54 +03:00
Edward Thomson
a1c94e9491 Merge pull request #6277 from cschlack/sys_transport_missing_include
Fix missing include
2022-04-25 09:15:59 -04:00
lhchavez
1d88605ca9 transport: introduce git_transport_smart_remote_connect_options
6fc6eeb66c removed
`git_transport_smart_proxy_option`, and there was nothing added to
replace it. That made it hard for custom transports / smart
subtransports to know what remote connect options to use (e.g. proxy
options).

This change introduces `git_transport_smart_remote_connect_options` to
replace it.
2022-04-16 08:23:22 -07:00
Christian Schlack
a6fb41ff88 Fix missing include 2022-04-16 14:56:23 +02:00
lhchavez
88f2438452 remote: Delete a now-inexistent API declaration
6fc6eeb66c replaced the remote options
with `git_remote_connect_options`. The function definitions were
removed, but one function declaration remained, causing linker errors if
one tried to use it.

This change removes the declaration of
`git_transport_smart_proxy_option` to better reflect reality.
2022-04-14 07:20:56 -07:00
Edward Thomson
4161ebdd50 repo: make ownership checks optional
Introduce the `GIT_OPT_SET_OWNER_VALIDATION` option, so that users can
disable repository ownership validation.
2022-04-11 22:17:52 -04:00
Edward Thomson
c0dfd1ad97 repo: ensure that repo dir is owned by current user
Ensure that the repository directory is owned by the current user; this
prevents us from opening configuration files that may have been created
by an attacker.
2022-04-11 22:15:45 -04:00
Edward Thomson
36df49c26d sha: GIT_ERROR_SHA1 is deprecated in favor of GIT_ERROR_SHA
The more generic GIT_ERROR_SHA allows for SHA256 errors as well as SHA1.
2022-03-23 08:39:19 -04:00
Edward Thomson
49e180c862 errors: expose git_error_set
The `git_error_set` function is useful for callers who implement
backends and advanced callbacks.  Expose it.
2022-02-22 22:07:44 -05:00
Edward Thomson
b152b0300e meta: document version information for libgit2 2022-02-14 10:27:48 -05:00
Edward Thomson
056fe4be05 meta: provide an accessor for prerelease info 2022-02-14 07:13:05 -05:00
Edward Thomson
ae74d5ac41 meta: update version number to v1.5.0-alpha
Update the version number in main to v1.5.0-alpha.  This helps people
understand that the main builds are not part of the v1.4.0 release
train.

We use "alpha" to indicate builds out of main (or nightlies) as semver
v2 requires the prerelease component is compared lexicographically.
Thus, our "beta" and "rc" releases should follow.
2022-02-14 07:01:43 -05:00
Edward Thomson
5c949d1faf v1.4: update version numbers 2022-02-13 10:06:15 -05:00
Edward Thomson
aded938e00 Merge pull request #6204 from boretrk/merge_flags
merge: fix overlap between GIT_MERGE_FILE_FAVOR__CONFLICTED and GIT_MERGE_FILE_SIMPLIFY_ALNUM
2022-02-12 21:23:01 -05:00
Edward Thomson
0fbf62cd20 merge: make the internal flags public
We made the flags that enable recursive merge internal, on the
assumption that nobody would want them and they're hard to reason about.
(Giving people an option that nobody wants is just extra noise.)

However, it made it hard for _us_ to reason about.  There's no good
reason to keep it private, let's just make it public and push that
cognitive load onto our poor users.  But they should expect it, they're
dealing with git, after all.
2022-02-12 08:46:55 -05:00
Edward Thomson
359240b674 diff: indicate when the file size is "valid"
When we know the file size (because we're producing it from a working
directory iterator, or an index with an up-to-date cache) then set a
flag indicating as such.  This removes the ambiguity about a 0 file
size, which could indicate that a file exists and is 0 bytes, or that we
haven't read it yet.
2022-02-12 06:59:09 -05:00
Edward Thomson
1d811f0eb9 Merge pull request #6203 from libgit2/ethomson/fetch_by_oid
Fetch by object id
2022-02-11 07:14:54 -05:00
Peter Pettersson
fed3fef451 merge: allocate merge flags for internal use
Allocate flags in git_merge_flag_t and git_merge_file_flag_t
for internal usage to prevent accidental double allocation.
2022-02-07 12:21:59 +01:00
Edward Thomson
d9863fc19e Merge pull request #6192 from libgit2/ethomson/sha256_preparation
SHA256: early preparation
2022-02-06 15:27:34 -05:00
Edward Thomson
37d98aaf44 transport: transports can indicate support for fetch by oid 2022-02-06 15:08:35 -05:00
Edward Thomson
923c16527c transport: add capabilities query function 2022-02-06 15:01:15 -05:00
Edward Thomson
c629d2a11c merge: support zdiff3 conflict styles 2022-01-30 09:27:29 -05:00
Edward Thomson
70d9bfa47c packbuilder: use the packfile name instead of hash
Deprecate the `git_packfile_hash` function.  Callers should use the new
`git_packfile_name` function which provides a unique packfile name.
2022-01-27 20:15:09 -05:00
Edward Thomson
d2458af7b7 indexer: use a byte array for checksum
The index's checksum is not an object ID, so we should not use the
`git_oid` type.  Use a byte array for checksum calculation and storage.

Deprecate the `git_indexer_hash` function.  Callers should use the new
`git_indexer_name` function which provides a unique packfile name.
2022-01-27 20:15:09 -05:00
Edward Thomson
11ef76a9f5 index: use a byte array for checksum
The index's checksum is not an object ID, so we should not use the
`git_oid` type.  Use a byte array for checksum calculation and storage.

Deprecate the `git_index_checksum` function without a replacement.  This
is an abstraction that callers should not care about (and indeed do not
seem to be using).

Remove the unused `git_index__changed_relative_to` function.
2022-01-27 20:15:09 -05:00
Edward Thomson
258df9c18d Merge pull request #6168 from punkymaniac/patch-documentation-2
Improve documentation
2022-01-17 22:03:26 -05:00
Edward Thomson
616628ddc9 Merge branch 'main' into typos 2022-01-17 21:39:35 -05:00
Edward Thomson
d4232e7c91 Apply suggestions from code review 2022-01-17 21:21:54 -05:00
Edward Thomson
515daeaf4d remote: introduce follow_redirects connect option
Give callers the ability to select how to handle redirects - either
supporting redirects during the initial connection (so that, for
example, `git.example.com/repo` can redirect to `github.com/example/repo`)
or all/no redirects.  This is for compatibility with git.
2022-01-13 21:34:20 +00:00
punkymaniac
7491b3fd5d Set parameter name as function declaration 2022-01-12 09:40:13 +01:00
punkymaniac
4e93ecfa7a Separate function description from short description 2022-01-11 15:06:00 +01:00
punkymaniac
5c8f7a9921 Rephrase param description 2022-01-09 10:41:24 +01:00
punkymaniac
c6ede67613 Fix misspelling word "ge" -> "get" 2022-01-09 10:35:42 +01:00
punkymaniac
58ae4535b8 Document return value for git_libgit2_features 2022-01-09 10:29:00 +01:00
punkymaniac
68bc511abb Add documentation about parameter and return value 2022-01-09 10:17:51 +01:00
punkymaniac
03aed8bca7 Add missing parameter name 2022-01-09 10:17:50 +01:00
punkymaniac
f8b26df34f Add git_apply_options_init documentation 2022-01-09 10:17:50 +01:00
Edward Thomson
6fc6eeb66c remote: introduce git_remote_connect_options
The existing mechanism for providing options to remote fetch/push calls,
and subsequently to transports, is unsatisfactory.  It requires an
options structure to avoid breaking the API and callback signatures.

1. Introduce `git_remote_connect_options` to satisfy those needs.

2. Add a new remote connection API, `git_remote_connect_ext` that will
   take this new options structure.  Existing `git_remote_connect` calls
   will proxy to that.  `git_remote_fetch` and `git_remote_push` will
   proxy their fetch/push options to that as well.

3. Define the interaction between `git_remote_connect` and fetch/push.
   Connect _may_ be called before fetch/push, but _need not_ be.  The
   semantics of which options would be used for these operations was
   not specified if you specify options for both connect _and_ fetch.
   Now these are defined that the fetch or push options will be used
   _if_ they were specified.  Otherwise, the connect options will be
   used if they were specified.  Otherwise, the library's defaults will
   be used.

4. Update the transports to understand `git_remote_connect_options`.
   This is a breaking change to the systems API.
2022-01-06 15:18:33 -05:00
Dimitris Apostolou
90df43022a Fix typos 2022-01-05 16:35:52 +02:00
Miguel Arroz
ef84889189 Add rename_threshold to git_status_options. 2021-12-31 16:40:58 -08:00
Edward Thomson
942cfac129 worktree: checkout options suggestions from code review 2021-12-23 14:21:49 -06:00
punkymaniac
ffead01228 Allow user checkout options on git_worktree_add
Extend the `git_worktree_add_options` to include `git_checkout_options`.

github issue #5949
2021-12-23 14:21:49 -06:00
Edward Thomson
4591e76a2d blob: identify binary content
Introduce `git_blob_data_is_binary` to examine a blob's data, instead of
the blob itself.  A replacement for `git_buf_is_binary`.
2021-12-10 15:19:59 -05:00
Edward Thomson
9f03ebd14b object: introduce a raw content validation function
Users may want to validate raw object content; provide them a function
to do so.
2021-11-30 22:45:13 -05:00