jn/add-2.0-u-A-sans-pathspec (Re: What's cooking in git.git (Mar 2013, #07; Tue, 26))

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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@xxxxxxxx>
Signed-off-by: Jonathan Nieder <jrnieder@xxxxxxxxx>
---
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

--
To unsubscribe from this list: send the line "unsubscribe git" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html




[Index of Archives]     [Linux Kernel Development]     [Gcc Help]     [IETF Annouce]     [DCCP]     [Netdev]     [Networking]     [Security]     [V4L]     [Bugtraq]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux SCSI]     [Fedora Users]