diff options
author | Alex Good <alex@memoryandthought.me> | 2021-05-02 13:41:59 +0100 |
---|---|---|
committer | Alex Good <alex@memoryandthought.me> | 2021-06-11 17:58:36 +0100 |
commit | 1713ab45510ceeae06d8d3f75e6e4b71a7630658 (patch) | |
tree | a1dd18f5bf315ef28b9f1553d4d3c075080fd71b /src/remote.c | |
parent | 1ee3c37f48479e92f57c1a5da8c8393f4a745d13 (diff) | |
download | libgit2-1713ab45510ceeae06d8d3f75e6e4b71a7630658.tar.gz |
Respect the force flag on refspecs in git_remote_fetch
Diffstat (limited to 'src/remote.c')
-rw-r--r-- | src/remote.c | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/src/remote.c b/src/remote.c index 5f6ba5bf7..d17c38951 100644 --- a/src/remote.c +++ b/src/remote.c @@ -1460,6 +1460,9 @@ static int update_tips_for_spec( if (error < 0 && error != GIT_ENOTFOUND) goto on_error; + if (!error && !spec->force && !git_graph_descendant_of(remote->repo, &head->oid, &old)) + continue; + if (error == GIT_ENOTFOUND) { memset(&old, 0, GIT_OID_RAWSZ); |