From: Jonathan Nieder <jrnieder@gmail.com>
To: Junio C Hamano <gitster@pobox.com>
Cc: "Jeff King" <peff@peff.net>,
git@vger.kernel.org, "Nguyễn Thái Ngọc Duy" <pclouds@gmail.com>
Subject: jn/add-2.0-u-A-sans-pathspec (Re: What's cooking in git.git (Mar 2013, #07; Tue, 26))
Date: Wed, 27 Mar 2013 15:25:16 -0700 [thread overview]
Message-ID: <20130327222516.GI28148@google.com> (raw)
In-Reply-To: <7vy5d8jz0y.fsf@alter.siamese.dyndns.org>
Junio C Hamano wrote:
> On Tue, Mar 26, 2013 at 03:40:00PM -0700, Junio C Hamano wrote:
>> * jn/add-2.0-u-A-sans-pathspec (2013-03-20) 5 commits
>> - git add: -u/-A now affects the entire working tree
>> - add -A: only show pathless 'add -A' warning when changes exist outside cwd
>> - add -u: only show pathless 'add -u' warning when changes exist outside cwd
>> - add: make warn_pathless_add() a no-op after first call
>> - add: make pathless 'add [-u|-A]' warning a file-global function
>>
>> Replaces jc/add-2.0-u-A-sans-pathspec topic by not warning against
>> "add -u/-A" that is ran without pathspec when there is no change
>> outside the current directory.
>
> I recall we had a lengthy discussion on this, but how committed are
> we on the progression of this series? Are the bottom four ready to
> be merged to 1.8.3, or do they need more polishing?
I wanted to add tests and then other tasks took over. Sorry. Probably
best to get the bottom four in "next" and add tests on top later.
I have the following squashed in locally.
-- >8 --
Subject: fixup! add -u: only show pathless 'add -u' warning when changes exist outside cwd
Define ADD_CACHE_IMPLICIT_DOT in cache.h alongside the other add_to_index
flags. This way, authors of patches adding new flags that might want to
use the same bit can know to be careful.
Requested-by: Jeff King <peff@peff.net>
Signed-off-by: Jonathan Nieder <jrnieder@gmail.com>
---
Thanks,
Jonathan
builtin/add.c | 1 -
cache.h | 1 +
2 files changed, 1 insertion(+), 1 deletion(-)
diff --git a/builtin/add.c b/builtin/add.c
index ad59182..9f35df7 100644
--- a/builtin/add.c
+++ b/builtin/add.c
@@ -139,7 +139,6 @@ static void update_callback(struct diff_queue_struct *q,
}
}
-#define ADD_CACHE_IMPLICIT_DOT 32
int add_files_to_cache(const char *prefix, const char **pathspec, int flags)
{
struct update_callback_data data;
diff --git a/cache.h b/cache.h
index e493563..5de3480 100644
--- a/cache.h
+++ b/cache.h
@@ -459,6 +459,7 @@ extern int remove_file_from_index(struct index_state *, const char *path);
#define ADD_CACHE_IGNORE_ERRORS 4
#define ADD_CACHE_IGNORE_REMOVAL 8
#define ADD_CACHE_INTENT 16
+#define ADD_CACHE_IMPLICIT_DOT 32 /* internal to "git add -u/-A" */
extern int add_to_index(struct index_state *, const char *path, struct stat *, int flags);
extern int add_file_to_index(struct index_state *, const char *path, int flags);
extern struct cache_entry *make_cache_entry(unsigned int mode, const unsigned char *sha1, const char *path, int stage, int refresh);
--
1.8.2.rc3
next prev parent reply other threads:[~2013-03-27 22:25 UTC|newest]
Thread overview: 12+ messages / expand[flat|nested] mbox.gz Atom feed top
2013-03-26 22:40 What's cooking in git.git (Mar 2013, #07; Tue, 26) Junio C Hamano
2013-03-27 20:35 ` Jeff King
2013-03-27 20:50 ` Junio C Hamano
2013-03-27 20:52 ` Jeff King
2013-03-27 20:50 ` Thomas Rast
2013-03-27 21:47 ` Junio C Hamano
2013-03-27 22:07 ` John Keeping
2013-03-27 22:15 ` Junio C Hamano
2013-03-27 22:52 ` John Keeping
2013-03-28 21:40 ` Junio C Hamano
2013-03-27 22:25 ` Jonathan Nieder [this message]
2013-03-28 8:00 ` Thomas Rast
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20130327222516.GI28148@google.com \
--to=jrnieder@gmail.com \
--cc=git@vger.kernel.org \
--cc=gitster@pobox.com \
--cc=pclouds@gmail.com \
--cc=peff@peff.net \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).