Edward Thomson
8639ea5f98
checkout: introduce GIT_CHECKOUT_DONT_WRITE_INDEX
2015-02-14 09:25:35 -05:00
Edward Thomson
49b8293c75
rebase: allow NULL
branch to indicate HEAD
...
Don't require the branch to rebase, if given `NULL`, simply look up
`HEAD`.
2015-02-13 11:20:32 -05:00
Carlos Martín Nieto
dc63c0496b
Merge pull request #2893 from phatblat/ben/pr/doc-comments
...
Fix doc comment formatting
2015-02-11 23:44:05 +01:00
John Haley
a36486ef26
Fixed error when including git2/include/sys/stream.h
2015-02-11 23:30:34 +01:00
Ben Chatelain
c03e8c224c
Use correct Doxygen trailing comment syntax
2015-02-10 12:44:05 -07:00
Ben Chatelain
ec7e1c93ce
Fix doc comment formatting
2015-02-10 08:31:48 -07:00
Edward Thomson
3538f8f131
diff docs: update git_diff_delta
description
2015-02-03 13:41:35 -05:00
Pierre-Olivier Latour
9a294fd8c5
Clarified git_repository_is_empty() documentation
2015-01-27 08:17:23 -08:00
Edward Thomson
1ac5acdc69
Merge pull request #2819 from libgit2/cmn/config-get-path
...
config: add parsing and getter for paths
2015-01-26 11:28:59 -06:00
Edward Thomson
f483720c6f
Merge pull request #2839 from swisspol/typo
...
Fixed typo in git_repository_reinit_filesystem() documentation
2015-01-26 11:25:16 -06:00
Pierre-Olivier Latour
86815dca20
Make sure sys/repository.h includes the required headers
...
It was missing "common.h" and "types.h" like other system headers.
This generated compilation errors if including it directly.
2015-01-23 16:04:23 -08:00
Pierre-Olivier Latour
22b6a92365
Fixed typo in git_repository_reinit_filesystem() documentation
2015-01-23 15:59:54 -08:00
Edward Thomson
e74340b000
checkout: remove files before writing new ones
...
On case insensitive filesystems, we may have files in the working
directory that case fold to a name we want to write. Remove those
files (by default) so that we will not end up with a filename that
has the unexpected case.
2015-01-20 17:13:31 -06:00
Edward Thomson
fe598f0903
mkdir: walk up tree to mkdir
...
Walk up the tree to mkdir, which is less immediately efficient,
but allows us to look at intermediate directories that may need
attention.
2015-01-20 17:12:46 -06:00
Edward Thomson
1d50b3649d
checkout: introduce git_checkout_perfdata
...
Checkout can now provide performance data about the number of (some)
syscalls performed using an optional callback.
2015-01-20 17:12:23 -06:00
Carlos Martín Nieto
eac773d92b
config: add parsing and getter for paths
2015-01-14 19:36:50 +01:00
Edward Thomson
85880693d5
Merge branch 'pr/2740'
2015-01-14 10:19:28 -06:00
Pierre-Olivier Latour
36fc549781
Added GIT_HASHSIG_ALLOW_SMALL_FILES to allow computing signatures for small files
...
The implementation of the hashsig API disallows computing a signature on
small files containing only a few lines. This new flag disables this
behavior.
git_diff_find_similar() sets this flag by default which means that rename
/ copy detection of small files will now work. This in turn affects the
behavior of the git_status and git_blame APIs which will now detect rename
of small files assuming the right options are passed.
2015-01-14 10:17:56 -06:00
David Calavera
c868981f0e
Add extern function to initialize submodule update options.
2015-01-07 09:04:49 -06:00
Carlos Martín Nieto
239bdc5761
Merge pull request #2799 from ethomson/merge_doc
...
Better document `git_merge_commits`
2015-01-05 21:28:30 +00:00
Carlos Martín Nieto
9b2efc15a2
Bump version to 0.22
...
Bump the version number to 0.22.0 and the SOVERSION to 22.
2015-01-05 20:16:48 +00:00
Carlos Martín Nieto
0c6012293a
Merge commit 'refs/pull/2632/head' of github.com:libgit2/libgit2
2015-01-05 20:10:43 +00:00
Edward Thomson
5e44d9bcb6
Better document git_merge_commits
...
`git_merge_commits` (and thus `git_merge`) do not use the same
strategy as `git-merge-recursive` wherein they can produce an
artificial common ancestor that is the merge of all common
ancestors. Document this accordingly.
2015-01-05 11:35:18 -06:00
David Calavera
d76e9df9a2
Include git2/common.h in sys/openssl.h.
2015-01-02 15:56:03 -08:00
Pierre-Olivier Latour
f8263472d1
Fixed git_revert() documentation
2014-12-30 15:54:30 -08:00
Edward Thomson
a3ef70bb40
Merge pull request #2761 from libgit2/cmn/fetch-prune
...
Remote-tracking branch prunning
2014-12-30 11:53:55 -06:00
Edward Thomson
c4c47fc286
Merge pull request #2762 from libgit2/cmn/hide-push
...
remote: remove git_push from the public API
2014-12-30 11:53:45 -06:00
Carlos Martín Nieto
fe794b2ea7
remote: remove git_push from the public API
...
Instead we provide git_remote_upload() and git_remote_update_tips() in
order to have a parallel API for fetching and pushing.
2014-12-30 17:02:50 +00:00
Carlos Martín Nieto
208a2c8aef
treebuilder: rename _create() to _new()
...
This function is a constructor, so let's name it like one and leave
_create() for the reference functions, which do create/write the
reference.
2014-12-27 12:09:11 +00:00
Edward Thomson
2fe8157e1b
index: reuc and name entrycounts should be size_t
...
For the REUC and NAME entries, we use size_t internally, and we take
size_t for the get_byindex() functions, but the entrycount() functions
strangely cast to an unsigned int instead.
2014-12-22 18:42:03 -06:00
Jameson Miller
9d1f97df10
Introduce a convenience function for submodule update
...
This introduces the functionality of submodule update in
'git_submodule_do_update'. The existing 'git_submodule_update' function is
renamed to 'git_submodule_update_strategy'. The 'git_submodule_update'
function now refers to functionality similar to `git submodule update`,
while `git_submodule_update_strategy` is used to get the configured value
of submodule.<name>.update.
2014-12-22 16:37:35 -05:00
Edward Thomson
d147900ea4
Merge pull request #2759 from libgit2/cmn/openssl-sys
...
Make OpenSSL locking warnings more severe
2014-12-20 21:24:45 -06:00
Damien PROFETA
ceb651c9b0
Fix public header on sys/refs.h
...
GIT_BEGIN/END_DECL were missing from sys/refs.h and preventing
compilation with g++ as the symbol were mangled.
2014-12-19 15:31:49 +01:00
Edward Thomson
dce7b1a4e7
treebuilder: take a repository for path validation
...
Path validation may be influenced by `core.protectHFS` and
`core.protectNTFS` configuration settings, thus treebuilders
can take a repository to influence their configuration.
2014-12-17 13:05:27 -05:00
Carlos Martín Nieto
26186b155b
fetch: remove the prune setter
...
This option does not get persisted to disk, which makes it different
from the rest of the setters. Remove it until we go all the way.
We still respect the configuration option, and it's still possible to
perform a one-time prune by calling the function.
2014-12-14 21:52:27 +01:00
Linquize
5f47394753
remote: prune refs when fetching
2014-12-14 17:04:01 +01:00
Carlos Martín Nieto
263b1d6ed9
Make the OpenSSL locking function warnings more severe
...
Our git_openssl_set_locking() would ideally not exist. Make it clearer
that we provide it as a last resort and you should prefer anything else.
2014-12-12 15:46:57 +01:00
Carlos Martín Nieto
85a6d5f49c
push: reword comment on finish()
...
This should make it clearer what the return value implies.
2014-12-10 18:55:54 +01:00
Carlos Martín Nieto
d524b2d3d1
push: fold unpack_ok() into finish()
...
The push cannot be successful if we sent a bad packfile. We should
return an error in that case instead of storing it elsewhere.
2014-12-10 18:55:54 +01:00
Edward Thomson
cd305c2f56
Merge pull request #2678 from libgit2/cmn/io-stream
...
Introduce stackable IO streams
2014-12-10 11:30:28 -05:00
Carlos Martín Nieto
49ae22baac
stream: constify the write buffer
2014-12-10 16:20:52 +01:00
Carlos Martín Nieto
dd4ff2c9b5
Introduce stackable IO streams
...
We currently have gitno for talking over TCP, but this needs to know
about both plaintext and OpenSSL connections and the code has gotten
somewhat messy with ifdefs determining which version of the function
should be called.
In order to clean this up and abstract away the details of sending over
the different types of streams, we can instead use an interface and
stack stream implementations.
We may not be able to use the stackability with all streams, but we
are definitely be able to use the abstraction which is currently spread
between different bits of gitno.
2014-12-10 01:17:40 +01:00
Edward Thomson
f2e09b8aac
Merge pull request #2748 from libgit2/cmn/doc-all
...
doc: add documentation to all the public structs and enums
2014-12-06 12:26:04 -05:00
Carlos Martín Nieto
bfa6cdbf13
notes: fix comments for git_note_next()
...
The iterator is the last argument. There is also no returned notes, just
ids, so the comment about freeing is out of place.
2014-12-06 04:20:10 +01:00
Carlos Martín Nieto
21083a7129
notes: move the notes name argument
...
Make it consistent between git_note_create() and git_note_remote() by
putting it after the repository.
2014-12-06 04:20:09 +01:00
Carlos Martín Nieto
a295bd2dc4
doc: add documentation to all the public structs and enums
...
This makes them show up in the reference, even if the text itself isn't
the most descriptive.
These have been found with
grep -Przon '\n\ntypedef struct.*?\{' -- include
grep -Przon '\n\ntypedef enum.*?\{' -- include
2014-12-06 03:44:40 +01:00
nulltoken
30ec05260d
Merge pull request #2744 from epmatsw/spelling
...
Spelling fixes
2014-12-05 07:44:09 +01:00
Will Stamper
b874629b2d
Spelling fixes
2014-12-04 21:06:59 -06:00
Edward Thomson
6d91dc5351
init: return the number of initializations
2014-12-04 20:42:27 -05:00
Edward Thomson
e952bc5a57
Merge pull request #2718 from libgit2/cmn/peeling-errors
...
peel: reject bad queries with EPEEL
2014-11-23 17:15:18 -05:00
Carlos Martín Nieto
753e17b0f5
peel: reject bad queries with EINVALIDSPEC
...
There are some combination of objects and target types which we know
cannot be fulfilled. Return EINVALIDSPEC for those to signify that there
is a mismatch in the user-provided data and what the object model is
capable of satisfying.
If we start at a tag and in the course of peeling find out that we
cannot reach a particular type, we return EPEEL.
2014-11-22 18:55:22 +01:00
Carlos Martín Nieto
8fd7dd778d
remote: don't say we free the remote on disconnect
...
On disconnect we simply ask the transport to close the connection, we do
not free it.
2014-11-19 15:49:47 +01:00
Carlos Martín Nieto
699dfcc3bc
remote: clarify which list of references _ls() returns
...
Make it clear that this is not the ls-remote command but a way to access
the data we have and how long it's kept around.
2014-11-19 15:49:02 +01:00
Edward Thomson
45301cca30
Merge pull request #2608 from libgit2/cmn/remote-push
...
Provide a convenience function `git_remote_push()`
2014-11-18 11:44:59 -05:00
Carlos Martín Nieto
64e3e6d43a
remote: use configured push refspecs if none are given
...
If the user does not pass any refspecs to push, try to use those
configured via the configuration or via add_push().
2014-11-09 00:01:58 +01:00
Carlos Martín Nieto
3149547b5a
remote: introduce git_remote_push()
...
This function, similar in style to git_remote_fetch(), performs all the
steps required for a push, with a similar interface.
The remote callbacks struct has learnt about the push callbacks, letting
us set the callbacks a single time instead of setting some in the remote
and some in the push operation.
2014-11-09 00:01:58 +01:00
Carlos Martín Nieto
799e22ea0c
Rename git_threads_ to git_libgit2_
...
This describes their purpose better, as we now initialize ssl and some
other global stuff in there. Calling the init function is not something
which has been optional for a while now.
2014-11-08 23:46:39 +01:00
Edward Thomson
02bc523304
Merge pull request #2698 from libgit2/cmn/fetchhead-refactor
...
Refactor fetchhead
2014-11-08 17:05:13 -05:00
Edward Thomson
bc8c4a8aeb
Merge pull request #2695 from libgit2/cmn/remote-lookup
...
remote: rename _load() to _lookup()
2014-11-08 16:55:23 -05:00
Carlos Martín Nieto
82374d9825
branch: add getter for the upstream remote name
...
This gets the value from branch.<foo>.remote.
2014-11-08 20:00:17 +01:00
Carlos Martín Nieto
209425ce26
remote: rename _load() to _lookup()
...
This brings it in line with the rest of the lookup functions.
2014-11-08 13:28:27 +01:00
Ungureanu Marius
6818208569
git_status_file now takes an exact path
...
This function has one output but can match multiple files, which can be
unexpected for the user, which would usually path the exact path of the
file he wants the status of.
2014-11-07 21:34:54 +02:00
Edward Thomson
7bb639911b
Merge pull request #2676 from libgit2/cmn/threading
...
Threading and crypto libraries
2014-11-06 10:25:23 -05:00
Edward Thomson
0a62918188
Merge pull request #2661 from swisspol/2656
...
Changed context_lines and interhunk_lines to uint32_t to match struct s_xdemitconf
2014-11-03 15:10:14 +01:00
Carlos Martín Nieto
521c0cab7a
merge: talk about the merging state after git_merge()
...
Since it's not necessarily obvious, mention the merging state and how to
clear it.
2014-11-02 17:18:19 +01:00
Carlos Martín Nieto
fe6b51ae40
ssl: separate locking init from general init
...
Extract the lock-setting functions into their own, as we cannot assume
that it's ok for us to set this unconditionally.
2014-11-01 10:58:55 +01:00
Pierre-Olivier Latour
d88766c4e1
Changed context_lines and interhunk_lines to uint32_t to match struct s_xdemitconf
2014-10-27 09:17:01 -07:00
Edward Thomson
979645a719
rebase: updates based on PR comments
2014-10-26 22:59:50 -04:00
Edward Thomson
18b00406c6
s/git_merge_head/git_annotated_commit
...
Rename git_merge_head to git_annotated_commit, as it becomes used
in more operations than just merge.
2014-10-26 22:59:48 -04:00
Edward Thomson
e69737d760
rebase: oid member of operation should be const
2014-10-26 22:59:43 -04:00
Edward Thomson
ed2c06a6a1
git_rebase: iterators for operations
2014-10-26 22:59:41 -04:00
Edward Thomson
f152f8ac0c
rebase: preload all operations
2014-10-26 22:59:38 -04:00
Edward Thomson
b6b636a7fa
rebase: init/open a git_rebase object
2014-10-26 22:59:36 -04:00
Edward Thomson
18b439b9be
git_rebase_next: provide info about the operation
2014-10-26 22:59:34 -04:00
Edward Thomson
5ae9d296e3
git_rebase_finish: rewrite notes when finishing rebase
2014-10-26 22:59:32 -04:00
Edward Thomson
bad4937ea5
Introduce git_note_author
, git_note_committer
2014-10-26 22:59:29 -04:00
Edward Thomson
517644cce4
Introduce git_rebase_finish to complete a rebase
2014-10-26 22:59:25 -04:00
Edward Thomson
93a7004cc2
git_rebase_commit: drop already-picked commits
...
Already cherry-picked commits should not be re-included. If all changes
included in a commit exist in the upstream, then we should error with
GIT_EAPPLIED.
2014-10-26 22:59:21 -04:00
Edward Thomson
a35a9890b0
Introduce git_rebase_commit
...
Commit the current patch of a rebase process.
2014-10-26 22:59:19 -04:00
Edward Thomson
950a709159
Introduce git_rebase_next
...
`git_rebase_next` will apply the next patch (or cherry-pick)
operation, leaving the results checked out in the index / working
directory so that consumers can resolve any conflicts, as appropriate.
2014-10-26 22:59:14 -04:00
Edward Thomson
4fe84d624b
Introduce git_rebase_abort
...
Abort an in-progress rebase and move the working directory and
repository back to the ORIG_HEAD state.
2014-10-26 22:59:12 -04:00
Edward Thomson
daf395b795
git_reset: const the git_signature arg
2014-10-26 22:59:10 -04:00
Edward Thomson
867a36f3a6
Introduce git_rebase to set up a rebase session
...
Introduce `git_rebase` to set up a rebase session that can
then be continued. Immediately, only merge-type rebase is
supported.
2014-10-26 22:59:08 -04:00
Edward Thomson
d09458f3e9
Merge pull request #2638 from libgit2/cmn/config-refresh-remove
...
config: remove the refresh function and backend field
2014-10-24 16:52:39 -07:00
Edward Thomson
725cd5f29d
Merge pull request #2646 from libgit2/cmn/remote-rename
...
remote: accept a repo and name for renaming
2014-10-24 16:44:07 -07:00
Carlos Martín Nieto
46c8f7f845
remote: accept a repo and name for renaming
...
Remote objects are not meant to be changed from under the user. We did
this in rename, but only the name and left the refspecs, such that a
save would save the wrong refspecs (and a fetch and anything else would
use the wrong refspecs).
Instead, let's simply take a name and not change any loaded remote from
under the user.
2014-10-24 16:25:59 +02:00
Carlos Martín Nieto
0862f617da
remote: delete git_remote_supported_url()
...
This function does not in fact tell us anything, as almost anything with
a colon in it is a valid rsync-style SSH path; it can not tell us that
we do not support ftp or afp or similar as those are still valid SSH
paths and we do support that.
2014-10-24 13:40:42 +02:00
Carlos Martín Nieto
55cb499972
config: remove the refresh function and backend field
...
We have been refreshing on read and write for a while now, so
git_config_refresh() is at best a no-op, and might just end up wasting
cycles.
2014-10-23 19:05:02 +02:00
Carlos Martín Nieto
12e1803188
Update some documentation
2014-10-18 15:22:19 +02:00
Russell Belfer
babbff347c
Move un-namespaced constant to internal header
...
FLAG_BITS only seems to be used internally
2014-10-10 15:17:05 -07:00
Edward Thomson
a6ed1fcbe1
Merge pull request #2593 from libgit2/cmn/remote-delete-name
...
remote: accept a repository and remote name for deletion
2014-10-10 12:21:28 -04:00
Carlos Martín Nieto
bab92a8dcf
Merge pull request #2575 from cirosantilli/factor-struct-typedef
...
[factor] Join typedef and struct definitions in single file.
2014-10-10 18:06:36 +02:00
Carlos Martín Nieto
9b36537de4
Merge pull request #2588 from swansontec/ssl-cert-path2
...
Add support for setting the SSL CA location
2014-10-10 17:42:52 +02:00
Carlos Martín Nieto
0625638f06
Merge pull request #2499 from csware/hard-reset-checkout-callbacks
...
Allow to propagate checkout callbacks to git HARD reset
2014-10-10 17:40:53 +02:00
Edward Thomson
f54d8d528a
Merge pull request #2574 from csware/hostname-for-certificate_check_cb
...
Provide host name to certificate_check_cb
2014-10-10 11:28:58 -04:00
Arthur Schreiber
8e398e4c84
Treat an empty list of refspecs the same as a NULL value.
2014-10-10 13:17:53 +02:00
Carlos Martín Nieto
46a2b8e855
Merge pull request #2592 from libgit2/cmn/describe
...
Implement git-describe
2014-10-09 22:24:40 +02:00
Edward Thomson
10cf4b26a0
Merge pull request #2448 from libgit2/cmn/reference-transaction
...
Introduce reference transactions
2014-10-09 10:49:37 -04:00
Edward Thomson
8be28acfcd
Merge pull request #2462 from libgit2/cmn/remote-fetch-refs
...
Implement opportunistic ref updates
2014-10-09 10:41:38 -04:00
Carlos Martín Nieto
c327d5db8b
transaction: rename lock() to lock_ref()
...
This leaves space for future expansion to locking other resources
without having to change the API for references.
2014-10-09 16:29:30 +02:00