Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.kernel.org/pub/scm/git/git.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJunio C Hamano <junkio@cox.net>2005-10-04 09:28:45 +0400
committerJunio C Hamano <junkio@cox.net>2005-10-05 04:04:44 +0400
commitc2d5036de5c2e21fb736002ae5b385ceb7c6b23b (patch)
tree79850cb02b25c4045feddaefe408aed22a7101e5
parent56d33b1105e63590577672de9afb920f6e7fd22c (diff)
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>
-rw-r--r--Documentation/git-apply.txt7
-rw-r--r--apply.c17
2 files changed, 2 insertions, 22 deletions
diff --git a/Documentation/git-apply.txt b/Documentation/git-apply.txt
index 4f7e1195de..cb676348f8 100644
--- a/Documentation/git-apply.txt
+++ b/Documentation/git-apply.txt
@@ -9,7 +9,7 @@ git-apply - Apply patch on a GIT index file and a work tree
SYNOPSIS
--------
-'git-apply' [--no-merge] [--stat] [--summary] [--check] [--index] [--show-files] [--apply] [<patch>...]
+'git-apply' [--stat] [--summary] [--check] [--index] [--show-files] [--apply] [<patch>...]
DESCRIPTION
-----------
@@ -22,11 +22,6 @@ OPTIONS
The files to read patch from. '-' can be used to read
from the standard input.
---no-merge::
- The default mode of operation is the merge behaviour
- which is not implemented yet. This flag explicitly
- tells the program not to use the merge behaviour.
-
--stat::
Instead of applying the patch, output diffstat for the
input. Turns off "apply".
diff --git a/apply.c b/apply.c
index 79c5d8a8f8..7be5041353 100644
--- a/apply.c
+++ b/apply.c
@@ -5,26 +5,16 @@
*
* This applies patches on top of some (arbitrary) version of the SCM.
*
- * NOTE! It does all its work in the index file, and only cares about
- * the files in the working directory if you tell it to "merge" the
- * patch apply.
- *
- * Even when merging it always takes the source from the index, and
- * uses the working tree as a "branch" for a 3-way merge.
*/
#include <ctype.h>
#include <fnmatch.h>
#include "cache.h"
-// We default to the merge behaviour, since that's what most people would
-// expect.
-//
// --check turns on checking that the working tree matches the
// files that are being modified, but doesn't apply the patch
// --stat does just a diffstat, and doesn't actually apply
// --show-files shows the directory changes
//
-static int merge_patch = 1;
static int check_index = 0;
static int write_index = 0;
static int diffstat = 0;
@@ -33,7 +23,7 @@ static int check = 0;
static int apply = 1;
static int show_files = 0;
static const char apply_usage[] =
-"git-apply [--no-merge] [--stat] [--summary] [--check] [--index] [--apply] [--show-files] <patch>...";
+"git-apply [--stat] [--summary] [--check] [--index] [--apply] [--show-files] <patch>...";
/*
* For "diff-stat" like behaviour, we keep track of the biggest change
@@ -1517,11 +1507,6 @@ int main(int argc, char **argv)
excludes = x;
continue;
}
- /* NEEDSWORK: this does not do anything at this moment. */
- if (!strcmp(arg, "--no-merge")) {
- merge_patch = 0;
- continue;
- }
if (!strcmp(arg, "--stat")) {
apply = 0;
diffstat = 1;