nd/untracked-cache update
Get series with b4
b4 am [email protected]Versions newest first
- v1 Latest24 patches 9 repliesIn review
Patches in v1 No applies recorded yet
Reviews trailers per patch
None of the 24 patches has a Reviewed-by or Acked-by.
| Patch | Junio C Hamano | Torsten Bögershausen | Eric Sunshine | brian m. carlson | David Turner | Ramsay Jones |
|---|---|---|---|---|---|---|
| 1/24 | Helped-by | Helped-by | ||||
| 2/24 | Helped-by | Helped-by | ||||
| 3/24 | ||||||
| 4/24 | ||||||
| 5/24 | Helped-by | |||||
| 6/24 | Helped-by | |||||
| 7/24 | ||||||
| 8/24 | ||||||
| 9/24 | ||||||
| 10/24 | ||||||
| 11/24 | ||||||
| 12/24 | ||||||
| 13/24 | ||||||
| 14/24 | ||||||
| 15/24 | ||||||
| 16/24 | ||||||
| 17/24 | ||||||
| 18/24 | ||||||
| 19/24 | ||||||
| 20/24 | Helped-by | |||||
| 21/24 | ||||||
| 22/24 | Helped-by | |||||
| 23/24 | Helped-by | Helped-by | Helped-by | |||
| 24/24 |
Trailers given in replies are filled; those carried in the patches from earlier versions are outlined with dashes. Scroll the table sideways for all 6 reviewers.
Cover letter [PATCH 00/24] nd/untracked-cache update
Sorry for this really late update. This fixes bugs in extension writing code (10/24), support using the same cache from different hosts (23/24), and adds a new bug to point the user to untracked cache from 'git status -uno' (new patch 24/24)
Diff from 'pu'
-- 8< --
Documentation/git-status.txt +4 -1
@@ -58,7 +58,10 @@ When `-u` option is not used, untracked files and directories are shown (i.e. the same as specifying `normal`), to help you avoid forgetting to add newly created files. Because it takes extra work to find untracked files in the filesystem, this mode may take some -time in a large working tree. You can use `no` to have `git status` +time in a large working tree. +Consider to enable untracked cache and split index if supported (see +`git update-index --untracked-cache` and `git update-index +--split-index`), Otherwise you can use `no` to have `git status` return more quickly without showing untracked files. + The default can be changed using the status.showUntrackedFiles
Documentation/technical/index-format.txt +3 -2
@@ -242,8 +242,9 @@ Git index format The extension starts with - - A NUL-terminated string describing the environment when the cache - is created. + - A sequence of NUL-terminated strings, preceded by the size of the + sequence in variable width encoding. Each string describes the + environment where the cache can be used. - Stat data of $GIT_DIR/info/exclude. See "Index entry" section from ctime field until "file size".
builtin/update-index.c +10 -6
@@ -1083,7 +1083,7 @@ int cmd_update_index(int argc, const char **argv, const char *prefix) the_index.split_index =NULL ; the_index.cache_changed |=SOMETHING_CHANGED ; } -if (untracked_cache >0 && !the_index.untracked) { +if (untracked_cache >0 ) {struct untracked_cache *uc;if (untracked_cache <2 ) {
@@ -1091,11 +1091,15 @@ int cmd_update_index(int argc, const char **argv, const char *prefix)if (!test_if_untracked_cache_is_supported ())return 1 ; } - uc =xcalloc (1 ,sizeof (*uc)); - uc->exclude_per_dir =".gitignore" ; -/* should be the same flags used by git-status */ - uc->dir_flags =DIR_SHOW_OTHER_DIRECTORIES |DIR_HIDE_EMPTY_DIRECTORIES ; - the_index.untracked = uc; +if (!the_index.untracked) { + uc =xcalloc (1 ,sizeof (*uc)); +strbuf_init (&uc->ident,100 ); + uc->exclude_per_dir =".gitignore" ; +/* should be the same flags used by git-status */ + uc->dir_flags =DIR_SHOW_OTHER_DIRECTORIES |DIR_HIDE_EMPTY_DIRECTORIES ; + the_index.untracked = uc; + } +add_untracked_ident (the_index.untracked); the_index.cache_changed |=UNTRACKED_CHANGED ; }else if (!untracked_cache && the_index.untracked) { the_index.untracked =NULL ;
dir.c +57 -30
151 lines not on this page · raw message
dir.h +2 -0
@@ -127,6 +127,7 @@ struct untracked_cache {struct sha1_stat ss_info_exclude;struct sha1_stat ss_excludes_file;const char *exclude_per_dir; +struct strbuf ident;/* * dir_struct#flags must match dir_flags or the untracked * cache is ignored.
@@ -305,4 +306,5 @@ void untracked_cache_add_to_index(struct index_state *, const char *);void free_untracked_cache (struct untracked_cache *);struct untracked_cache *read_untracked_extension (const void *data,unsigned long sz);void write_untracked_extension (struct strbuf *out,struct untracked_cache *untracked); +void add_untracked_ident (struct untracked_cache *);#endif
-- 8< --
Signature · 1 line
2.2.0.84.ge9c7a8a