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>
This commit is contained in:

committed by
Junio C Hamano

parent
dbd57f9968
commit
44a3691362
4
cache.h
4
cache.h
@ -181,10 +181,11 @@ struct cache_entry {
|
||||
* Extended on-disk flags
|
||||
*/
|
||||
#define CE_INTENT_TO_ADD 0x20000000
|
||||
#define CE_SKIP_WORKTREE 0x40000000
|
||||
/* CE_EXTENDED2 is for future extension */
|
||||
#define CE_EXTENDED2 0x80000000
|
||||
|
||||
#define CE_EXTENDED_FLAGS (CE_INTENT_TO_ADD)
|
||||
#define CE_EXTENDED_FLAGS (CE_INTENT_TO_ADD | CE_SKIP_WORKTREE)
|
||||
|
||||
/*
|
||||
* Safeguard to avoid saving wrong flags:
|
||||
@ -233,6 +234,7 @@ static inline size_t ce_namelen(const struct cache_entry *ce)
|
||||
ondisk_cache_entry_size(ce_namelen(ce)))
|
||||
#define ce_stage(ce) ((CE_STAGEMASK & (ce)->ce_flags) >> CE_STAGESHIFT)
|
||||
#define ce_uptodate(ce) ((ce)->ce_flags & CE_UPTODATE)
|
||||
#define ce_skip_worktree(ce) ((ce)->ce_flags & CE_SKIP_WORKTREE)
|
||||
#define ce_mark_uptodate(ce) ((ce)->ce_flags |= CE_UPTODATE)
|
||||
|
||||
#define ce_permissions(mode) (((mode) & 0100) ? 0755 : 0644)
|
||||
|
Reference in New Issue
Block a user