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