Commit Graph

1411 Commits

Author SHA1 Message Date
Jacques Germishuys
4d7b993904 Added cherry-pick support 2014-04-14 16:16:21 +02:00
Jacques Germishuys
7a28f268ad Fix const-correctness of git_patch_get_delta, git_patch_num_hunks, git_patch_num_lines_in_hunk 2014-04-11 21:55:36 +02:00
Jacques Germishuys
3b4ba27870 Const correctness! 2014-04-03 16:06:31 +02:00
Rob Rix
ddc66e27b6 Give the correct name for the function in the doc.
Per @carlosmn, git_index_add is now named git_index_add_bypath.
2014-04-02 08:02:43 -04:00
Rob Rix
bb439de039 Correct a stale reference to GIT_EBAREINDEX 2014-04-01 16:37:19 -04:00
Russell Belfer
2450d4c63a Merge pull request #2208 from libgit2/vmg/mempack
In-memory packing backend
2014-04-01 09:33:18 -07:00
Vicent Marti
9325460a93 Merge pull request #2206 from libgit2/cmn/inmemory-swap-order
Rename in-memory remote to anonymous and swap url and fetch order
2014-04-01 13:47:44 +02:00
Carlos Martín Nieto
fd536d29c1 remote: rename inmemory to anonymous and swap url and fetch order
The order in this function is the opposite to what
create_with_fetchspec() has, so change this one, as url-then-refspec is
what git does.

