diff options
author | Nguyễn Thái Ngọc Duy <pclouds@gmail.com> | 2009-08-20 20:46:58 +0700 |
---|---|---|
committer | Junio C Hamano <gitster@pobox.com> | 2009-08-23 17:13:32 -0700 |
commit | b4d1690df11ae6ce382b93778616b1a20f1774ff (patch) | |
tree | 63ba6b306c569dc59c24361ebb72ac1f081b8f0e /builtin-ls-files.c | |
parent | Introduce "skip-worktree" bit in index, teach Git to get/set this bit (diff) | |
download | tgif-b4d1690df11ae6ce382b93778616b1a20f1774ff.tar.xz |
Teach Git to respect skip-worktree bit (reading part)
grep: turn on --cached for files that is marked skip-worktree
ls-files: do not check for deleted file that is marked skip-worktree
update-index: ignore update request if it's skip-worktree, while still allows removing
diff*: skip worktree version
Signed-off-by: Nguyễn Thái Ngọc Duy <pclouds@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
Diffstat (limited to 'builtin-ls-files.c')
-rw-r--r-- | builtin-ls-files.c | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/builtin-ls-files.c b/builtin-ls-files.c index c1afbad453..ad7e44784f 100644 --- a/builtin-ls-files.c +++ b/builtin-ls-files.c @@ -194,6 +194,8 @@ static void show_files(struct dir_struct *dir, const char *prefix) continue; if (ce->ce_flags & CE_UPDATE) continue; + if (ce_skip_worktree(ce)) + continue; err = lstat(ce->name, &st); if (show_deleted && err) show_ce_entry(tag_removed, ce); |