({
fs,
cache,
http,
onProgress,
onMessage,
onAuth,
onAuthSuccess,
onAuthFailure,
dir,
gitdir,
ref,
url,
remote,
remoteRef,
prune,
pruneTags,
fastForward,
fastForwardOnly,
corsProxy,
singleBranch,
headers,
author,
committer,
signingKey,
})
| 45 | * |
| 46 | */ |
| 47 | export async function _pull({ |
| 48 | fs, |
| 49 | cache, |
| 50 | http, |
| 51 | onProgress, |
| 52 | onMessage, |
| 53 | onAuth, |
| 54 | onAuthSuccess, |
| 55 | onAuthFailure, |
| 56 | dir, |
| 57 | gitdir, |
| 58 | ref, |
| 59 | url, |
| 60 | remote, |
| 61 | remoteRef, |
| 62 | prune, |
| 63 | pruneTags, |
| 64 | fastForward, |
| 65 | fastForwardOnly, |
| 66 | corsProxy, |
| 67 | singleBranch, |
| 68 | headers, |
| 69 | author, |
| 70 | committer, |
| 71 | signingKey, |
| 72 | }) { |
| 73 | try { |
| 74 | // If ref is undefined, use 'HEAD' |
| 75 | if (!ref) { |
| 76 | const head = await _currentBranch({ fs, gitdir }) |
| 77 | // TODO: use a better error. |
| 78 | if (!head) { |
| 79 | throw new MissingParameterError('ref') |
| 80 | } |
| 81 | ref = head |
| 82 | } |
| 83 | |
| 84 | const { fetchHead, fetchHeadDescription } = await _fetch({ |
| 85 | fs, |
| 86 | cache, |
| 87 | http, |
| 88 | onProgress, |
| 89 | onMessage, |
| 90 | onAuth, |
| 91 | onAuthSuccess, |
| 92 | onAuthFailure, |
| 93 | gitdir, |
| 94 | corsProxy, |
| 95 | ref, |
| 96 | url, |
| 97 | remote, |
| 98 | remoteRef, |
| 99 | singleBranch, |
| 100 | headers, |
| 101 | prune, |
| 102 | pruneTags, |
| 103 | }) |
| 104 | // Merge the remote tracking branch into the local one. |
no test coverage detected
searching dependent graphs…