@matheusbsbs / matheus-bagliano / commits / c2d5036de5
Fork 0

git-apply: retire unused/unimplemented --no-merge flag.

The original plan was to do 3-way merge between local working tree, index and the patch being applied, but that was never implemented. Retire the flag to control its behaviour. Signed-off-by: Junio C Hamano <junkio@cox.net>

Junio C Hamano committed Oct 3, 2005 at 22:28 UTC c2d5036de5c2e21fb736002ae5b385ceb7c6b23b
2 files changed +2 -22
Documentation/git-apply.txt
+1 -6
@@ -9,7 +9,7 @@ git-apply - Apply patch on a GIT index file and a work tree
9
10 SYNOPSIS
11 --------
12 -'git-apply' [--no-merge] [--stat] [--summary] [--check] [--index] [--show-files] [--apply] [<patch>...]
12 +'git-apply' [--stat] [--summary] [--check] [--index] [--show-files] [--apply] [<patch>...]
13
14 DESCRIPTION
15 -----------
@@ -22,11 +22,6 @@ OPTIONS
22 The files to read patch from. '-' can be used to read
23 from the standard input.
24
25 ---no-merge::
26 - The default mode of operation is the merge behaviour
27 - which is not implemented yet. This flag explicitly
28 - tells the program not to use the merge behaviour.
29 -
25 --stat::
26 Instead of applying the patch, output diffstat for the
27 input. Turns off "apply".
apply.c
+1 -16
@@ -5,26 +5,16 @@
5 *
6 * This applies patches on top of some (arbitrary) version of the SCM.
7 *
8 - * NOTE! It does all its work in the index file, and only cares about
9 - * the files in the working directory if you tell it to "merge" the
10 - * patch apply.
11 - *
12 - * Even when merging it always takes the source from the index, and
13 - * uses the working tree as a "branch" for a 3-way merge.
8 */
9 #include <ctype.h>
10 #include <fnmatch.h>
11 #include "cache.h"
12
19 -// We default to the merge behaviour, since that's what most people would
20 -// expect.
21 -//
13 // --check turns on checking that the working tree matches the
14 // files that are being modified, but doesn't apply the patch
15 // --stat does just a diffstat, and doesn't actually apply
16 // --show-files shows the directory changes
17 //
27 -static int merge_patch = 1;
18 static int check_index = 0;
19 static int write_index = 0;
20 static int diffstat = 0;
@@ -33,7 +23,7 @@ static int check = 0;
23 static int apply = 1;
24 static int show_files = 0;
25 static const char apply_usage[] =
36 -"git-apply [--no-merge] [--stat] [--summary] [--check] [--index] [--apply] [--show-files] <patch>...";
26 +"git-apply [--stat] [--summary] [--check] [--index] [--apply] [--show-files] <patch>...";
27
28 /*
29 * For "diff-stat" like behaviour, we keep track of the biggest change
@@ -1517,11 +1507,6 @@ int main(int argc, char **argv)
1507 excludes = x;
1508 continue;
1509 }
1520 - /* NEEDSWORK: this does not do anything at this moment. */
1521 - if (!strcmp(arg, "--no-merge")) {
1522 - merge_patch = 0;
1523 - continue;
1524 - }
1510 if (!strcmp(arg, "--stat")) {
1511 apply = 0;
1512 diffstat = 1;