#git #patch #parsing-tools #git-patch #git-send-mail

libgitmail

Provide an easy type-safe wrapper around git patch emails

1 unstable release

0.1.0 Jan 10, 2020

#6 in #parsing-tools

GPL-3.0 license

12KB
255 lines

libgitmail

This library provides an abstraction over git sent email patches. It parses incoming mail and provides a strongly typed interface for interacting with patches, patch trees, as well as building patch sets from a tree thread with many revisions.

It then compiles a new thread of mail that can be piped directly into git am - by some user interface.

License

This library is part of dev-suite and as such licensed under the GNU General Public License 3.0 or, (at your choosing), any later version. See the LICENSE.md in the parent repository for more details.


lib.rs:

A library that can parse git-send-email generated email

Please note that this is not a general mail parser. It is specifically built to understand mail generated by git-send-email. For a more general mail parser, maybe look at mailparse or mail instead.

The important fields to get from a git email are the "In-Reply-To" and "References" header. The structure method returns the basic structure of a pathset with a way to select specific parts of the set to export. Look at the PatchSet type for more information.

Dependencies

~5MB
~146K SLoC