Commit Graph

1081 Commits

Author SHA1 Message Date
Russell Belfer
197b8966db Add hunk/file headers to git_diff_patch_size
This allows git_diff_patch_size to account for hunk headers and
file headers in the returned size.  This required some refactoring
of the code that is used to print file headers so that it could be
invoked by the git_diff_patch_size API.

Also this increases the test coverage and fixes an off-by-one bug
in the size calculation when newline changes happen at the end of
the file.
2013-07-23 14:34:31 -07:00
Carlos Martín Nieto
64061d4a14 remote: fix git_remote_download() documentation
The description of what the function does hasn't been true for quite a
while. Change it to reflect the way it currently works.

While here, remove an even older comment about missing features that
have been implemented.
2013-07-23 10:51:14 +02:00
Carlos Martín Nieto
c05a55b056 Clean up some documentation
clang's docparser highlighted these.
2013-07-23 09:40:19 +02:00
Russell Belfer
b4a4cf24a5 Add git_diff_patch_size() API
This adds a new API to get the size in bytes of the diffs in a
git_diff_patch object.
2013-07-22 16:07:56 -07:00
Andy Lindeman
51b0397a66 Small grammar fix in docs 2013-07-15 23:40:57 -04:00
Etienne Samson
85e1eded6a Add git_remote_owner 2013-07-15 16:31:25 +02:00
Andy Lindeman
960431c380 Fixes return type documentation 2013-07-14 18:08:54 -04:00
Russell Belfer
d70ce9bd7a Clarify docs for git_status_file 2013-07-10 15:38:57 -07:00
Russell Belfer
f9775a37aa Add ignore_submodules to diff options
This adds correct support for an equivalent to --ignore-submodules
in diff, where an actual ignore value can be passed to diff to
override the per submodule settings in the configuration.

This required tweaking the constants for ignore values so that
zero would not be used and could represent an unset option to the
diff.  This was an opportunity to move the submodule values into
include/git2/types.h and to rename the poorly named DEFAULT values
for ignore and update constants to RESET instead.

Now the GIT_DIFF_IGNORE_SUBMODULES flag is exactly the same as
setting the ignore_submodules option to GIT_SUBMODULE_IGNORE_ALL
(which is actually a minor change from the old behavior in that
submodules will now be treated as UNMODIFIED deltas instead of
being left out totally - if you set GIT_DIFF_INCLUDE_UNMODIFIED).

This includes tests for the various new settings.
2013-07-10 12:15:03 -07:00
Russell Belfer
1aad6137d2 Submodule status improvements
This fixes the way that submodule status is checked to bypass just
about all of the caching in the submodule object.  Based on the
ignore value, it will try to do the minimum work necessary to find
the current status of the submodule - but it will actually go to
disk to get all of the current values.

This also removes the custom refcounting stuff in favor of the
common git_refcount style.  Right now, it is still for internal
purposes only, but it should make it easier to add true submodule
refcounting in the future with a public git_submodule_free call
that will allow bindings not to worry about the submodule object
getting freed from underneath them.
2013-07-10 12:14:13 -07:00
Russell Belfer
3fe046cfdb Add BARE option to git_repository_open_ext
This adds a BARE option to git_repository_open_ext which allows
a fast open path that still knows how to read gitlinks and to
search for the actual .git directory from a subdirectory.

`git_repository_open_bare` is still simpler and faster, but having
a gitlink aware fast open is very useful for submodules where we
want to quickly be able to peek at the HEAD and index data without
doing any other meaningful repo operations.
2013-07-10 12:14:13 -07:00
Russell Belfer
41f1f9d732 Add API to get path to index file 2013-07-10 12:14:13 -07:00
Russell Belfer
2b672d5b64 Add git_pathspec_match_diff API
This adds an additional pathspec API that will match a pathspec
against a diff object.  This is convenient if you want to handle
renames (so you need the whole diff and can't use the pathspec
constraint built into the diff API) but still want to tell if the
diff had any files that matched the pathspec.

