From: Michael Witten <hidden> Date: 2016-06-15 22:43:41
Hello,
The git-add command doesn't handle -n when using -u.
I fixed this and added -a for adding ALL files, not
just those below the current directory (just like
git-commit).
The patch is below, but you can also download it from
http://web.mit.edu/mfwitten/git/0001-git-add-now-understands-two-
kinds-of-update.patch
From acc846f5243d26a96aaf0bf1c4f04ecc021385a2 Mon Sep 17 00:00:00 2001
From: Michael Witten <redacted>
Date: Sun, 14 Oct 2007 06:13:20 -0400
Subject: [PATCH] git-add now understands two kinds of update:
-u: update as before
-a: update all as in a true 'git commit -a'
Also, -n works correctly now with the above options.
Signed-off-by: Michael Witten <redacted>
---
builtin-add.c | 69 +++++++++++++++++++++++++++++++++++++
+-------------------
1 files changed, 46 insertions(+), 23 deletions(-)
From: Michael Witten <hidden> Date: 2016-06-15 22:43:41
On 14 Oct 2007, at 6:26:28 AM, Michael Witten wrote:
Hello,
The git-add command doesn't handle -n when using -u.
I fixed this and added -a for adding ALL files, not
just those below the current directory (just like
git-commit).
The patch is below, but you can also download it from
http://web.mit.edu/mfwitten/git/0001-git-add-now-understands-two-
kinds-of-update.patch
Unfortunately, I introduced a bug.
The following:
+ if (show_only)
+ remove_file_from_cache(path);
+ if (verbose)
+ printf("remove '%s'\n", path);
Should be:
+ if (!show_only)
+ remove_file_from_cache(path);
+ if (verbose)
+ printf("remove '%s'\n", path);
The new patch is listed below:
(http://web.mit.edu/mfwitten/git/0001-git-add-now-understands-two-
kinds-of-update.patch)
From 6d7480062b1e1c513441d4bbc17a9a8b5d9b1c8f Mon Sep 17 00:00:00 2001
From: Michael Witten <redacted>
Date: Sun, 14 Oct 2007 06:13:20 -0400
Subject: [PATCH] git-add now understands two kinds of update:
-u: update as before
-a: update all as in a true 'git commit -a'
Also, -n works correctly now with the above options.
Signed-off-by: Michael Witten <redacted>
---
builtin-add.c | 69 +++++++++++++++++++++++++++++++++++++
+-------------------
1 files changed, 46 insertions(+), 23 deletions(-)
From: Michael Witten <hidden> Date: 2016-06-15 22:43:41
Sorry for the "spam"!
On 14 Oct 2007, at 6:26:28 AM, Michael Witten wrote:
Hello,
The git-add command doesn't handle -n when using -u.
I fixed this and added -a for adding ALL files, not
just those below the current directory (just like
git-commit).
The patch is below, but you can also download it from
http://web.mit.edu/mfwitten/git/0001-git-add-now-understands-two-
kinds-of-update.patch
Unfortunately, I left a second bug in place.
I was too excited about submitting a patch,
and too tired to get it right.
The following:
+ if (verbose)
+ printf("remove '%s'\n", path);
+ if (!show_only)
+ remove_file_from_cache(path);
Should be:
+ if (show_only || verbose)
+ printf("remove '%s'\n", path);
+ if (!show_only)
+ remove_file_from_cache(path);
The new patch is listed below:
(http://web.mit.edu/mfwitten/git/0001-git-add-now-understands-two-
kinds-of-update.patch)
From c3c2f07f3f94aa75d73fce0dfabc3958532f38c4 Mon Sep 17 00:00:00 2001
From: Michael Witten <redacted>
Date: Sun, 14 Oct 2007 06:13:20 -0400
Subject: [PATCH] git-add now understands two kinds of update:
-u: update as before
-a: update all as in a true 'git commit -a'
Also, -n works correctly now with the above options.
Signed-off-by: Michael Witten <redacted>
---
builtin-add.c | 69 +++++++++++++++++++++++++++++++++++++
+-------------------
1 files changed, 46 insertions(+), 23 deletions(-)
Hi Michael,
Thank you for submitting a patch! However, please make sure you read
SubmittingPatches carefully. Your message should consist of the regular
mail headers (as generated by git-format-patch + whatever else you want
to add), the commit message, a line containing "---", and then the diff.
Any cover letter material should go after the "---".
IOW, the format the git-format-patch generates is actually a mail in the
correct format. If you can convince your mailer to use that as a
template for sending a mail, that is the best bet.
I know these seem like little things, but they make the life of the
maintainer much easier, as it means your patch and commit message can be
applied directly by the git tools.
-Peff "policing the list with an iron fist in Junio's absence" King
From: Michael Witten <hidden> Date: 2016-06-15 22:43:41
On 15 Oct 2007, at 12:20:28 AM, Jeff King wrote:
Thank you for submitting a patch! However, please make sure you read
SubmittingPatches carefully.
I apologize, though I got your first email about
Documentation/SubmittingPatches after I had sent
in this patch; I had gone rummaging around the homepage
for some information, but had found nothing special.
I just submitted a patch (properly!) to Petr Baudis
to add a link to that documentation on the main page.
-Peff "policing the list with an iron fist in Junio's absence" King
Don't worry, I didn't take it personally ;-)
Sincerely,
Michael Witten