As we need to break compilation and the swap doesn't do that, let's take
this opportunity to rename in-memory remotes to anonymous as that's
really what sets them apart.
2014-04-01 13:38:04 +02:00
Edward Thomson
7f930ded88 Const up members of git_merge_file_result 2014-03-31 11:08:31 -07:00
Edward Thomson
976634c467 Introduce git_merge_head_id 2014-03-31 11:43:38 -05:00
Russell Belfer
22df47cbc5 Fix segfault if gitmodules is invalid
The reload_all call could end up dereferencing a NULL pointer if
there was an error while attempting to load the submodules config
data (i.e. invalid content in the gitmodules file).  This fixes it.
2014-03-26 14:38:26 -07:00
Vicent Marti
dc7efa1aef Merge pull request #2204 from libgit2/rb/submodule-reference-counting
Make submodules externally refcounted
2014-03-26 18:29:34 +01:00
Vicent Marti
6105d59707 In-memory packing backend 2014-03-26 18:17:08 +01:00
Edward Thomson
451aaf866a Merge pull request #2181 from anuraggup/hide_cb
Callback function to hide commit and its parents in revision walker
2014-03-25 10:33:18 -07:00
Russell Belfer
a15c7802c8 Make submodules externally refcounted
`git_submodule` objects were already refcounted internally in case
the submodule name was different from the path at which it was
stored.  This makes that refcounting externally used as well, so
`git_submodule_lookup` and `git_submodule_add_setup` return an
object that requires a `git_submodule_free` when done.
2014-03-25 09:14:48 -07:00
Anurag Gupta
892b7c9fef Correcting format of comments in header file 2014-03-24 11:20:51 -07:00
Anurag Gupta
3a666071d9 Unit Tests for hide_cb in revwalk 2014-03-24 11:20:13 -07:00
Anurag Gupta
892aa808e2 Callback to hide commits in revision walker. 2014-03-24 11:20:03 -07:00
Vicent Marti
85a41fc4bf Merge pull request #2183 from ethomson/merge_refactor
Refactor the `git_merge` API
2014-03-24 18:09:13 +01:00
Carlos Martín Nieto
6057c4a038 opts: bits are not bytes
The default cache size is 256 megabytes, not megabits as claimed in the
docs.
2014-03-24 13:21:51 +01:00
Carlos Martín Nieto
42dee8ecd7 settings: use git_buf for returning strings
This survived the last round of culling, as the signature is only in the
comments.
2014-03-24 13:21:51 +01:00
Edward Thomson
58c2b1c421 UNBORN implies FAST_FORWARD 2014-03-20 09:35:22 -07:00
Edward Thomson
ac584fcfd3 Introduce GIT_MERGE_ANALYSIS_UNBORN 2014-03-20 09:25:11 -07:00
Edward Thomson
97f3462ae6 git_merge_status -> git_merge_analysis 2014-03-20 09:25:10 -07:00
Edward Thomson
d9fdee6e4c Remove git_merge_result as it's now unnecessary 2014-03-20 09:25:09 -07:00
Edward Thomson
5aa2ac6de1 Update git_merge_tree_opts to git_merge_options 2014-03-20 09:25:08 -07:00
Edward Thomson
02105a27f0 Change signature of git_merge to take merge and checkout opts 2014-03-20 09:25:07 -07:00
Edward Thomson
1c0b6a38ba Remove fastforward / uptodate from git_merge 2014-03-20 09:25:06 -07:00
Edward Thomson
ccb308273a Add git_merge_status to provide info about an upcoming merge 2014-03-20 09:25:06 -07:00
Edward Thomson
05d47768ca Introduce git_merge_file for consumers 2014-03-20 09:25:05 -07:00
Vicent Marti
5dd7d2432e Merge pull request #2189 from Aimeast/octopus
Implement git_merge_base_octopus
2014-03-18 16:23:51 +01:00
Aimeast
0aee025bef Implement git_merge_base_octopus 2014-03-18 22:31:14 +08:00
Vicent Marti
dd4c6962d7 Merge pull request #2192 from phkelley/development
Seamless support for NTLM/Kerberos auth on Windows
2014-03-18 15:25:43 +01:00
Philip Kelley
1392418ea8 Seamless support for NTLM/Kerberos auth on Windows 2014-03-18 10:24:23 -04:00
Carlos Martín Nieto
853b1407c0 branch: constness fixes 2014-03-17 17:47:46 +01:00
Carlos Martín Nieto
2b40390f22 refs: fix copy-paste doc error 2014-03-13 15:54:53 +01:00
Jan Melcher
52fba18f4e Add git_submodule_resolve_url() 2014-03-10 18:16:10 +01:00
Vicent Marti
041cd4a23f Merge pull request #2028 from libgit2/options-names
Rename options structures
2014-03-07 19:02:58 +01:00
Russell Belfer
5a6de908f6 Merge pull request #2153 from mekishizufu/tag_example
Add a tag example
2014-03-07 09:13:43 -08:00
Ben Straub
aa17c3c63c git_revert_opts -> git_revert_options 2014-03-06 09:44:52 -08:00
Ben Straub
6affd71f33 git_checkout_opts -> git_checkout_options 2014-03-06 09:44:51 -08:00
Vicent Marti
2ab6d2cd47 Revert pull request #1997 2014-03-06 16:08:17 +01:00
Vicent Marti
4d116c3413 Merge pull request #1997 from mgbowen/merge-options-init-fix
Fix GIT_MERGE_OPTS_INIT on MSVC.
2014-03-06 16:08:12 +01:00
Matthew Bowen
b9f819978c Added function-based initializers for every options struct.
The basic structure of each function is courtesy of arrbee.
2014-03-05 21:49:23 -05:00
Jiri Pospisil
4ae4a9bbd1 Fix typo 2014-03-05 20:31:15 +01:00
Russell Belfer
13f7ecd7b9 Add git_object_short_id API to get short id string
This finds a short id string that will unambiguously select the
given object, starting with the core.abbrev length (usually 7)
and growing until it is no longer ambiguous.
2014-03-04 16:23:28 -08:00
Russell Belfer
f5753999e4 Add exists_prefix to ODB backend and ODB API 2014-03-04 15:34:23 -08:00
Arthur Schreiber
96484ecd9e Fix the description for GIT_FEATURE_SSH. 2014-03-03 12:59:35 +01:00
Vicent Marti
ebb3c506fd features: Rename _HAS_ to _FEATURE_ 2014-03-03 12:40:25 +01:00
Vicent Marti
2491c416ed caps: Rename the enum name too! 2014-03-03 12:13:17 +01:00
Vicent Marti
c9f5298b0e caps: Rename to features to avoid confusion 2014-03-03 12:10:36 +01:00
Russell Belfer
6789b7a75d Add buffer to buffer diff and patch APIs
This adds `git_diff_buffers` and `git_patch_from_buffers`.  This
also includes a bunch of internal refactoring to increase the
shared code between these functions and the blob-to-blob and
blob-to-buffer APIs, as well as some higher level assert helpers
in the tests to also remove redundancy.
2014-02-27 14:13:22 -08:00
Ben Straub
1574d3884f Merge pull request #2137 from jru/blame-first-parent
Blame first-parent history
2014-02-26 16:58:20 -05:00
Juan Rubén
899bd19a62 Document enumerator and rewording 2014-02-24 21:20:57 +01:00
Juan Rubén
c7c833947e Add option to limit blame to first parent 2014-02-23 23:26:12 +01:00
Edward Thomson
c254e2b641 Improve documentation for merging 2014-02-21 09:28:15 -08:00
Russell Belfer
72556cc63b Address PR comments
* Make GIT_INLINE an internal definition so it cannot be used in
  public headers
