Commit Graph

91 Commits

Author SHA1 Message Date
Jameson Miller
bc737620dd Introduce option to use relative paths for repository work directory
Teach git_repository_init_ext to use relative paths for the gitlink
to the work directory. This is used when creating a sub repository
where the sub repository resides in the parent repository's
.git directory.
2014-09-02 21:07:26 -04:00
Edward Thomson
0ba4dca526 git_cherry_pick -> git_cherrypick 2014-07-22 10:40:23 -04:00
Michael Anderson
31b0cb518f Fixed miscellaneous documentation errors. 2014-05-23 15:57:20 +08:00
Russell Belfer
b1914c3651 Minor fixes for warnings and error propagation 2014-05-12 10:24:46 -07:00
Russell Belfer
d2c4d1c63d Merge pull request #2188 from libgit2/cmn/config-snapshot
Configuration snapshotting
2014-05-12 10:04:52 -07:00
Carlos Martín Nieto
ac99d86ba5 repository: introduce a convenience config snapshot method
Accessing the repository's config and immediately taking a snapshot of
it is a common operation, so let's provide a convenience function for
it.
2014-05-07 11:34:32 +02:00
Russell Belfer
5269008cf6 Add filter options and ALLOW_UNSAFE
Diff and status do not want core.safecrlf to actually raise an
error regardless of the setting, so this extends the filter API
with an additional options flags parameter and adds a flag so that
filters can be applied with GIT_FILTER_OPT_ALLOW_UNSAFE, indicating
that unsafe filter application should be downgraded from a failure
to a warning.
2014-05-06 16:01:49 -07:00
Russell Belfer
702efc891f Make init_options fns use unsigned ints and macro
Use an unsigned int for the version and add a helper macro so the
code is simplified (and so the error message is a common string).
2014-05-02 09:21:33 -07: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
Ben Straub
010cec3ac2 Add reflog params to git_repository_detach_head 2014-02-04 20:50:40 -08:00
Ben Straub
94f263f59b Add reflog params to set-head calls 2014-01-30 15:51:00 -08: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
Russell Belfer
373cf6a932 Update docs for new callback return value behavior 2013-12-11 10:57:50 -08:00
Edward Thomson
bab0b9f2d2 clean up state metadata more consistently 2013-12-02 16:57:41 -06:00
Carlos Martín Nieto
605da51a2c No such thing as an orphan branch
Unfortunately git-core uses the term "unborn branch" and "orphan
branch" interchangeably. However, "orphan" is only really there for
the checkout command, which has the `--orphan` option so it doesn't
actually create the branch.

Branches never have parents, so the distinction of a branch with no
parents is odd to begin with. Crucially, the error messages deal with
unborn branches, so let's use that.
2013-09-17 09:50:30 +02: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
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
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
Ben Straub
93d8f77fed Improve test failure output 2013-05-23 15:35:50 -07:00
Linquize
0cb16fe924 Unify whitespaces to tabs 2013-05-15 20:26:55 +08: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 Marti
bade51948c lol namespaces 2013-04-30 21:02:13 +02:00
Russell Belfer
1384b688d0 Move some low-level repo fns to include/git2/sys 2013-04-21 11:50:56 -07:00
John Wiegley
7cc3c92027 Added git_repository_new function 2013-04-21 11:50:56 -07:00
Vicent Marti
437d36662e repository: Doc fix 2013-04-18 00:15:29 +02:00
Vicent Marti
a442ed687d repository: Add git_repository_open_bare 2013-04-17 04:46:37 +02:00
Edward Thomson
d00d54645d immutable references and a pluggable ref database 2013-03-07 11:01:52 -06:00
Edward Thomson
359fc2d241 update copyrights 2013-01-08 17:31:27 -06:00
Kevin Sawicki
7eb222fc7d Correct typos in documentation 2013-01-06 10:39:35 -08:00
Edward Thomson
42e50b5ed1 MERGE_HEAD contents iterator 2013-01-03 16:35:59 -06:00
Edward Thomson
ad2bc32fa3 expose merge metadata cleanup 2013-01-03 15:53:50 -06:00
Edward Thomson
7fcec83428 fetchhead reading/iterating 2012-12-19 16:57:30 -06:00
Ben Straub
fac43c54a6 Allow compilation as C++ 2012-12-06 19:41:52 -08:00
Ben Straub
bde336ea51 Add version fields and init macros for public input structs. 2012-11-30 12:55:45 -08:00
Russell Belfer
ca94e031fa Various minor commenting fixes 2012-11-27 15:28:48 -08:00
Ben Straub
f4a62c306d Typedef enums. 2012-11-27 14:13:03 -08:00
Ben Straub
c9fc4a6ff9 API updates for repository.h 2012-11-27 13:44:49 -08:00
nulltoken
6091457e76 repo: ensure is_empty() checks there are no refs 2012-11-17 07:20:08 -08:00
nulltoken
b1a3a70ed1 repository: Refine repository_head() error report 2012-11-12 00:14:51 +01:00
nulltoken
31966d20e3 repo: enhance git_repository_state() detection 2012-10-27 16:45:59 +02:00
Edward Thomson
632d8b230b reset changes for merge 2012-10-24 20:24:37 -05:00
Vicent Marti
875b16eb54 repository: Typo 2012-10-19 23:44:49 +02:00
nulltoken
8b05bea870 errors: deploy GIT_EORPHANEDHEAD usage 2012-10-19 22:01:53 +02:00
nulltoken
44af67a8b6 repository: introduce git_repository_set_head() 2012-09-17 10:48:35 +02:00
nulltoken
4ebe38bd58 repository: introduce git_repository_set_head_detached() 2012-09-17 10:48:35 +02:00
nulltoken
3f4c3072ea repository: introduce git_repository_detach_head() 2012-09-17 10:48:34 +02:00
nulltoken
cc548c7b0f repository: fix documentation typo 2012-09-17 10:48:33 +02:00
Russell Belfer
a13fb55afd Add tests and improve param checks
Fixed some minor `git_repository_hashfile` issues:

- Fixed incorrect doc (saying that repo could be NULL)
- Added checking of object type value to acceptable ones
- Added more tests for various parameter permutations
2012-09-11 17:26:21 -07:00
Russell Belfer
47bfa0be6d Add git_repository_hashfile to hash with filters
The existing `git_odb_hashfile` does not apply text filtering
rules because it doesn't have a repository context to evaluate
the correct rules to apply.  This adds a new hashfile function
that will apply repository-specific filters (based on config,
attributes, and filename) before calculating the hash.
2012-09-11 15:01:09 -07:00