When the pathspec is matched against a diff, instead of keeping
a list of filenames that matched, instead the API keeps the list
of git_diff_deltas that matched and they can be retrieved via a
new API git_pathspec_match_list_diff_entry.

There are a couple of other minor API extensions here that were
mostly for the sake of convenience and to reduce dependencies
on knowing the internal data structure between files inside the
library.
2013-07-10 20:50:33 +02:00
Russell Belfer
3e96ecf219 Improve include/git2/pathspec.h docs 2013-07-10 20:50:33 +02:00
Russell Belfer
f094f9052f Add raw header access to commit API 2013-07-10 20:50:32 +02:00
Russell Belfer
d2ce27dd49 Add public API for pathspec matching
This adds a new public API for compiling pathspecs and matching
them against the working directory, the index, or a tree from the
repository.  This also reworks the pathspec internals to allow the
sharing of code between the existing internal usage of pathspec
matching and the new external API.

While this is working and the new API is ready for discussion, I
think there is still an incorrect behavior in which patterns are
always matched against the full path of an entry without taking
the subdirectories into account (so "s*" will match "subdir/file"
even though it wouldn't with core Git).  Further enhancements are
coming, but this was a good place to take a functional snapshot.
2013-07-10 20:50:31 +02:00
Vicent Martí
b8cd7aa9f6 Merge pull request #1704 from arrbee/kill-status-index-then-workdir
Remove GIT_STATUS_SHOW_INDEX_THEN_WORKDIR option
2013-07-09 17:20:55 -07:00
Vicent Martí
77fa06f3d9 Merge pull request #1695 from arrbee/fix-1695
API should not be ifdeffed
2013-07-09 17:20:36 -07:00
Russell Belfer
290e147985 Add GIT_CAP_SSH if library was built with SSH
This also adds a test that actually calls git_libgit2_capabilities
and git_libgit2_version.
2013-07-09 16:17:41 -07:00
Russell Belfer
a3c062dbf8 Make SSH APIs present even without SSH support
The SSH APIs will just return an error code and state that the
library was built without SSH support if they are called in
that case.
2013-07-09 09:58:33 -07:00
Etienne Samson
2274993be5 Make the git_signature const in the stash API. 2013-07-09 12:52:25 +02:00
Russell Belfer
2a16914c35 Remove GIT_STATUS_SHOW_INDEX_THEN_WORKDIR option
This option serves no benefit now that the git_status_list API
is available.  It was of questionable value before and now it
would just be a bad idea to use it rather than the indexed API.
2013-07-03 12:20:34 -07:00
Andrej Mitrovic
f8ccd6c935 Fix small typo in docs for git_repository_message. 2013-07-02 20:23:54 +02:00
Andrej Mitrovic
0b170f4dcb Fix docs to use proper enum names that exist. 2013-07-01 00:56:54 +02:00
Vicent Marti
eddc1f1ed7 libgit2 v0.19.0 "gut merge"
Minor point release! We got a lot of rather large features that we
wanted to get settled in:

- New (threadsafe) cache for objects
- Iterator for Status
- New Merge APIs
- SSH support on *NIX
- Function context on diff
- Namespaces support
- Index add/update/remove with wildcard support
- Iterator for References
- Fetch and push refspecs for Remotes
- Rename support in Status
- New 'sys/` namespace for external headers with low-level APIs

As always, this comes with hundreds of bug fixes and performance
improvements. We're faster and better than ever. And we haven't broken
many APIs this time!

Build stuff.
2013-06-25 00:14:45 +02:00
Andreas Linde
e196716457 Fixed most documentation header bugs
Fixed a few header @param and @return typos with the help of -Wdocumentation in Xcode.

The following warnings have not been fixed:
common.h:213 - Not sure how the documentation format is for '...'
notes.h:102 - Correct @param name but empty text
notes.h:111 - Correct @param name but empty text
pack.h:140 - @return missing text
pack.h:148 - @return missing text
2013-06-24 15:33:41 +02:00
Russell Belfer
9094ae5a3c Add target directory to checkout
This adds the ability for checkout to write to a target directory
instead of having to use the working directory of the repository.
This makes it easier to do exports of repository data and the like.

This is similar to, but not quite the same as, the --prefix option
to `git checkout-index` (this will always be treated as a directory
name, not just as a simple text prefix).

As part of this, the workdir iterator was extended to take the
path to the working directory as a parameter and fallback on the
git_repository_workdir result only if it's not specified.

Fixes #1332
2013-06-21 11:55:13 -07:00
Russell Belfer
36fd9e3065 Fix checkout of modified file when missing from wd
This fixes the checkout case when a file is modified between the
baseline and the target and yet missing in the working directory.
The logic for that case appears to have been wrong.

This also adds a useful checkout notify callback to the checkout
test helpers that will count notifications and also has a debug
mode to visualize what checkout thinks that it's doing.
2013-06-21 11:20:54 -07:00
Russell Belfer
22b6b82f2c Add status flags to force output sort order
Files in status will, be default, be sorted according to the case
insensitivity of the filesystem that we're running on.  However,
in some cases, this is not desirable.  Even on case insensitive
file systems, 'git status' at the command line will generally use
a case sensitive sort (like 'ls').  Some GUIs prefer to display a
list of file case insensitively even on case-sensitive platforms.

This adds two new flags: GIT_STATUS_OPT_SORT_CASE_SENSITIVELY
and GIT_STATUS_OPT_SORT_CASE_INSENSITIVELY that will override the
default sort order of the status output and give the user control.
This includes tests for exercising these new options and makes
the examples/status.c program emulate core Git and always use a
case sensitive sort.
2013-06-20 12:16:06 -07:00
Russell Belfer
f30fff45a7 Add index pathspec-based operations
This adds three new public APIs for manipulating the index:

1. `git_index_add_all` is similar to `git add -A` and will add
   files in the working directory that match a pathspec to the
   index while honoring ignores, etc.
2. `git_index_remove_all` removes files from the index that match
   a pathspec.
3. `git_index_update_all` updates entries in the index based on
   the current contents of the working directory, either added
   the new information or removing the entry from the index.
2013-06-19 15:27:25 -07:00
Russell Belfer
74ded02457 Add "as_path" parameters to blob and buffer diffs
This adds parameters to the four functions that allow for blob-to-
blob and blob-to-buffer differencing (either via callbacks or by
making a git_diff_patch object).  These parameters let you say
that filename we should pretend the blob has while doing the diff.
If you pass NULL, there should be no change from the existing
behavior, which is to skip using attributes for file type checks
and just look at content.  With the parameters, you can plug into
the new diff driver functionality and get binary or non-binary
behavior, plus function context regular expressions, etc.

This commit also fixes things so that the git_diff_delta that is
generated by these functions will actually be populated with the
data that we know about the blobs (or buffers) so you can use it
appropriately.  It also fixes a bug in generating patches from
the git_diff_patch objects created via these functions.

Lastly, there is one other behavior change that may matter.  If
there is no difference between the two blobs, these functions no
longer generate any diff callbacks / patches unless you have
passed in GIT_DIFF_INCLUDE_UNMODIFIED.  This is pretty natural,
but could potentially change the behavior of existing usage.
2013-06-17 17:03:34 -07:00
Russell Belfer
4e28e638ea Clarify some docs and minor reordering
This simplifies some documentation and hopefully makes a couple
of things easier to read.  Also, this rearrages the order in this
branch so that the overall diff against the trunk will hopefully
be a bit cleaner.
2013-06-17 10:03:48 -07:00
Edward Thomson
dfe8c8df37 handle renames in status computation 2013-06-17 10:03:15 -07:00
Edward Thomson
1ee2ef87ec status access by index, providing more details to callers 2013-06-17 10:03:14 -07:00
Vicent Martí
93da7af707 Merge pull request #1642 from arrbee/diff-function-context
Diff code reorg plus function context in diff headers
2013-06-12 14:52:47 -07:00
Russell Belfer
f9c824c592 Add patch from blobs API
This adds two new public APIs: git_diff_patch_from_blobs and
git_diff_patch_from_blob_and_buffer, plus it refactors the code
for git_diff_blobs and git_diff_blob_to_buffer so that they code
is almost entirely shared between these APIs, and adds tests for
the new APIs.
2013-06-12 11:55:27 -07:00
Sven Strickroth
76b893b653 Add high(est) config level for application specific config files
Some tools use an extra level to maintain an application specific config files on top of the normal ones. Revision 16adc9fade broke this.

Signed-off-by: Sven Strickroth <email@cs-ware.de>
2013-06-11 23:37:02 +02:00
Russell Belfer
5dc98298a1 Implement regex pattern diff driver
This implements the loading of regular expression pattern lists
for diff drivers that search for function context in that way.
This also changes the way that diff drivers update options and
interface with xdiff APIs to make them a little more flexible.
2013-06-11 11:22:22 -07:00
Vicent Martí
947fad4f7f Merge pull request #1624 from libgit2/vmg/full-ref-iterator
Breaking RefDB changes
2013-06-03 09:28:58 -07:00
Vicent Martí
8d863aa205 Merge pull request #1621 from NHDaly/clone_transport_flags
Added support for setting transport flags (No check SSL cert) to git_clo...
2013-05-31 06:01:59 -07:00
Nathan Daly
883929144d Added support for setting transport flags (No check SSL cert) to git_clone call. 2013-05-31 08:53:22 -04:00
Vicent Martí
9afc59710e Merge pull request #1559 from carlosmn/ref-shorthand
Introduce git_reference_shorthand
2013-05-31 03:09:38 -07:00
yorah
df50512aeb Proposal to handle default value (auto = 0) 2013-05-30 18:06:54 +02:00
Vicent Marti
4e6e2ff26f ...Aaaand this works 2013-05-30 03:47:10 +02:00
Vicent Marti
ec24e54296 What are the chances, really 2013-05-29 22:47:37 +02:00
Arthur Schreiber
31a6118175 Fix two typos in the merge docs. 2013-05-29 00:02:26 +03:00
Vicent Marti
56960b8396 Liike this 2013-05-28 20:47:55 +02:00
Michael Schubert
563c19a9ce packbuilder: also write index in git_packbuilder_write
git_packbuilder_write() used to write a packfile to the passed file
path. Instead, ask for a destination directory and create both the
packfile and an index, as most users probably do expect.
2013-05-27 13:41:09 +02:00
Daniel Rodríguez Troitiño
f8bd730cd9 Fix documentation of git_branch_delete.
The reference should be freed by the user, not the library.
2013-05-26 17:29:00 +02:00
Russell Belfer
d20b044961 Clarify GIT_DIFF_INCLUDE_UNTRACKED_CONTENT option
This improves the docs for GIT_DIFF_INCLUDE_UNTRACKED_CONTENT as
well as the other flags related to UNTRACKED items in diff, plus
it makes that flag now automatically turn on
GIT_DIFF_INCLUDE_UNTRACKED which seems like a reasonable dwim type
of change.
2013-05-24 10:37:40 -07:00
Russell Belfer
16adc9fade Typedef git_config_level_t and use it everywhere
The GIT_CONFIG_LEVEL constants actually work well as an enum
because they are mutually exclusive, so this adds a typedef to
the enum and uses that everywhere that one of these constants are
expected, instead of the old code that typically used an unsigned
int.
2013-05-24 10:35:58 -07:00
Russell Belfer
2e62e7c23c Docs for git_libgit2_opts and cache disable tweak
This adds docs for the cache control options to git_libgit2_opts
and also tweaks the cache code so that if the cache is disabled,
then the next time we attempt to insert something into the cache
in question, we will actually clear any old cached objects.
2013-05-24 10:33:41 -07:00
Russell Belfer
0f1f9833cf Add typedefs on some public enums
Apparently this makes things easier to bind in some languages.
2013-05-24 10:32:07 -07:00
Vicent Martí
26ab6284b2 Merge pull request #1593 from ethomson/conflict_iterator
introduce git_conflict_iterator
2013-05-24 03:30:35 -07:00
Vicent Martí
f7ceef06eb Merge pull request #1592 from ethomson/merge_setup
merge setup
2013-05-24 03:24:27 -07:00
Vicent Martí
4811c1500b Merge pull request #1603 from ben/shallow
Shallow-clone detection
2013-05-24 01:14:52 -07:00
Vicent Martí
30caf0cf29 Merge pull request #1595 from arrbee/even-more-rename-fixes
Even more rename detection fixes
2013-05-24 01:13:48 -07:00
Ben Straub
93d8f77fed Improve test failure output 2013-05-23 15:35:50 -07:00
Russell Belfer
67db583dab More diff rename tests; better split swap handling
This adds a couple more tests of different rename scenarios.

Also, this fixes a problem with the case where you have two
"split" deltas and the left half of one matches the right half of
the other.  That case was already being handled, but in the wrong
order in a way that could result in bad output.  Also, if the swap
also happened to put the other two halves into the correct place
(i.e. two files exchanged places with each other), then the second
delta was left with the SPLIT flag set when it really should be
cleared.
2013-05-23 15:06:07 -07:00
Russell Belfer
a21cbb12db Significant rename detection rewrite
This flips rename detection around so instead of creating a
forward mapping from deltas to possible rename targets, instead
it creates a reverse mapping, looking at possible targets and
trying to find a source that they could have been renamed or
copied from.  This is important because each output can only
have a single source, but a given source could map to multiple
outputs (in the form of COPIED records).

Additionally, this makes a couple of tweaks to the public rename
detection APIs, mostly renaming a couple of options that control
the behavior to make more sense and to be more like core Git.

I walked through the tests looking at the exact results and
updated the expectations based on what I saw.  The new code is
different from the old because it cannot give some nonsense
results (like A was renamed to both B and C) which were part of
the outputs previously.
2013-05-22 10:37:12 -07:00
Ben Straub
6828bf26e9 Merge pull request #1594 from nulltoken/topic/tag_annotation
tag: Introduce git_tag_annotation_create()
2013-05-21 10:49:36 -07:00
nulltoken
b81cc1d63b tag: Introduce git_tag_annotation_create() 2013-05-21 19:32:59 +02:00
Ben Straub
e167ec1897 Merge pull request #1597 from zodiac/patch-1
define "long name" in git_reference_name_to_id
2013-05-21 08:09:17 -07:00
Carlos Martín Nieto
fc74343ff4 refs: export the glob iterator 2013-05-21 16:51:50 +02:00
Li Xuanji
e069478edc define "long name" in git_reference_name_to_id 2013-05-21 21:35:58 +08:00
Russell Belfer
9be5be47fb More git_diff_find_similar improvements
- Add new GIT_DIFF_FIND_EXACT_MATCH_ONLY flag to do similarity
  matching without using the similarity metric (i.e. only compare
  the SHA).
- Clean up the similarity measurement code to more rigorously
  distinguish between files that are not similar and files that
  are not comparable (previously, a 0 could either mean that the
  files could not be compared or that they were totally different)
- When splitting a MODIFIED file into a DELETE/ADD pair, actually
  make a DELETED/UNTRACKED pair if the right side of the diff is
  from the working directory.  This prevents an odd mix of ADDED
  and UNTRACKED files on workdir diffs.
2013-05-20 13:37:21 -07:00
Russell Belfer
d958e37a48 Fix issues with git_diff_find_similar
There are a number of bugs in the rename code that only were
obvious when I started testing it against large old repos with
more complex patterns.  (The code to do that testing is not ready
to merge with libgit2, but I do plan to add more thorough tests.)

This contains a significant number of changes and also tweaks the
public API slightly to make emulating core git easier.

Most notably, this separates the GIT_DIFF_FIND_AND_BREAK_REWRITES
flag into FIND_REWRITES (which adds a self-similarity score to
every modified file) and BREAK_REWRITES (which splits the modified
deltas into add/remove pairs in the diff list).  When you do a raw
output of core git, rewrites show up as M090 or such, not at A and
D output, so I wanted to be able to emulate that.

Publicly, this also changes the flags to be uint16_t since we
don't need values out of that range.

Internally, this contains significant changes from a number of
small bug fixes (like using the wrong side of the diff to decide
if the object could be found in the ODB vs the workdir) to larger
issues about which files can and should be compared and how the
various edge cases of similarity scores should be treated.

Honestly, I don't think this is the last update that will have to
be made to this code, but I think this moves us closer to correct
behavior and I tried to document the code so it would be easier
to follow..
2013-05-17 17:21:45 -07:00
Russell Belfer
aadfa85b0a Add git_diff_print_raw printing helper
Makes it easier to emulate the --raw option
2013-05-17 16:41:15 -07:00
Russell Belfer
660d59caa9 Add git_oid_nfmt - a flexible OID formatter
I frequently want to the the first N digits of an OID formatted
as a string and I'd like it to be efficient.  This function makes
that easy and I could rewrite the OID formatters in terms of it.
2013-05-17 16:40:00 -07:00
Edward Thomson
0e0108f73f introduce git_conflict_iterator 2013-05-17 16:10:48 -05:00
Edward Thomson
9c06b25054 merge setup 2013-05-17 08:26:24 -05:00
nulltoken
e841c533d7 revparse: Introduce git_revparse_ext()
Expose a way to retrieve, along with the target git_object, the reference
pointed at by some revparse expression (`@{<-n>}` or
`<branchname>@{upstream}` syntax).
2013-05-16 21:43:24 +02:00
Vicent Martí
e3107e0ee1 Merge pull request #1558 from bmorganpa/ssh_transport
SSH Transport
2013-05-16 11:35:02 -07:00
Russell Belfer
58206c9ae7 Add cat-file example and increase const use in API
This adds an example implementation that emulates git cat-file.
It is a convenient and relatively simple example of getting data
out of a repository.

Implementing this also revealed that there are a number of APIs
that are still not using const pointers to objects that really
ought to be.  The main cause of this is that `git_vector_bsearch`
may need to call `git_vector_sort` before doing the search, so a
const pointer to the vector is not allowed.  However, for tree
objects, with a little care, we can ensure that the vector of
tree entries is always sorted and allow lookups to take a const
pointer.  Also, the missing const in commit objects just looks
like an oversight.
2013-05-16 10:38:27 -07:00
Russell Belfer
89251b283b Update index.h docs
Move the git_index_entry to the very top, since it provides the
main structure that needs to be understood by the reader, then
move the bitmasks for the flags and the flags_extended under that
since they are details for looking at particular fields of the
structure.
2013-05-15 16:25:11 -07:00
Russell Belfer
96c01991c1 Remove entry dup/free functions and fix comments
This removes the functions to duplicate and free copies of a
git_index_entry and updates the comments to explain that you
should just use the public definition of the struct as needed.
2013-05-15 16:13:04 -07:00
Russell Belfer
797dfb28fe Add APIs to dup and free git_index_entrys
This adds git_index_entry_dup to make a copy of an existing entry
and git_index_entry_free to release the memory of the copy.  It
also updates the documentation for git_index_get_bypath and
git_index_get_byindex to make it clear that the returned structure
should *not* be modified.
2013-05-15 16:11:31 -07:00
Russell Belfer
487884a930 Improve docs for git_index_entry flag masks
The constants for extracting data from git_index_entry flags and
flags_extended are not named in a way that makes it easy to know
where to use each one.  This improves the docs for the flags (and
slightly reorganizes them), so it should be more obvious.
2013-05-15 16:11:31 -07:00
Vicent Martí
7159620044 Merge pull request #1588 from arrbee/fixes-for-checkout-and-diff
Bug fixes for checkout and diff
2013-05-15 15:47:46 -07:00
Russell Belfer
dcb0f7c061 Fix checkout of submodules with no .gitmodules
It is possible for there to be a submodule in a repository with
no .gitmodules file (for example, if the user forgot to commit
the .gitmodules file).  In this case, core Git will just create
an empty directory as a placeholder for the submodule but
otherwise ignore it.  We were generating an error and stopping
the checkout.  This makes our behavior match that of core git.
2013-05-15 14:54:02 -07:00
nulltoken
1fed6b07f0 Fix trailing whitespaces 2013-05-15 22:41:30 +02:00
Linquize
0cb16fe924 Unify whitespaces to tabs 2013-05-15 20:26:55 +08:00
Edward Thomson
b6cc559a78 Merge pull request #1385 from carlosmn/refs-iter
Introduce a refs iterator
2013-05-11 02:42:49 -07:00
Carlos Martín Nieto
c58cac12c2 Introduce a glob-filtering iterator
If the backend doesn't provide support for it, the matching is done in
refdb on top of a normal iterator.
2013-05-11 11:20:38 +02:00
Carlos Martín Nieto
2b562c3a1e refs: remove the OID/SYMBOLIC filtering
Nobody should ever be using anything other than ALL at this level, so
remove the option altogether.

As part of this, git_reference_foreach_glob is now implemented in the
frontend using an iterator. Backends will later regain the ability of
doing the glob filtering in the backend.
2013-05-11 11:20:38 +02:00
Carlos Martín Nieto
4def7035ca refs: introduce an iterator
This allows us to get a list of reference names in a loop instead of callbacks.
2013-05-11 11:20:37 +02:00
Brad Morgan
89ea0e5181 Removed ifdef 2013-05-10 09:40:14 -04:00
Brad Morgan
b4d81a00bf Moved libssh2 sign callback into typedef 2013-05-09 17:40:21 -04:00
Russell Belfer
3d1c9f612d Fix git_repository_message docs
This clarifies the docs for git_repository_message and also adds
to the tests to explicitly check NUL termination of data when the
output buffer is smaller than the message size.  There is a minor
behavior change so that a non-NULL output buffer will always be
NUL terminated (at length zero) if an error occurs.
2013-05-09 06:45:06 -07:00
Vicent Martí
503dd0f3c4 Merge pull request #1560 from carlosmn/ref-dwim
Expose git_reference_dwim
2013-05-09 05:43:25 -07:00
Carlos Martín Nieto
4f2eb2b7f4 Introduce git_reference_shorthand
Generate a shorthand name out of the full refname.
2013-05-08 02:28:47 +02:00
Vicent Martí
af795759a7 Merge pull request #1552 from carlosmn/config-helpers
Config helpers for global/xdg config files
2013-05-07 15:09:11 -07:00
Carlos Martín Nieto
98d633cccf Expose git_reference_dwim
Extract this function out of the rev-parse code to be able to DWIM a
reference instead of its target.
2013-05-07 23:34:48 +02:00
Carlos Martín Nieto
5d8318875f config: convenience function to open global/xdg
The rules for which one to open is a bit silly, so let's make it
easier for our users.
2013-05-07 21:42:56 +02:00
Brad Morgan
4ca3d6d28f Added ifdef 2013-05-07 14:37:15 -04:00
Brad Morgan
00e43380a0 Merge remote-tracking branch 'origin/development' into ssh_transport 2013-05-07 14:30:35 -04:00
Brad Morgan
574b86b722 Fixed compilation issues when libssh2 is missing 2013-05-07 13:56:34 -04:00
Brad Morgan
c36565c0ee Added SSH public key authentication 2013-05-07 13:45:31 -04:00
Vicent Martí
33665410d6 Merge pull request #1556 from arrbee/diff-patch-fixes
Diff patch bug fixes
2013-05-07 08:00:44 -07:00
Russell Belfer
d63eec6946 Improve diff function docs 2013-05-07 04:44:08 -07:00