|
2ea40fda
|
2015-11-20T13:19:23
|
|
repository: distinguish sequencer cherry-pick and revert
These are not quite like their plain counterparts and require special handling.
|
|
41808d04
|
2015-07-27T14:46:50
|
|
Fix @param names in doc comments
|
|
62d38a1d
|
2015-03-06T23:51:40
|
|
Add annotated commit versions of reflog-modifying functions
We do not always want to put the id directly into the reflog, but we
want to speicfy what a user typed. For this use-case we provide
annotated version of a few functions which let the caller specify what
user-friendly name was used when asking for the operation.
|
|
4e498646
|
2015-01-15T16:50:31
|
|
repository: remove log message override for switching the active branch
We want to use the "checkout: moving from ..." message in order to let
git know when a change of branch has happened. Make the convenience
functions for this goal write this message.
|
|
659cf202
|
2015-01-07T12:23:05
|
|
Remove the signature from ref-modifying functions
The signature for the reflog is not something which changes
dynamically. Almost all uses will be NULL, since we want for the
repository's default identity to be used, making it noise.
In order to allow for changing the identity, we instead provide
git_repository_set_ident() and git_repository_ident() which allow a user
to override the choice of signature.
|
|
9a294fd8
|
2015-01-27T08:17:23
|
|
Clarified git_repository_is_empty() documentation
|
|
a295bd2d
|
2014-12-06T03:36:18
|
|
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
|
|
bc737620
|
2014-08-20T10:24:41
|
|
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.
|
|
0ba4dca5
|
2014-07-22T10:40:23
|
|
git_cherry_pick -> git_cherrypick
|
|
31b0cb51
|
2014-05-22T17:16:21
|
|
Fixed miscellaneous documentation errors.
|
|
b1914c36
|
2014-05-12T10:24:46
|
|
Minor fixes for warnings and error propagation
|
|
d2c4d1c6
|
2014-05-12T10:04:52
|
|
Merge pull request #2188 from libgit2/cmn/config-snapshot
Configuration snapshotting
|
|
ac99d86b
|
2014-05-07T11:34:32
|
|
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.
|
|
5269008c
|
2014-05-06T16:01:49
|
|
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.
|
|
702efc89
|
2014-04-30T10:57:42
|
|
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).
|
|
b9f81997
|
2014-03-05T21:49:23
|
|
Added function-based initializers for every options struct.
The basic structure of each function is courtesy of arrbee.
|
|
010cec3a
|
2014-02-04T20:50:40
|
|
Add reflog params to git_repository_detach_head
|
|
94f263f5
|
2014-01-25T08:04:49
|
|
Add reflog params to set-head calls
|
|
7a3bd1e7
|
2014-01-26T15:35:17
|
|
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.
|
|
373cf6a9
|
2013-12-09T10:17:47
|
|
Update docs for new callback return value behavior
|
|
bab0b9f2
|
2013-11-22T18:02:12
|
|
clean up state metadata more consistently
|
|
92dac975
|
2013-10-08T16:35:57
|
|
Make reference lookups apply precomposeunicode
Before these changes, looking up a reference would return the
same precomposed or decomposed form of the reference name that
was used to look it up, so on MacOS which ignores the difference
between the two, a single reference could be looked up either way
and git_reference_name would return the form of the name that was
used to look it up! This change makes lookup always return the
precomposed name if core.precomposeunicode is set regardless of
which version was used to look it up. The reference iterator was
already returning the precomposed form from earlier work.
This also updates the CMakeLists.txt rules for enabling iconv
usage because the clar tests for this code were actually not being
activated properly with the old version.
Finally, this moves git_repository_reset_filesystem from include/
git2/repository.h to include/git2/sys/repository.h since it is not
really a function that normal library users should have to think
about very often.
|
|
14997dc5
|
2013-10-08T12:45:43
|
|
More filemode cleanups for FAT on MacOS
This cleans up some additional issues. The main change is that
on a filesystem that doesn't support mode bits, libgit2 will now
create new blobs with GIT_FILEMODE_BLOB always instead of being
at the mercy to the filesystem driver to report executable or not.
This means that if "core.filemode" lies and claims that filemode
is not supported, then we will ignore the executable bit from the
filesystem. Previously we would have allowed it.
This adds an option to the new git_repository_reset_filesystem to
recurse through submodules if desired. There may be other types
of APIs that would like a "recurse submodules" option, but this
one is particularly useful.
This also has a number of cleanups, etc., for related things
including trying to give better error messages when problems come
up from the filesystem. For example, the FAT filesystem driver on
MacOS appears to return errno EINVAL if you attempt to write a
filename with invalid UTF-8 in it. We try to capture that with a
better error message now.
|
|
5173ea92
|
2013-10-04T16:32:16
|
|
Add git_repository_reset_filesystem and fix tests
When a repository is transferred from one file system to another,
many of the config settings that represent the properties of the
file system may be wrong. This adds a new public API that will
refresh the config settings of the repository to account for the
change of file system. This doesn't do a full "reinitialize" and
operates on a existing git_repository object refreshing the config
when done.
This commit then makes use of the new API in clar as each test
repository is set up.
This commit also has a number of other clar test fixes where we
were making assumptions about the type of filesystem, either based
on outdated config data or based on the OS instead of the FS.
|
|
605da51a
|
2013-09-17T09:50:30
|
|
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.
|
|
3fe046cf
|
2013-06-29T13:13:38
|
|
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.
|
|
f8ccd6c9
|
2013-07-02T20:23:54
|
|
Fix small typo in docs for git_repository_message.
|
|
0b170f4d
|
2013-07-01T00:56:54
|
|
Fix docs to use proper enum names that exist.
|
|
e1967164
|
2013-06-24T15:33:41
|
|
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
|
|
93d8f77f
|
2013-05-23T15:11:53
|
|
Improve test failure output
|
|
0cb16fe9
|
2013-05-15T20:26:55
|
|
Unify whitespaces to tabs
|
|
3d1c9f61
|
2013-05-09T06:45:06
|
|
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.
|
|
bade5194
|
2013-04-30T21:02:13
|
|
lol namespaces
|
|
7cc3c920
|
2013-01-29T07:48:36
|
|
Added git_repository_new function
|
|
1384b688
|
2013-04-19T13:00:12
|
|
Move some low-level repo fns to include/git2/sys
|
|
437d3666
|
2013-04-18T00:15:08
|
|
repository: Doc fix
|
|
a442ed68
|
2013-04-17T04:46:37
|
|
repository: Add `git_repository_open_bare`
|
|
d00d5464
|
2013-03-01T15:37:33
|
|
immutable references and a pluggable ref database
|
|
359fc2d2
|
2013-01-08T17:07:25
|
|
update copyrights
|
|
7eb222fc
|
2013-01-06T10:39:35
|
|
Correct typos in documentation
|
|
5a62d659
|
2013-01-03T12:44:09
|
|
MERGE_HEAD contents iterator
|
|
35560d6d
|
2013-01-03T15:53:50
|
|
expose merge metadata cleanup
|
|
42e50b5e
|
2013-01-03T12:44:09
|
|
MERGE_HEAD contents iterator
|
|
ad2bc32f
|
2013-01-03T15:53:50
|
|
expose merge metadata cleanup
|
|
7fcec834
|
2012-12-11T22:31:21
|
|
fetchhead reading/iterating
|
|
fac43c54
|
2012-12-06T19:41:52
|
|
Allow compilation as C++
|
|
bde336ea
|
2012-11-29T12:26:09
|
|
Add version fields and init macros for public input structs.
|
|
ca94e031
|
2012-11-27T15:28:48
|
|
Various minor commenting fixes
|
|
f4a62c30
|
2012-11-27T14:13:03
|
|
Typedef enums.
|
|
c9fc4a6f
|
2012-11-27T13:44:49
|
|
API updates for repository.h
|
|
6091457e
|
2012-11-17T07:19:14
|
|
repo: ensure is_empty() checks there are no refs
|
|
b1a3a70e
|
2012-11-12T00:14:51
|
|
repository: Refine repository_head() error report
|
|
31966d20
|
2012-10-27T09:30:03
|
|
repo: enhance git_repository_state() detection
|
|
632d8b23
|
2012-10-23T15:42:09
|
|
reset changes for merge
|
|
875b16eb
|
2012-10-19T23:44:49
|
|
repository: Typo
|
|
8b05bea8
|
2012-10-19T17:07:39
|
|
errors: deploy GIT_EORPHANEDHEAD usage
|
|
4ebe38bd
|
2012-09-15T22:07:09
|
|
repository: introduce git_repository_set_head_detached()
|
|
44af67a8
|
2012-09-15T22:07:45
|
|
repository: introduce git_repository_set_head()
|
|
3f4c3072
|
2012-09-15T22:03:31
|
|
repository: introduce git_repository_detach_head()
|
|
cc548c7b
|
2012-09-15T12:55:37
|
|
repository: fix documentation typo
|
|
a13fb55a
|
2012-09-11T17:26:21
|
|
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
|
|
47bfa0be
|
2012-09-07T13:27:49
|
|
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.
|
|
e9ca852e
|
2012-08-23T09:20:17
|
|
Fix warnings and merge issues on Win64
|
|
ca1b6e54
|
2012-07-31T17:02:54
|
|
Add template dir and set gid to repo init
This extends git_repository_init_ext further with support for
initializing the repository from an external template directory
and with support for the "create shared" type flags that make a
set GID repository directory.
This also adds tests for much of the new functionality to the
existing `repo/init.c` test suite.
Also, this adds a bunch of new utility functions including a
very general purpose `git_futils_mkdir` (with the ability to
make paths and to chmod the paths post-creation) and a file
tree copying function `git_futils_cp_r`. Also, this includes
some new path functions that were useful to keep the code
simple.
|
|
662880ca
|
2012-07-26T16:07:01
|
|
Add git_repository_init_ext for power initters
The extended version of repository init adds support for many
of the things that you can do with `git init` and sets up
structures that will make it easier to extend further in the
future.
|
|
074841ec
|
2012-08-01T17:49:19
|
|
repository: add a getter and remove function for git's prepared message
The 'git revert/cherry-pick/merge -n' commands leave .git/MERGE_MSG
behind so that git-commit can find it. As we don't yet support these
operations, users who are shelling out to let git perform these
operations haven't had a convenient way to get this message.
These functions allow the user to retrieve the message and remove it
when she's created the commit.
|
|
6782245e
|
2012-07-21T16:24:13
|
|
repo: add git_repository_wrap_odb() to wrap an ODB
Primarily useful when used together with git_odb_backend_one_pack().
|
|
991a56c7
|
2012-07-10T15:35:38
|
|
Add flag to write gitlink on setting repo workdir
This added a flag to the `git_repository_set_workdir()` function
that enables generation of a `.git` gitlink file that links the
new workdir to the parent repository. Essentially, the flag tells
the function to write out the changes to disk to permanently set
the workdir of the repository to the new path.
If you pass this flag as true, then setting the workdir to something
other than the default workdir (i.e. the parent of the .git repo
directory), will create a plain file named ".git" with the standard
gitlink contents "gitdir: <repo-path>", and also update the
"core.worktree" and "core.bare" config values.
Setting the workdir to the default repo workdir will clear the
core.worktree flag (but still permanently set core.bare to false).
BTW, the libgit2 API does not currently provide a function for
clearing the workdir and converting a non-bare repo into a bare one.
|
|
d73c94b2
|
2012-05-19T20:24:55
|
|
Fix spelling errors.
|
|
e172cf08
|
2012-05-18T01:21:06
|
|
errors: Rename the generic return codes
|
|
7784bcbb
|
2012-04-11T11:52:59
|
|
Refactor git_repository_open with new options
Add a new command `git_repository_open_ext` with extended options
that control how searching for a repository will be done. The
existing `git_repository_open` and `git_repository_discover` are
reimplemented on top of it. We may want to change the default
behavior of `git_repository_open` but this commit does not do that.
Improve support for "gitdir" files where the work dir is separate
from the repo and support for the "separate-git-dir" config. Also,
add support for opening repos created with `git-new-workdir` script
(although I have only confirmed that they can be opened, not that
all functions work correctly).
There are also a few minor changes that came up:
- Fix `git_path_prettify` to allow in-place prettifying.
- Fix `git_path_root` to support backslashes on Win32. This fix
should help many repo open/discover scenarios - it is the one
function called when opening before prettifying the path.
- Tweak `git_config_get_string` to set the "out" pointer to NULL
if the config value is not found. Allows some other cleanup.
- Fix a couple places that should have been calling
`git_repository_config__weakptr` and were not.
- Fix `cl_git_sandbox_init` clar helper to support bare repos.
|
|
5e0de328
|
2012-02-13T17:10:24
|
|
Update Copyright header
Signed-off-by: schu <schu-github@schulog.org>
|
|
6632c155
|
2011-11-26T08:30:14
|
|
Document all of the things
|
|
45e79e37
|
2011-11-26T04:59:21
|
|
Rename all `_close` methods
There's no difference between `_free` and `_close` semantics: keep
everything with the same name to avoid confusions.
|
|
9462c471
|
2011-11-25T08:16:26
|
|
repository: Change ownership semantics
The ownership semantics have been changed all over the library to be
consistent. There are no more "borrowed" or duplicated references.
Main changes:
- `git_repository_open2` and `3` have been dropped.
- Added setters and getters to hotswap all the repository owned
objects:
`git_repository_index`
`git_repository_set_index`
`git_repository_odb`
`git_repository_set_odb`
`git_repository_config`
`git_repository_set_config`
`git_repository_workdir`
`git_repository_set_workdir`
Now working directories/index files/ODBs and so on can be
hot-swapped after creating a repository and between operations.
- All these objects now have proper ownership semantics with
refcounting: they all require freeing after they are no longer
needed (the repository always keeps its internal reference).
- Repository open and initialization has been updated to keep in
mind the configuration files. Bare repositories are now always
detected, and a default config file is created on init.
- All the tests affected by these changes have been dropped from the
old test suite and ported to the new one.
|
|
28ba94ce
|
2011-11-18T17:43:43
|
|
Fix typo in repository documentation
|
|
c36280a0
|
2011-09-30T06:26:29
|
|
repository: export git_repository_config_autoload
Take the opportunity to finish the comment about this function.
Signed-off-by: Carlos Martín Nieto <carlos@cmartin.tk>
|
|
40fe5fbe
|
2011-09-22T22:50:36
|
|
Make repo config loading automatic or completely explicit
git_repository_config wants to take the global and system paths again
so that one can be explicit if needed.
The git_repository_config_autoload function is provided for the cases
when it's good enough for the library to guess where those files are
located.
Signed-off-by: Carlos Martín Nieto <carlos@cmartin.tk>
|
|
6640266e
|
2011-09-18T19:58:22
|
|
Merge pull request #398 from carlosmn/config-autohome
git_repository_config: open global config file automatically
|
|
bb742ede
|
2011-09-19T01:54:32
|
|
Cleanup legal data
1. The license header is technically not valid if it doesn't have a
copyright signature.
2. The COPYING file has been updated with the different licenses used in
the project.
3. The full GPLv2 header in each file annoys me.
|
|
3601c4bf
|
2011-08-08T13:40:17
|
|
repository: Add git_repository_head()
|
|
d9111722
|
2011-09-13T12:30:25
|
|
Standardized doxygen @return lines for int functions to say "GIT_SUCCESS or an error code".
|
|
f9d4b0c3
|
2011-09-12T17:25:46
|
|
git_repository_config: open global config file automatically
If the global configuration file is missing, it is ignored.
Signed-off-by: Carlos Martín Nieto <carlos@cmartin.tk>
|
|
932d1baf
|
2011-06-30T19:52:34
|
|
cleanup: remove trailing spaces
Signed-off-by: Kirill A. Shutemov <kirill@shutemov.name>
|
|
408d733b
|
2011-06-30T06:56:58
|
|
repository: Make head_detached() and head_orphan() convenience methods accessible to bindings
|
|
c682886e
|
2011-06-28T21:09:22
|
|
repo: Rename HEAD-related methods
|
|
35502d2e
|
2011-06-28T13:55:00
|
|
Add git_repository_is_detached, git_repository_is_orphan
Signed-off-by: Carlos Martín Nieto <cmn@elego.de>
|
|
07ff8817
|
2011-06-18T00:39:39
|
|
config: Cleanup external API
Do not mess with environment variables anymore. The new external API has
more helper methods, and everything is explicit.
|
|
b22d1479
|
2011-06-16T17:46:06
|
|
Add git_repository_config API
This function puts the global and repository configurations in one
git_config object and gives it to the user.
Signed-off-by: Carlos Martín Nieto <cmn@elego.de>
|
|
ef9a6f4c
|
2011-06-15T13:47:41
|
|
Merge pull request #261 from Romain-Geissler/discovery-path-v2
Fix: GIT_PATH_PATH_SEPARATOR is now a semi-colon under Windows.
|
|
0657e46d
|
2011-06-15T12:36:08
|
|
Fix: GIT_PATH_PATH_SEPARATOR is now a semi-colon under Windows.
GIT_PATH_LIST_SEPARATOR and GIT_PATH_MAX are made public so
that it's can be used by a client.
|
|
602ee38b
|
2011-06-04T20:44:14
|
|
repository: Export all internal paths
|
|
fd0574e5
|
2011-06-04T01:01:20
|
|
Repository: Added the git_repository_discover function that finds by itself the git directory that manage a given directory path.
|
|
50b7334e
|
2011-06-01T09:58:21
|
|
Merge pull request #206 from nulltoken/topic/is-bare
Add git_repository_is_bare() accessor
|
|
f7e59c4d
|
2011-06-01T18:34:21
|
|
index: Change the memory management for repo indexes
The `git_repository_index` call now returns a brand new index that must
be manually free'd.
|
|
fa9bcd81
|
2011-05-24T21:48:07
|
|
Add git_repository_is_bare() accessor
|
|
4a34b3a9
|
2011-04-09T15:49:44
|
|
Add two new accessors to the repository
git_repository_path() and git_repository_workdir() respectively return the path to the git repository and the working directory. Those paths are absolute and normalized.
|
|
41233c40
|
2011-04-08T12:42:18
|
|
Add new method `git_repository_is_empty`
|
|
f0d08b7c
|
2011-03-23T15:40:47
|
|
Remove `git_repository_gc` from the headers
|
|
8613d4a9
|
2011-03-16T01:10:40
|
|
Fix signature in `git_repository_gc`
The method returns an int with the amount of objects free'd
|