@@ -1376,99 +1376,6 @@ GIT_EXTERN(int) git_diff_stats_to_buf(
13761376 */
13771377GIT_EXTERN (void ) git_diff_stats_free (git_diff_stats * stats );
13781378
1379- /**
1380- * Formatting options for diff e-mail generation
1381- */
1382- typedef enum {
1383- /** Normal patch, the default */
1384- GIT_DIFF_FORMAT_EMAIL_NONE = 0 ,
1385-
1386- /** Don't insert "[PATCH]" in the subject header*/
1387- GIT_DIFF_FORMAT_EMAIL_EXCLUDE_SUBJECT_PATCH_MARKER = (1 << 0 ),
1388-
1389- } git_diff_format_email_flags_t ;
1390-
1391- /**
1392- * Options for controlling the formatting of the generated e-mail.
1393- */
1394- typedef struct {
1395- unsigned int version ;
1396-
1397- /** see `git_diff_format_email_flags_t` above */
1398- uint32_t flags ;
1399-
1400- /** This patch number */
1401- size_t patch_no ;
1402-
1403- /** Total number of patches in this series */
1404- size_t total_patches ;
1405-
1406- /** id to use for the commit */
1407- const git_oid * id ;
1408-
1409- /** Summary of the change */
1410- const char * summary ;
1411-
1412- /** Commit message's body */
1413- const char * body ;
1414-
1415- /** Author of the change */
1416- const git_signature * author ;
1417- } git_diff_format_email_options ;
1418-
1419- #define GIT_DIFF_FORMAT_EMAIL_OPTIONS_VERSION 1
1420- #define GIT_DIFF_FORMAT_EMAIL_OPTIONS_INIT {GIT_DIFF_FORMAT_EMAIL_OPTIONS_VERSION, 0, 1, 1, NULL, NULL, NULL, NULL}
1421-
1422- /**
1423- * Create an e-mail ready patch from a diff.
1424- *
1425- * @param out buffer to store the e-mail patch in
1426- * @param diff containing the commit
1427- * @param opts structure with options to influence content and formatting.
1428- * @return 0 or an error code
1429- */
1430- GIT_EXTERN (int ) git_diff_format_email (
1431- git_buf * out ,
1432- git_diff * diff ,
1433- const git_diff_format_email_options * opts );
1434-
1435- /**
1436- * Create an e-mail ready patch for a commit.
1437- *
1438- * Does not support creating patches for merge commits (yet).
1439- *
1440- * @param out buffer to store the e-mail patch in
1441- * @param repo containing the commit
1442- * @param commit pointer to up commit
1443- * @param patch_no patch number of the commit
1444- * @param total_patches total number of patches in the patch set
1445- * @param flags determines the formatting of the e-mail
1446- * @param diff_opts structure with options to influence diff or NULL for defaults.
1447- * @return 0 or an error code
1448- */
1449- GIT_EXTERN (int ) git_diff_commit_as_email (
1450- git_buf * out ,
1451- git_repository * repo ,
1452- git_commit * commit ,
1453- size_t patch_no ,
1454- size_t total_patches ,
1455- uint32_t flags ,
1456- const git_diff_options * diff_opts );
1457-
1458- /**
1459- * Initialize git_diff_format_email_options structure
1460- *
1461- * Initializes a `git_diff_format_email_options` with default values. Equivalent
1462- * to creating an instance with GIT_DIFF_FORMAT_EMAIL_OPTIONS_INIT.
1463- *
1464- * @param opts The `git_blame_options` struct to initialize.
1465- * @param version The struct version; pass `GIT_DIFF_FORMAT_EMAIL_OPTIONS_VERSION`.
1466- * @return Zero on success; -1 on failure.
1467- */
1468- GIT_EXTERN (int ) git_diff_format_email_options_init (
1469- git_diff_format_email_options * opts ,
1470- unsigned int version );
1471-
14721379/**
14731380 * Patch ID options structure
14741381 *
0 commit comments