Junio C Hamano <gits...@pobox.com> writes:
>> Then the --ignore-removals option could be added using a patch like
>> the following.
> adding ignore-removals as a synonym (and keeping it) would be a good
> We would still need to carry --all and --no-all that have been with
> us ever since we added "-A" option, though.
The final step to turn "-A" the default will be held back until Git 2.0 release,
but I've inserted the following patch before that step.
I am thinking that it would be a good idea to merge up to this step
to 'master' tomorrow, and have you guys tweak it further on 'master'
with a patch like the one I am responding to, before the 1.8.3
final. We will have to tweak the 2.0 endgame version as we go but
that is outside 'next' for now, so it should be manageable.
-- >8 --
Subject: [PATCH] git add: rephrase the "removal will cease to be ignored"
Now the logic to decide when to warn has been tightened, we know the
user is in a situation where the current and future behaviours will
be different. Spell out what happens with these two versions and
how to explicitly ask for the behaviour, and suggest "git status" as
a way to inspect the current status.
Signed-off-by: Junio C Hamano <gits...@pobox.com>
builtin/add.c | 21 ++++++++++++++-------
1 file changed, 14 insertions(+), 7 deletions(-)
diff --git a/builtin/add.c b/builtin/add.c
index 4242bce..20f459a 100644
@@ -52,15 +52,22 @@ static int fix_unmerged_status(struct diff_filepair *p,
+static const char *add_would_remove_warning = N_(
+ "You ran 'git add' with neither '-A (--all)' or '--no-all', whose\n"
+"behaviour will change in Git 2.0 with respect to paths you removed from\n"
+"your working tree. Paths like '%s' that are\n"
+"removed are ignored with this version of Git.\n"
+"* 'git add --no-all <pathspec>', which is the current default, ignores\n"
+" paths you removed from your working tree.\n"
+"* 'git add --all <pathspec>' will let you also record the removals.\n"
+"Run 'git status' to check the paths you removed from your working tree.\n");
static void warn_add_would_remove(const char *path)
- warning(_("In Git 2.0, 'git add <pathspec>...' will also update the\n"
- "index for paths removed from the working tree that match\n"
- "the given pathspec. If you want to 'add' only changed\n"
- "or newly created paths, say 'git add --no-all <pathspec>...'"
- " instead.\n\n"
- "'%s' would be removed from the index without --no-all."),
+ warning(_(add_would_remove_warning), path);
static void update_callback(struct diff_queue_struct *q,
To unsubscribe from this list: send the line "unsubscribe git" in
the body of a message to majord...@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html