MCPcopy Create free account
hub / github.com/isomorphic-git/isomorphic-git / _pull

Function _pull

src/commands/pull.js:47–134  ·  view source on GitHub ↗
({
  fs,
  cache,
  http,
  onProgress,
  onMessage,
  onAuth,
  onAuthSuccess,
  onAuthFailure,
  dir,
  gitdir,
  ref,
  url,
  remote,
  remoteRef,
  prune,
  pruneTags,
  fastForward,
  fastForwardOnly,
  corsProxy,
  singleBranch,
  headers,
  author,
  committer,
  signingKey,
})

Source from the content-addressed store, hash-verified

45 *
46 */
47export 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.

Callers 2

pullFunction · 0.90
fastForwardFunction · 0.90

Calls 4

_currentBranchFunction · 0.90
_fetchFunction · 0.90
_mergeFunction · 0.90
_checkoutFunction · 0.90

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…