aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorTeddy Wing2020-08-30 02:41:15 +0200
committerTeddy Wing2020-08-30 02:41:15 +0200
commit2b1e644ead40145f0b1b84f286b48948fb314311 (patch)
treefe7f63e0b1fb7b594c1a24cba51a8829d88fccc0
parentd9b8838a5d99e643a751d042047644cfa4a9a032 (diff)
downloadgit-suggestion-2b1e644ead40145f0b1b84f286b48948fb314311.tar.bz2
diff_options: Merge `FLAGS` and `OPTIONS`
Didn't look closely enough in d9b8838a5d99e643a751d042047644cfa4a9a032, but we now have the exact same handling for key-value options and flags.
-rw-r--r--src/diff_options.rs13
1 files changed, 1 insertions, 12 deletions
diff --git a/src/diff_options.rs b/src/diff_options.rs
index 55b76ce..3c19634 100644
--- a/src/diff_options.rs
+++ b/src/diff_options.rs
@@ -14,7 +14,7 @@
// along with this program. If not, see <https://www.gnu.org/licenses/>.
-static FLAGS: [&'static str; 59] = [
+static FLAGS: [&'static str; 98] = [
"-p",
"--no-stat",
"-p",
@@ -74,9 +74,6 @@ static FLAGS: [&'static str; 59] = [
"--no-textconv",
"--no-prefix",
"--ita-invisible-in-index",
-];
-
-static OPTIONS: [&'static str; 39] = [
"-U",
"--unified",
"--output",
@@ -132,14 +129,6 @@ pub fn parse(args: &[String]) -> (Vec<&String>, Vec<&String>) {
}
}
- for option in OPTIONS.iter() {
- if arg.starts_with(option) {
- found_args.push(arg);
-
- continue 'args;
- }
- }
-
program_args.push(arg)
}