mirror of
https://github.com/git/git.git
synced 2026-03-31 12:00:09 +02:00
Merge branch 'ld/discovery-limit-to-fs' into next
* ld/discovery-limit-to-fs: Revert "write-index: check and warn when worktree crosses a filesystem boundary"
This commit is contained in:
14
read-cache.c
14
read-cache.c
@@ -1550,8 +1550,6 @@ int write_index(struct index_state *istate, int newfd)
|
|||||||
struct cache_entry **cache = istate->cache;
|
struct cache_entry **cache = istate->cache;
|
||||||
int entries = istate->cache_nr;
|
int entries = istate->cache_nr;
|
||||||
struct stat st;
|
struct stat st;
|
||||||
int first_valid_ent = -1;
|
|
||||||
int more_than_one_dev;
|
|
||||||
|
|
||||||
for (i = removed = extended = 0; i < entries; i++) {
|
for (i = removed = extended = 0; i < entries; i++) {
|
||||||
if (cache[i]->ce_flags & CE_REMOVE)
|
if (cache[i]->ce_flags & CE_REMOVE)
|
||||||
@@ -1574,7 +1572,6 @@ int write_index(struct index_state *istate, int newfd)
|
|||||||
if (ce_write(&c, newfd, &hdr, sizeof(hdr)) < 0)
|
if (ce_write(&c, newfd, &hdr, sizeof(hdr)) < 0)
|
||||||
return -1;
|
return -1;
|
||||||
|
|
||||||
more_than_one_dev = 0;
|
|
||||||
for (i = 0; i < entries; i++) {
|
for (i = 0; i < entries; i++) {
|
||||||
struct cache_entry *ce = cache[i];
|
struct cache_entry *ce = cache[i];
|
||||||
if (ce->ce_flags & CE_REMOVE)
|
if (ce->ce_flags & CE_REMOVE)
|
||||||
@@ -1583,19 +1580,8 @@ int write_index(struct index_state *istate, int newfd)
|
|||||||
ce_smudge_racily_clean_entry(ce);
|
ce_smudge_racily_clean_entry(ce);
|
||||||
if (ce_write_entry(&c, newfd, ce) < 0)
|
if (ce_write_entry(&c, newfd, ce) < 0)
|
||||||
return -1;
|
return -1;
|
||||||
if (ce_uptodate(ce)) {
|
|
||||||
if (first_valid_ent < 0)
|
|
||||||
first_valid_ent = i;
|
|
||||||
else if (ce->ce_dev != cache[first_valid_ent]->ce_dev)
|
|
||||||
more_than_one_dev = 1;
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
if (more_than_one_dev &&
|
|
||||||
!git_env_bool("GIT_DISCOVERY_ACROSS_FILESYSTEM", 0))
|
|
||||||
warning("working tree spans across filesystems but "
|
|
||||||
"GIT_DISCOVERY_ACROSS_FILESYSTEM is not set.");
|
|
||||||
|
|
||||||
/* Write extension data here */
|
/* Write extension data here */
|
||||||
if (istate->cache_tree) {
|
if (istate->cache_tree) {
|
||||||
struct strbuf sb = STRBUF_INIT;
|
struct strbuf sb = STRBUF_INIT;
|
||||||
|
|||||||
Reference in New Issue
Block a user