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

Function pull

src/api/pull.js:63–141  ·  view source on GitHub ↗
({
  fs: _fs,
  http,
  onProgress,
  onMessage,
  onAuth,
  onAuthSuccess,
  onAuthFailure,
  dir,
  gitdir = join(dir, '.git'),
  ref,
  url,
  remote,
  remoteRef,
  prune = false,
  pruneTags = false,
  fastForward = true,
  fastForwardOnly = false,
  corsProxy,
  singleBranch,
  headers = {},
  author: _author,
  committer: _committer,
  signingKey,
  cache = {},
})

Source from the content-addressed store, hash-verified

61 *
62 */
63export async function pull({
64 fs: _fs,
65 http,
66 onProgress,
67 onMessage,
68 onAuth,
69 onAuthSuccess,
70 onAuthFailure,
71 dir,
72 gitdir = join(dir, '.git'),
73 ref,
74 url,
75 remote,
76 remoteRef,
77 prune = false,
78 pruneTags = false,
79 fastForward = true,
80 fastForwardOnly = false,
81 corsProxy,
82 singleBranch,
83 headers = {},
84 author: _author,
85 committer: _committer,
86 signingKey,
87 cache = {},
88}) {
89 try {
90 assertParameter('fs', _fs)
91 assertParameter('gitdir', gitdir)
92
93 const fs = new FileSystem(_fs)
94 const updatedGitdir = await discoverGitdir({ fsp: fs, dotgit: gitdir })
95
96 const author = await normalizeAuthorObject({
97 fs,
98 gitdir: updatedGitdir,
99 author: _author,
100 })
101 if (!author) throw new MissingNameError('author')
102
103 const committer = await normalizeCommitterObject({
104 fs,
105 gitdir: updatedGitdir,
106 author,
107 committer: _committer,
108 })
109 if (!committer) throw new MissingNameError('committer')
110
111 return await _pull({
112 fs,
113 cache,
114 http,
115 onProgress,
116 onMessage,
117 onAuth,
118 onAuthSuccess,
119 onAuthFailure,
120 dir,

Callers 2

test-pull.jsFile · 0.85

Calls 6

joinFunction · 0.90
assertParameterFunction · 0.90
discoverGitdirFunction · 0.90
normalizeAuthorObjectFunction · 0.90
normalizeCommitterObjectFunction · 0.90
_pullFunction · 0.90

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…