diff options
author | Nguyễn Thái Ngọc Duy <pclouds@gmail.com> | 2009-08-20 20:46:57 +0700 |
---|---|---|
committer | Junio C Hamano <gitster@pobox.com> | 2009-08-23 17:11:28 -0700 |
commit | 44a3691362dc71241a5d68d90b07642c46992e4a (patch) | |
tree | baafb787871699fd6e0704004ecd04ab2c3dbe04 /builtin-ls-files.c | |
parent | dbd57f99680eac33626d5058459efd7f118f5170 (diff) | |
download | git-44a3691362dc71241a5d68d90b07642c46992e4a.tar.gz |
Introduce "skip-worktree" bit in index, teach Git to get/set this bit
Detail about this bit is in Documentation/git-update-index.txt.
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 | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/builtin-ls-files.c b/builtin-ls-files.c index f473220502..c1afbad453 100644 --- a/builtin-ls-files.c +++ b/builtin-ls-files.c @@ -37,6 +37,7 @@ static const char *tag_removed = ""; static const char *tag_other = ""; static const char *tag_killed = ""; static const char *tag_modified = ""; +static const char *tag_skip_worktree = ""; static void show_dir_entry(const char *tag, struct dir_entry *ent) { @@ -178,7 +179,8 @@ static void show_files(struct dir_struct *dir, const char *prefix) continue; if (ce->ce_flags & CE_UPDATE) continue; - show_ce_entry(ce_stage(ce) ? tag_unmerged : tag_cached, ce); + show_ce_entry(ce_stage(ce) ? tag_unmerged : + (ce_skip_worktree(ce) ? tag_skip_worktree : tag_cached), ce); } } if (show_deleted | show_modified) { @@ -490,6 +492,7 @@ int cmd_ls_files(int argc, const char **argv, const char *prefix) tag_modified = "C "; tag_other = "? "; tag_killed = "K "; + tag_skip_worktree = "S "; } if (show_modified || show_others || show_deleted || (dir.flags & DIR_SHOW_IGNORED) || show_killed) require_work_tree = 1; |