* Fix language in CONTRIBUTING
* Make index caps API use signed instead of unsigned values
2014-02-20 14:27:10 -08:00
Russell Belfer
978a4ed5eb Make git_oid_equal a non-inline API 2014-02-20 11:00:31 -08:00
Carlos Martín Nieto
15284a2c5a refs: move current_id before the reflog parameters
Keep the reflog parameters as the last two, as they're the optional
parameters.
2014-02-10 14:52:28 +01:00
Carlos Martín Nieto
77ad675464 refs: conditional wording fixups
This addresses arrbee's concerns about wording in the conditional
reference udpate functions.
2014-02-10 14:38:01 +01:00
Russell Belfer
80c29fe93e Add git_commit_amend API
This adds an API to amend an existing commit, basically a shorthand
for creating a new commit filling in missing parameters from the
values of an existing commit.  As part of this, I also added a new
"sys" API to create a commit using a callback to get the parents.
This allowed me to rewrite all the other commit creation APIs so
that temporary allocations are no longer needed.
2014-02-07 16:17:59 -08:00
Russell Belfer
2d9291943c Merge pull request #2099 from libgit2/bs/more-reflog-stuff
More reflogness
2014-02-07 16:14:17 -08:00
Russell Belfer
57c47af107 Merge pull request #2042 from libgit2/cmn/conditional-ref
refs: conditional ref updates
2014-02-07 16:05:19 -08:00
Ben Straub
db55bb73ff Correct default reflog message for git_remote_fetch 2014-02-06 11:18:10 -08:00
Ben Straub
2bfc673910 Fix terrible indentation 2014-02-06 10:39:57 -08:00
Ben Straub
0de2c4e3a3 Merge remote-tracking branch 'libgit2/development' into bs/more-reflog-stuff 2014-02-05 13:15:57 -08:00
Russell Belfer
df70de071a Merge pull request #2094 from libgit2/cmn/push-non-commit
Add flexibility to the revwalk API
2014-02-05 10:25:50 -08:00
Carlos Martín Nieto
d60064132a docs: produce literal asterisks 2014-02-05 13:09:34 +01:00
Carlos Martín Nieto
d465e4e980 revwalk: ignore wrong object type in glob pushes
Pushing a whole namespace can cause us to attempt to push non-committish
objects. Catch this situation and special-case it for ignoring this.
2014-02-05 12:16:44 +01:00
Carlos Martín Nieto
f61272e047 revwalk: accept committish objects
Let the user push committish objects and peel them to figure out which
commit to push to our queue.

This is for convenience and for allowing uses of

    git_revwalk_push_glob(w, "tags")

