You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@subversion.apache.org by da...@apache.org on 2014/05/03 01:27:31 UTC
svn commit: r1592110 - /subversion/trunk/tools/diff/diff3.c
Author: danielsh
Date: Fri May 2 23:27:30 2014
New Revision: 1592110
URL: http://svn.apache.org/r1592110
Log:
diff3: Add a '--help' option.
* tools/diff/diff3.c
(main): As above.
Modified:
subversion/trunk/tools/diff/diff3.c
Modified: subversion/trunk/tools/diff/diff3.c
URL: http://svn.apache.org/viewvc/subversion/trunk/tools/diff/diff3.c?rev=1592110&r1=1592109&r2=1592110&view=diff
==============================================================================
--- subversion/trunk/tools/diff/diff3.c (original)
+++ subversion/trunk/tools/diff/diff3.c Fri May 2 23:27:30 2014
@@ -70,6 +70,8 @@ int main(int argc, const char *argv[])
int rc;
svn_error_t *svn_err = SVN_NO_ERROR;
apr_getopt_t *opts;
+ svn_boolean_t help = FALSE;
+
enum {
conflict_style_opt = SVN_OPT_FIRST_LONGOPT_ID
};
@@ -78,6 +80,8 @@ int main(int argc, const char *argv[])
{"label", 'L', 1, ""},
{"show-overlap", 'E', 0, ""},
{"merge", 'm', 0, ""},
+ {"help", 'h', 0, ""},
+ {NULL, '?', 0, ""},
{NULL, 0, 0, NULL}
};
svn_diff_conflict_display_style_t conflict_style
@@ -146,6 +150,10 @@ int main(int argc, const char *argv[])
makes it easier to use this as an external diff3
program. */
break;
+ case 'h':
+ case '?':
+ help = TRUE;
+ break;
}
}
@@ -157,7 +165,7 @@ int main(int argc, const char *argv[])
svn_error_clear(svn_err);
rc = 2;
}
- else if (argc - opts->ind == 3)
+ else if (argc - opts->ind == 3 && !help)
{
svn_boolean_t has_changes;