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
Arthur Schreiber
11f6ad5fcf
Add some missing const declarations.
2014-01-26 18:08:05 +01:00
Carlos Martín Nieto
a1bbc0ce20
merge: rename _oid() -> id()
...
Following the rest of the series, use 'id' when refering to the value.
2014-01-25 08:15:44 +01:00
Carlos Martín Nieto
86bfc3e1c6
diff: change id abbrev option's name to id_abbrev
...
Same as the other commits in the series, we use 'id' when talking about
thing rather than the datatype.
2014-01-25 08:15:44 +01:00
Carlos Martín Nieto
9950bb4e8d
diff: rename the file's 'oid' to 'id'
...
In the same vein as the previous commits in this series.
2014-01-25 08:15:44 +01:00
Carlos Martín Nieto
f000ee4e5b
tree: remove legacy 'oid' naming
...
Rename git_tree_entry_byoid() to _byid() as per the convention.
2014-01-25 08:15:44 +01:00
Carlos Martín Nieto
47e28349bc
commit: remvoe legacy 'oid' naming
2014-01-25 08:15:44 +01:00
Carlos Martín Nieto
d541170c77
index: rename an entry's id to 'id'
...
This was not converted when we converted the rest, so do it now.
2014-01-25 08:15:44 +01:00
Carlos Martín Nieto
d0a3de720e
note: rename the id getter to git_note_id()
...
This was left over when we did the general switch.
2014-01-24 11:18:51 +01:00
Nicolas Hake
c05cd7924d
Drop git_patch_to_str
...
It's hard or even impossible to correctly free the string buffer
allocated by git_patch_to_str in some circumstances. Drop the function
so people have to use git_patch_to_buf instead - git_buf has a dedicated
destructor.
2014-01-22 17:51:32 +01:00
Nicolas Hake
450e8e9e62
Expose patch serialization to git_buf
...
Returning library-allocated strings from libgit2 works fine on Linux,
but may cause problems on Windows because there is no one C Runtime that
everything links against. With libgit2 not exposing its own allocator,
freeing the string is a gamble.
git_patch_to_str already serializes to a buffer, then returns the
underlying memory. Expose the functionality directly, so callers can use
the git_buf_free function to free the memory later.
2014-01-22 13:40:19 +01:00
Edward Thomson
db3462ce77
Support union merges
2014-01-20 17:15:15 -05:00
Edward Thomson
0e1ba46cfb
Remove the "merge none" flag
...
The "merge none" (don't automerge) flag was only to aide in
merge trivial tests. We can easily determine whether merge
trivial resulted in a trivial merge or an automerge by examining
the REUC after automerge has completed.
2014-01-20 17:15:14 -05:00
Edward Thomson
e651e8e2b5
Introduce diff3 mode for checking out conflicts
2014-01-20 17:15:13 -05:00
Edward Thomson
c1d648c5c6
merge_file should use more aggressive levels
...
The default merge_file level was XDL_MERGE_MINIMAL, which will
produce conflicts where there should not be in the case where
both sides were changed identically. Change the defaults to be
more aggressive (XDL_MERGE_ZEALOUS) which will more aggressively
compress non-conflicts. This matches git.git's defaults.
Increase testing around reverting a previously reverted commit to
illustrate this problem.
2014-01-20 17:15:11 -05:00
Edward Thomson
b554ca5dc1
"Uninitialized" submodules are "unmodified"
...
Extend the "unmodified" submodule workdir test to include
uninitialized submodules, to prevent reporting submodules as
modified when they're not in the workdir at all.
2014-01-20 17:09:31 -05:00
Arthur Schreiber
3f033c5595
Revert a wrong doc change.
2014-01-16 21:53:25 +01:00
Arthur Schreiber
3f0e3e1662
Fix some documentation issues.
2014-01-16 21:42:28 +01:00
Carlos Martín Nieto
0b28217bda
refs: remove the _with_log differentiation
...
Any well-behaved program should write a descriptive message to the
reflog whenever it updates a reference. Let's make this more prominent
by removing the version without the reflog parameters.
2014-01-15 13:32:43 +01:00
Arthur Schreiber
529f342aba
Align git_tree_entry_dup.
2014-01-14 21:33:59 +01:00
Arthur Schreiber
29be3a6d9e
Align git_signature_dup.
...
This changes git_signature_dup to actually honor oom conditions raised by
the call to git__strdup. It also aligns it with the error code return
pattern used everywhere else.
2014-01-14 21:33:35 +01:00
Arthur Schreiber
40ef47dd46
Add git_remote_dup
.
2014-01-14 21:03:01 +01:00
Edward Thomson
6adcaab70c
Handle git_buf's from users more liberally
2014-01-08 10:08:23 -08:00
John Crepezzi
e7f89b46c3
Fix spelling mistake
...
Closes #2029
2014-01-04 18:18:59 -05:00
Russell Belfer
ac9f92316b
Merge pull request #2022 from KTXSoftware/development
...
submodule branch option + little VS2013 fix
2014-01-03 14:40:25 -08:00
Russell Belfer
9152417290
Fix warnings with submodule changes
2014-01-02 14:30:24 -08:00
Robert Konrad
1031197949
Read the submodule branch option from Git 1.8.2.
2014-01-02 15:10:32 +01:00
Linquize
fccadba252
Accept 'submodule.*.fetchRecurseSubmodules' config 'on-demand' value
2013-12-31 07:34:39 +08:00
Vicent Marti
4e1f517c61
Merge pull request #1920 from libgit2/cmn/ref-with-log
...
Reference operations with log
2013-12-18 09:33:45 -08:00