| Commit message (Collapse) | Author | Age | Files | Lines |
| |
|
| |
|
|
|
|
|
| |
This is much of the plumbing for the object database to support SHA256,
and for objects to be able to parse SHA256 versions of themselves.
|
|
|
|
|
| |
The experimental function signature is only available when
`GIT_EXPERIMENTAL_SHA256` is enabled.
|
|
|
|
|
| |
`git_oid`s now have a type, and we require the oid type when creating
the object id from creation functions.
|
|
|
|
|
| |
Callers should not assume the layout of the oid structure; provide them
a macro that defines the null / zero sha1 object id.
|
|
|
|
|
| |
In preparation for SHA256 support, `GIT_OID_RAWSZ` and `GIT_OID_HEXSZ`
need to indicate that they're the size of _SHA1_ OIDs.
|
|
|
|
|
| |
The `git2internal` target is actually the git library; call it such so
that IDE users have visibility into it.
|
| |
|
| |
|
| |
|
|
|
|
|
|
|
|
| |
The index's checksum is not an object ID, so we should not use the
`git_oid` type. Use a byte array for checksum calculation and storage.
Deprecate the `git_indexer_hash` function. Callers should use the new
`git_indexer_name` function which provides a unique packfile name.
|
| |
|
| |
|
|
|
|
|
| |
Update the global variables `LIBGIT2_OBJECTS` to
`LIBGIT2_DEPENDENCY_OBJECTS` for clarity and consistency.
|
| |
|
| |
|
|
|
|
|
| |
Ensure that we always use lowercase function names, and that we do not
have spaces preceding open parentheses, for consistency.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
libgit2 has two distinct requirements that were previously solved by
`git_buf`. We require:
1. A general purpose string class that provides a number of utility APIs
for manipulating data (eg, concatenating, truncating, etc).
2. A structure that we can use to return strings to callers that they
can take ownership of.
By using a single class (`git_buf`) for both of these purposes, we have
confused the API to the point that refactorings are difficult and
reasoning about correctness is also difficult.
Move the utility class `git_buf` to be called `git_str`: this represents
its general purpose, as an internal string buffer class. The name also
is an homage to Junio Hamano ("gitstr").
The public API remains `git_buf`, and has a much smaller footprint. It
is generally only used as an "out" param with strict requirements that
follow the documentation. (Exceptions exist for some legacy APIs to
avoid breaking callers unnecessarily.)
Utility functions exist to convert a user-specified `git_buf` to a
`git_str` so that we can call internal functions, then converting it
back again.
|
| |
|
| |
|
| |
|
| |
|
|
|
|
|
|
| |
The information about the type of a revision spec is not information
about the parser. Name it accordingly, so that `git_revparse_mode_t`
is now `git_revspec_t`. Deprecate the old name.
|
|
|
|
|
|
| |
Docurium seems to be confused by our use of `/** comment */;` use in the
log example. Let's just switch it around to help Docurium get this
right.
|
|
|
|
|
|
| |
We _dispose_ the contents of objects; we _free_ objects (and their
contents). Update `git_strarray_free` to be `git_strarray_dispose`.
`git_strarray_free` remains as a deprecated proxy function.
|
|
|
|
|
|
| |
add example for git commit
fix example for git add
add example for git push
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
We avoid abbreviations where possible; rename git_cred to
git_credential.
In addition, we have standardized on a trailing `_t` for enum types,
instead of using "type" in the name. So `git_credtype_t` has become
`git_credential_t` and its members have become `GIT_CREDENTIAL` instead
of `GIT_CREDTYPE`.
Finally, the source and header files have been renamed to `credential`
instead of `cred`.
Keep previous name and values as deprecated, and include the new header
files from the previous ones.
|
|\
| |
| | |
examples: checkout: implement guess heuristic for remote branches
|
| | |
|
|\ \
| | |
| | | |
Various examples shape-ups
|
| | |
| | |
| | |
| | | |
This allows the example to be used as a quick revwalk test harness.
|
| | | |
|
| | | |
|
| | | |
|
| | | |
|
| | | |
|
| | | |
|
| | | |
|
| | | |
|
| | | |
|
| | | |
|
| |/ |
|
|/ |
|
|\
| |
| | |
stash: avoid recomputing tree when committing worktree
|
| |
| |
| |
| |
| |
| |
| |
| |
| | |
Implement a new example that resembles the git-stash(1) command.
Right now, it only provides the apply, list, save and pop
subcommands without any options.
This example is mostly used to test libgit2's stashing
performance on big repositories.
|
|\ \
| | |
| | | |
Adjust printf specifiers in examples code
|
| | |
| | |
| | |
| | |
| | |
| | |
| | | |
Static analysis of example code found multiple findings of `printf` usage
where filling value is members of git_indexer_progress object. Specifier
used was for signed int but git_indexer_progress members are typed as
unsigned ints. `printf` specifiers were altered to match type.
|
|\ \ \
| |/ /
|/| | |
Fix example checkout to forbid rather than require --
|
| |/
| |
| |
| |
| |
| | |
Make the example program for checkout follow git syntax, where
"--" indicates a file. This was likely just a strcmp return
value confusion.
|