Karsten Blees
0aaf62b6e0
dir.c: git-status --ignored: don't scan the work tree twice
...
'git-status --ignored' still scans the work tree twice to collect
untracked and ignored files, respectively.
fill_directory / read_directory already supports collecting untracked and
ignored files in a single directory scan. However, the DIR_COLLECT_IGNORED
flag to enable this has some git-add specific side-effects (e.g. it
doesn't recurse into ignored directories, so listing ignored files with
--untracked=all doesn't work).
The DIR_SHOW_IGNORED flag doesn't list untracked files and returns ignored
files in dir_struct.entries[] (instead of dir_struct.ignored[] as
DIR_COLLECT_IGNORED). DIR_SHOW_IGNORED is used all throughout git.
We don't want to break the existing API, so lets introduce a new flag
DIR_SHOW_IGNORED_TOO that lists untracked as well as ignored files similar
to DIR_COLLECT_FILES, but will recurse into sub-directories based on the
other flags as DIR_SHOW_IGNORED does.
In dir.c::read_directory_recursive, add ignored files to either
dir_struct.entries[] or dir_struct.ignored[] based on the flags. Also move
the DIR_COLLECT_IGNORED case here so that filling result lists is in a
common place.
In wt-status.c::wt_status_collect_untracked, use the new flag and read
results from dir_struct.ignored[]. Remove the extra fill_directory call.
builtin/check-ignore.c doesn't call fill_directory, setting the git-add
specific DIR_COLLECT_IGNORED flag has no effect here. Remove for clarity.
Update API documentation to reflect the changes.
Performance: with this patch, 'git-status --ignored' is typically as fast
as 'git-status'.
Signed-off-by: Karsten Blees <blees@dcon.de >
Signed-off-by: Junio C Hamano <gitster@pobox.com >
2013-04-15 12:36:42 -07:00
..
2013-02-05 16:13:32 -08:00
2013-04-11 17:41:14 -07:00
2013-04-15 12:36:42 -07:00
2013-02-02 21:46:52 -08:00
2013-02-01 13:53:25 -08:00
2013-02-01 13:53:33 -08:00
2013-04-03 16:14:19 -07:00
2013-03-21 14:17:32 -07:00
2013-04-02 10:41:43 -07:00
2009-12-03 12:41:37 -08:00
2013-02-17 15:25:52 -08:00
2010-01-31 10:24:53 -08:00
2012-04-26 13:19:06 -07:00
2013-03-25 13:46:42 -07:00
2010-08-20 10:53:56 -07:00
2013-02-01 13:53:33 -08:00
2013-01-11 09:11:10 -08:00
2013-03-07 11:16:54 -08:00
2012-04-20 15:49:16 -07:00
2011-07-06 14:26:26 -07:00
2013-02-01 13:53:33 -08:00
2013-02-01 13:53:33 -08:00
2013-04-11 17:38:45 -07:00
2013-02-01 13:53:33 -08:00
2013-02-14 10:29:01 -08:00
2013-02-01 13:53:33 -08:00
2013-02-07 14:41:38 -08:00
2013-02-01 13:53:33 -08:00
2011-03-11 10:59:16 -05:00
2011-09-22 16:38:22 -07:00
2013-01-06 14:26:38 -08:00
2013-02-01 13:53:33 -08:00
2011-03-11 10:59:16 -05:00
2013-02-01 13:53:33 -08:00
2012-09-03 15:53:37 -07:00
2011-07-06 14:26:26 -07:00
2011-07-06 14:26:26 -07:00
2013-02-01 13:53:33 -08:00
2013-02-01 13:53:33 -08:00
2012-06-19 11:35:19 -07:00
2013-03-25 15:01:22 -07:00
2013-04-12 13:41:47 -07:00
2013-01-11 16:47:07 -08:00
2013-02-15 09:02:34 -08:00
2012-08-08 12:11:54 -07:00
2013-02-01 13:53:33 -08:00
2013-02-01 13:53:33 -08:00
2013-04-12 12:00:52 -07:00
2013-02-01 13:53:33 -08:00
2013-02-05 16:13:32 -08:00
2013-02-05 16:13:32 -08:00
2013-02-01 13:53:33 -08:00
2013-03-25 13:46:42 -07:00
2011-07-06 14:26:26 -07:00
2011-07-06 14:26:26 -07:00
2011-05-26 22:15:39 -07:00
2013-02-01 13:53:33 -08:00
2013-03-14 14:33:06 -07:00
2013-04-07 00:40:23 -07:00
2013-01-14 07:59:46 -08:00
2013-01-11 09:09:30 -08:00
2013-02-01 13:53:33 -08:00
2013-03-25 13:46:42 -07:00
2012-02-23 11:20:15 -08:00
2013-01-21 16:26:26 -08:00
2013-02-01 13:53:33 -08:00
2011-07-06 14:26:26 -07:00
2013-02-01 13:53:33 -08:00
2012-04-26 13:19:06 -07:00
2011-07-06 14:26:26 -07:00
2013-02-01 13:53:33 -08:00
2013-02-01 13:53:33 -08:00
2013-02-01 13:53:33 -08:00
2013-04-03 07:43:29 -07:00
2013-02-01 13:53:33 -08:00
2013-02-01 13:53:33 -08:00
2011-07-06 14:26:26 -07:00
2011-07-06 14:26:26 -07:00
2013-02-01 13:53:33 -08:00
2013-02-01 13:53:33 -08:00
2013-02-01 13:53:33 -08:00
2011-10-16 11:09:35 -07:00
2013-02-01 13:53:33 -08:00
2012-08-06 14:04:16 -07:00
2013-02-01 13:53:33 -08:00
2012-09-07 10:58:35 -07:00
2011-03-11 10:59:16 -05:00
2012-01-12 23:34:26 -08:00
2011-07-06 14:26:26 -07:00
2012-08-31 11:45:33 -07:00
2011-08-04 15:49:13 -07:00
2013-02-01 13:53:33 -08:00
2011-07-06 14:26:26 -07:00
2011-07-06 14:26:26 -07:00
2013-04-01 09:19:37 -07:00
2013-02-01 13:53:33 -08:00
2012-08-27 11:55:17 -07:00
2013-02-01 13:53:33 -08:00
2011-07-06 14:26:26 -07:00
2013-02-01 13:53:25 -08:00
2011-03-11 10:59:16 -05:00
2012-10-25 06:15:56 -04:00
2013-02-05 16:13:32 -08:00
2013-02-01 13:53:33 -08:00
2011-07-06 14:26:26 -07:00
2012-08-24 12:05:30 -07:00
2011-07-06 14:26:26 -07:00
2011-07-06 14:26:26 -07:00
2011-07-06 14:26:26 -07:00
2011-07-06 14:26:26 -07:00
2011-07-06 14:26:26 -07:00
2013-03-27 10:51:10 -07:00
2013-03-26 12:40:14 -07:00
2013-02-01 13:53:33 -08:00
2012-01-06 12:44:01 -08:00
2013-02-01 13:53:33 -08:00
2011-09-06 11:42:12 -07:00
2013-02-01 13:53:33 -08:00
2011-07-06 14:26:26 -07:00
2013-04-12 12:00:52 -07:00
2013-02-01 13:53:33 -08:00
2013-02-01 14:12:34 -08:00
2013-02-07 14:41:45 -08:00
2012-09-06 13:23:22 -07:00
2012-02-28 14:55:39 -08:00
2013-02-01 13:53:33 -08:00
2011-07-06 14:26:26 -07:00
2011-07-06 14:26:26 -07:00
2012-04-26 13:19:06 -07:00
2013-01-16 12:50:23 -08:00
2013-02-01 13:53:33 -08:00
2013-04-05 14:15:20 -07:00
2012-04-26 13:19:06 -07:00
2013-03-25 14:00:29 -07:00
2013-02-27 09:46:03 -08:00
2013-02-01 13:53:33 -08:00
2012-03-28 11:18:35 -07:00
2011-09-11 21:52:18 -07:00
2013-03-13 10:46:07 -07:00
2013-03-09 23:21:35 -08:00
2013-01-14 07:59:03 -08:00
2011-07-06 14:26:26 -07:00
2013-02-01 13:53:33 -08:00
2012-04-26 13:19:06 -07:00
2012-04-26 13:19:06 -07:00
2011-03-11 10:59:16 -05:00
2012-12-10 08:18:25 -08:00
2013-04-01 09:19:30 -07:00
2013-02-05 16:13:32 -08:00
2013-03-25 14:00:29 -07:00
2013-04-12 12:00:52 -07:00
2012-10-21 12:17:38 -07:00
2013-04-03 09:18:01 -07:00
2012-04-26 13:19:06 -07:00
2013-04-12 12:00:52 -07:00
2011-07-06 14:26:26 -07:00
2011-07-06 14:26:26 -07:00
2013-03-25 13:46:42 -07:00
2013-02-01 13:53:25 -08:00
2011-07-06 14:26:26 -07:00
2013-02-01 13:53:33 -08:00
2013-02-01 13:53:33 -08:00
2013-02-01 13:53:33 -08:00
2013-02-01 13:53:33 -08:00
2013-02-01 13:53:33 -08:00
2013-02-01 13:53:33 -08:00
2013-02-01 13:53:33 -08:00
2011-07-06 14:26:26 -07:00
2013-04-07 15:27:23 -07:00
2013-02-01 13:53:33 -08:00
2013-03-26 12:40:04 -07:00
2013-02-01 13:53:33 -08:00
2013-02-01 13:53:33 -08:00
2013-02-01 13:53:33 -08:00
2013-02-01 13:53:33 -08:00
2013-02-01 13:53:33 -08:00
2013-03-25 13:46:42 -07:00
2013-02-05 16:13:32 -08:00
2013-02-01 13:53:33 -08:00
2013-02-01 13:53:33 -08:00
2013-02-01 13:53:33 -08:00
2013-04-07 00:40:48 -07:00
2013-02-01 13:54:46 -08:00
2013-02-01 13:53:33 -08:00
2013-02-01 13:53:33 -08:00
2013-02-01 13:53:33 -08:00
2013-02-01 13:53:33 -08:00
2013-02-01 13:53:33 -08:00
2013-02-01 13:53:33 -08:00
2013-02-01 13:53:33 -08:00
2013-02-01 13:53:33 -08:00
2013-02-01 13:53:33 -08:00
2011-11-08 13:37:10 -08:00
2010-09-09 16:17:59 -07:00
2013-01-05 23:41:42 -08:00
2013-02-07 14:42:16 -08:00
2009-12-05 10:03:49 -08:00
2013-02-07 14:42:16 -08:00
2013-04-05 14:15:16 -07:00
2012-09-08 21:27:19 -07:00
2013-04-03 09:26:27 -07:00
2012-09-20 10:28:51 -07:00
2012-04-26 13:19:06 -07:00
2013-02-01 13:53:33 -08:00
2013-04-12 13:54:01 -07:00
2011-11-22 18:16:59 -08:00
2013-02-01 13:53:33 -08:00
2013-02-01 13:53:33 -08:00
2013-02-07 14:41:45 -08:00
2012-08-07 14:30:52 -07:00
2013-04-01 09:19:04 -07:00