|
add30a83
|
2021-11-18T12:36:25
|
|
date: rfc2822 formatting uses a `git_buf` instead of a static string
|
|
b2c40314
|
2021-11-18T12:19:32
|
|
date: make it a proper `git_date` utility class
Instead of `git__date`, just use `git_date`.
|
|
f0e693b1
|
2021-09-07T17:53:49
|
|
str: introduce `git_str` for internal, `git_buf` is external
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.
|
|
62eb2f83
|
2021-09-21T10:59:49
|
|
email: don't clear buffer in append function
`git_email__append_from_diff` is meant to - well, append from a diff.
Clearing the buffer, by definition, is not appending. Stop doing that.
|
|
67b1d019
|
2021-09-14T09:49:31
|
|
email: include renames by default
`git format-patch` includes diffs with rename detection enabled by
default when creating emails. Match this behavior.
|
|
323f222f
|
2021-09-14T09:44:52
|
|
email: include binary diffs by default
`git format-patch` includes binary diffs by default when creating
emails. Match this behavior.
|
|
971ed753
|
2021-09-13T13:26:55
|
|
email: introduce 'append_from_diff'
Introduce `git_email__append_from_diff` so that we don't always
overwrite the input buffer.
|
|
6aa34966
|
2021-09-13T08:17:21
|
|
email: introduce `git_email_create_from_diff`
Introduce a function to create an email from a diff and multiple inputs
about the source of the diff.
Creating an email from a diff requires many more inputs, and should be
discouraged in favor of building directly from a commit, and is thus in
the `sys` namespace.
|
|
75d4676a
|
2021-09-12T17:06:14
|
|
email: introduce `git_email_create_from_commit`
Create `git_email_*` which will encapsulate email creation and
application, and `git_email_create_from_commit` in particular, which
creates an email for a single commit.
|