summary | shortlog | log | commit | commitdiff | tree
raw | patch | inline | side by side (parent: 56d33b1)
raw | patch | inline | side by side (parent: 56d33b1)
author | Junio C Hamano <junkio@cox.net> | |
Tue, 4 Oct 2005 05:28:45 +0000 (22:28 -0700) | ||
committer | Junio C Hamano <junkio@cox.net> | |
Wed, 5 Oct 2005 00:04:44 +0000 (17:04 -0700) |
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>
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>
Documentation/git-apply.txt | patch | blob | history | |
apply.c | patch | blob | history |
index 4f7e1195dee9993974d8f671d750498e66ede984..cb676348f87840d722450d9efbf2d4c112fdf10a 100644 (file)
SYNOPSIS
--------
-'git-apply' [--no-merge] [--stat] [--summary] [--check] [--index] [--show-files] [--apply] [<patch>...]
+'git-apply' [--stat] [--summary] [--check] [--index] [--show-files] [--apply] [<patch>...]
DESCRIPTION
-----------
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".
index 79c5d8a8f8b91b3552c1728b1c75b0d379d10884..7be50413538868412a87c847f8fa184cadd0fa2a 100644 (file)
--- a/apply.c
+++ b/apply.c
*
* 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;
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
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;