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>2006-11-01 01:22:34 +0300
committerJunio C Hamano <junkio@cox.net>2006-11-01 01:22:34 +0300
commit62476c8e331a22e224d87c18830913129f5f303b (patch)
treef81057bf5002f016d26a82d055ff694f31ab2e43 /revision.c
parent0d981c67d8bcf4610e165744059c1e9e14609baa (diff)
Introduce a new revision set operator <rev>^!
This is a shorthand for "<rev> --not <rev>^@", i.e. "include this commit but exclude any of its parents". When a new file $F is introduced by revision $R, this notation can be used to find a copy-and-paste from existing file in the parents of that revision without annotating the ancestry of the lines that were copied from: git pickaxe -f -C $R^! -- $F Signed-off-by: Junio C Hamano <junkio@cox.net>
Diffstat (limited to 'revision.c')
-rw-r--r--revision.c7
1 files changed, 7 insertions, 0 deletions
diff --git a/revision.c b/revision.c
index f1e0caaae3..b021d3354e 100644
--- a/revision.c
+++ b/revision.c
@@ -660,6 +660,13 @@ int handle_revision_arg(const char *arg, struct rev_info *revs,
return 0;
*dotdot = '^';
}
+ dotdot = strstr(arg, "^!");
+ if (dotdot && !dotdot[2]) {
+ *dotdot = 0;
+ if (!add_parents_only(revs, arg, flags ^ UNINTERESTING))
+ *dotdot = '^';
+ }
+
local_flags = 0;
if (*arg == '^') {
local_flags = UNINTERESTING;