merge(3p/git): Merge git subtree at v2.29.2
This also bumps the stable nixpkgs to 20.09 as of 2020-11-21, because there is some breakage in the git build related to the netrc credentials helper which someone has taken care of in nixpkgs. The stable channel is not used for anything other than git, so this should be fine. Change-Id: I3575a19dab09e1e9556cf8231d717de9890484fb
This commit is contained in:
parent
082c006c04
commit
f4609b896f
1485 changed files with 241535 additions and 109418 deletions
12
third_party/git/entry.c
vendored
12
third_party/git/entry.c
vendored
|
|
@ -113,8 +113,7 @@ static int fstat_output(int fd, const struct checkout *state, struct stat *st)
|
|||
/* use fstat() only when path == ce->name */
|
||||
if (fstat_is_reliable() &&
|
||||
state->refresh_cache && !state->base_dir_len) {
|
||||
fstat(fd, st);
|
||||
return 1;
|
||||
return !fstat(fd, st);
|
||||
}
|
||||
return 0;
|
||||
}
|
||||
|
|
@ -264,6 +263,9 @@ static int write_entry(struct cache_entry *ce,
|
|||
size_t newsize = 0;
|
||||
struct stat st;
|
||||
const struct submodule *sub;
|
||||
struct checkout_metadata meta;
|
||||
|
||||
clone_checkout_metadata(&meta, &state->meta, &ce->oid);
|
||||
|
||||
if (ce_mode_s_ifmt == S_IFREG) {
|
||||
struct stream_filter *filter = get_stream_filter(state->istate, ce->name,
|
||||
|
|
@ -315,13 +317,13 @@ static int write_entry(struct cache_entry *ce,
|
|||
*/
|
||||
if (dco && dco->state != CE_NO_DELAY) {
|
||||
ret = async_convert_to_working_tree(state->istate, ce->name, new_blob,
|
||||
size, &buf, dco);
|
||||
size, &buf, &meta, dco);
|
||||
if (ret && string_list_has_string(&dco->paths, ce->name)) {
|
||||
free(new_blob);
|
||||
goto delayed;
|
||||
}
|
||||
} else
|
||||
ret = convert_to_working_tree(state->istate, ce->name, new_blob, size, &buf);
|
||||
ret = convert_to_working_tree(state->istate, ce->name, new_blob, size, &buf, &meta);
|
||||
|
||||
if (ret) {
|
||||
free(new_blob);
|
||||
|
|
@ -508,8 +510,6 @@ int checkout_entry(struct cache_entry *ce, const struct checkout *state,
|
|||
/* If it is a gitlink, leave it alone! */
|
||||
if (S_ISGITLINK(ce->ce_mode))
|
||||
return 0;
|
||||
if (!state->force)
|
||||
return error("%s is a directory", path.buf);
|
||||
remove_subtree(&path);
|
||||
} else if (unlink(path.buf))
|
||||
return error_errno("unable to unlink old '%s'", path.buf);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue