@@ -133,6 +133,9 @@ typedef enum {
133
133
*/
134
134
GIT_DIFF_INDENT_HEURISTIC = (1u << 18 ),
135
135
136
+ /** Ignore blank lines */
137
+ GIT_DIFF_IGNORE_BLANK_LINES = (1u << 19 ),
138
+
136
139
/** Treat all files as text, disabling binary attributes & detection */
137
140
GIT_DIFF_FORCE_TEXT = (1u << 20 ),
138
141
/** Treat all files as binary, disabling text diffs */
@@ -168,11 +171,6 @@ typedef enum {
168
171
* can apply given diff information to binary files.
169
172
*/
170
173
GIT_DIFF_SHOW_BINARY = (1u << 30 ),
171
-
172
- /** Ignore blank lines */
173
- /* Jeroen: commented out for -pedantic compatibility */
174
- //GIT_DIFF_IGNORE_BLANK_LINES = (1u << 31),
175
-
176
174
} git_diff_option_t ;
177
175
178
176
/**
@@ -1377,99 +1375,6 @@ GIT_EXTERN(int) git_diff_stats_to_buf(
1377
1375
*/
1378
1376
GIT_EXTERN (void ) git_diff_stats_free (git_diff_stats * stats );
1379
1377
1380
- /**
1381
- * Formatting options for diff e-mail generation
1382
- */
1383
- typedef enum {
1384
- /** Normal patch, the default */
1385
- GIT_DIFF_FORMAT_EMAIL_NONE = 0 ,
1386
-
1387
- /** Don't insert "[PATCH]" in the subject header*/
1388
- GIT_DIFF_FORMAT_EMAIL_EXCLUDE_SUBJECT_PATCH_MARKER = (1 << 0 ),
1389
-
1390
- } git_diff_format_email_flags_t ;
1391
-
1392
- /**
1393
- * Options for controlling the formatting of the generated e-mail.
1394
- */
1395
- typedef struct {
1396
- unsigned int version ;
1397
-
1398
- /** see `git_diff_format_email_flags_t` above */
1399
- uint32_t flags ;
1400
-
1401
- /** This patch number */
1402
- size_t patch_no ;
1403
-
1404
- /** Total number of patches in this series */
1405
- size_t total_patches ;
1406
-
1407
- /** id to use for the commit */
1408
- const git_oid * id ;
1409
-
1410
- /** Summary of the change */
1411
- const char * summary ;
1412
-
1413
- /** Commit message's body */
1414
- const char * body ;
1415
-
1416
- /** Author of the change */
1417
- const git_signature * author ;
1418
- } git_diff_format_email_options ;
1419
-
1420
- #define GIT_DIFF_FORMAT_EMAIL_OPTIONS_VERSION 1
1421
- #define GIT_DIFF_FORMAT_EMAIL_OPTIONS_INIT {GIT_DIFF_FORMAT_EMAIL_OPTIONS_VERSION, 0, 1, 1, NULL, NULL, NULL, NULL}
1422
-
1423
- /**
1424
- * Create an e-mail ready patch from a diff.
1425
- *
1426
- * @param out buffer to store the e-mail patch in
1427
- * @param diff containing the commit
1428
- * @param opts structure with options to influence content and formatting.
1429
- * @return 0 or an error code
1430
- */
1431
- GIT_EXTERN (int ) git_diff_format_email (
1432
- git_buf * out ,
1433
- git_diff * diff ,
1434
- const git_diff_format_email_options * opts );
1435
-
1436
- /**
1437
- * Create an e-mail ready patch for a commit.
1438
- *
1439
- * Does not support creating patches for merge commits (yet).
1440
- *
1441
- * @param out buffer to store the e-mail patch in
1442
- * @param repo containing the commit
1443
- * @param commit pointer to up commit
1444
- * @param patch_no patch number of the commit
1445
- * @param total_patches total number of patches in the patch set
1446
- * @param flags determines the formatting of the e-mail
1447
- * @param diff_opts structure with options to influence diff or NULL for defaults.
1448
- * @return 0 or an error code
1449
- */
1450
- GIT_EXTERN (int ) git_diff_commit_as_email (
1451
- git_buf * out ,
1452
- git_repository * repo ,
1453
- git_commit * commit ,
1454
- size_t patch_no ,
1455
- size_t total_patches ,
1456
- uint32_t flags ,
1457
- const git_diff_options * diff_opts );
1458
-
1459
- /**
1460
- * Initialize git_diff_format_email_options structure
1461
- *
1462
- * Initializes a `git_diff_format_email_options` with default values. Equivalent
1463
- * to creating an instance with GIT_DIFF_FORMAT_EMAIL_OPTIONS_INIT.
1464
- *
1465
- * @param opts The `git_blame_options` struct to initialize.
1466
- * @param version The struct version; pass `GIT_DIFF_FORMAT_EMAIL_OPTIONS_VERSION`.
1467
- * @return Zero on success; -1 on failure.
1468
- */
1469
- GIT_EXTERN (int ) git_diff_format_email_options_init (
1470
- git_diff_format_email_options * opts ,
1471
- unsigned int version );
1472
-
1473
1378
/**
1474
1379
* Patch ID options structure
1475
1380
*
0 commit comments