with annotated tags.
2014-02-05 12:16:37 +01:00
Carlos Martín Nieto
5367ec4b84 refs: add an unconditional delete
Add it under the git_reference_remove() name, letting the user pass the
repo and name, analogous to unconditional setting/creation.
2014-02-05 12:07:57 +01:00
Carlos Martín Nieto
f44fd59ed7 refs: check the ref's old value when deleting
Recognize when the reference has changed since we loaded it.
2014-02-05 12:07:57 +01:00
Carlos Martín Nieto
7ee8c7e677 refs: placeholder conditional delete
We don't actually pass the old value yet.
2014-02-05 12:07:57 +01:00
Carlos Martín Nieto
878fb66f57 refs: bring conditional symbolic updates to the frontend
Bring the race detection goodness to symbolic references as well.
2014-02-05 12:07:57 +01:00
Carlos Martín Nieto
911236619b refdb: add conditional symbolic updates
Add a parameter to the backend to allow checking for the old symbolic
target.
2014-02-05 12:07:56 +01:00
Carlos Martín Nieto
fc4728e3e2 refs: return GIT_EMODIFIED if the ref target moved
In case we loose the race to update the reference, return GIT_EMODIFIED
to let the user distinguish it from other types of errors.
2014-02-05 12:07:56 +01:00
Carlos Martín Nieto
5d96fe8828 refs: changes from feedback
Change the name to _matching() intead of _if(), and force _set_target()
to be a conditional update. If the user doesn't care about the old
value, they should use git_reference_create().
2014-02-05 12:07:56 +01:00
Carlos Martín Nieto
9b148098e6 refs: conditional ref updates
Allow updating references if the old value matches the given one.
2014-02-05 12:07:56 +01:00
Ben Straub
010cec3ac2 Add reflog params to git_repository_detach_head 2014-02-04 20:50:40 -08:00
Ben Straub
c3ab1e5af4 Add reflog parameters to remote apis
Also added a test for git_remote_fetch.
2014-02-04 20:38:13 -08:00
Ben Straub
491cecfe8c Add reflog parameters to git_push_update_tips 2014-02-04 20:27:44 -08:00
Ben Straub
586be3b889 Add reflog parameters to git_reset 2014-02-03 15:05:55 -08:00
Arthur Schreiber
50ad7cc208 Add git_reference_is_note. 2014-02-02 18:20:38 +01:00
Ben Straub
a1b07dca7d Document branch-creation reflog better 2014-01-30 15:53:52 -08:00
Ben Straub
ccf6ce5c89 Ensure renaming a reference updates the reflog 2014-01-30 15:52:13 -08:00
Ben Straub
540c1809f4 Add reflog parameters to git_branch_move 2014-01-30 15:52:13 -08:00
Ben Straub
1cc974ab62 Augment clone API with reflog parameters 2014-01-30 15:52:13 -08:00
Ben Straub
b31ebfbc66 Add reflog params to git_branch_create 2014-01-30 15:52:13 -08:00
Ben Straub
94f263f59b Add reflog params to set-head calls 2014-01-30 15:51:00 -08:00
Russell Belfer
e9d5e5f3d4 Some fixes for Windows x64 warnings 2014-01-30 09:59:59 -08:00
Russell Belfer
c0644c3fbb Make submodule fetchRecurse match other options
This removes the fetchRecurse compiler warnings and makes the
behavior match the other submodule options (i.e. the in-memory
setting can be reset to the on-disk value).
2014-01-30 09:59:59 -08:00
Russell Belfer
5572d2b8a1 Some missing oid to id renames 2014-01-30 09:59:59 -08:00
Arthur Schreiber
e7c16943f4 Add git_graph_descendant_of. 2014-01-28 19:39:14 +01:00
Vicent Marti
93954245e0 Merge pull request #2075 from libgit2/cmn/leftover-oid
Leftover OID -> ID changes
2014-01-27 09:39:36 -08:00
Carlos Martín Nieto
bf522e0811 refspec: move to git_buf for outputting strings 2014-01-27 04:44:06 +01:00
Carlos Martín Nieto
e1d7f0035e messsage: use git_buf in prettify()
A lot of the tests were checking for overflow, which we don't have
anymore, so we can remove them.
2014-01-27 04:44:06 +01:00
Carlos Martín Nieto
ee550477d1 config: use git_buf for returning paths
Again, we already did this internally, so simply remove the conversions.
2014-01-27 04:44:05 +01:00
Carlos Martín Nieto
b25d87c9cd branch: move to git_buf when outputting newly-allocated strings
Internally we already did everything with git_bufs, so this is just
exposing those functions with public names.
2014-01-27 04:44:05 +01:00
Carlos Martín Nieto
7a3bd1e732 repository: move to use a git_buf for outputting strings
Since we now export that type, we can avoid making the user guess a
size.
2014-01-27 04:44:05 +01:00
Arthur Schreiber
991b2840eb Make sure git_remote_dup copies a remote's refspecs correctly. 2014-01-26 19:35:02 +01:00