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

Function fastForward

src/api/fastForward.js:45–104  ·  view source on GitHub ↗
({
  fs,
  http,
  onProgress,
  onMessage,
  onAuth,
  onAuthSuccess,
  onAuthFailure,
  dir,
  gitdir = join(dir, '.git'),
  ref,
  url,
  remote,
  remoteRef,
  corsProxy,
  singleBranch,
  headers = {},
  cache = {},
})

Source from the content-addressed store, hash-verified

43 *
44 */
45export async function fastForward({
46 fs,
47 http,
48 onProgress,
49 onMessage,
50 onAuth,
51 onAuthSuccess,
52 onAuthFailure,
53 dir,
54 gitdir = join(dir, '.git'),
55 ref,
56 url,
57 remote,
58 remoteRef,
59 corsProxy,
60 singleBranch,
61 headers = {},
62 cache = {},
63}) {
64 try {
65 assertParameter('fs', fs)
66 assertParameter('http', http)
67 assertParameter('gitdir', gitdir)
68
69 const thisWillNotBeUsed = {
70 name: '',
71 email: '',
72 timestamp: Date.now(),
73 timezoneOffset: 0,
74 }
75
76 const fsp = new FileSystem(fs)
77 const updatedGitdir = await discoverGitdir({ fsp, dotgit: gitdir })
78 return await _pull({
79 fs: fsp,
80 cache,
81 http,
82 onProgress,
83 onMessage,
84 onAuth,
85 onAuthSuccess,
86 onAuthFailure,
87 dir,
88 gitdir: updatedGitdir,
89 ref,
90 url,
91 remote,
92 remoteRef,
93 fastForwardOnly: true,
94 corsProxy,
95 singleBranch,
96 headers,
97 author: thisWillNotBeUsed,
98 committer: thisWillNotBeUsed,
99 })
100 } catch (err) {
101 err.caller = 'git.fastForward'
102 throw err

Callers

nothing calls this directly

Calls 4

joinFunction · 0.90
assertParameterFunction · 0.90
discoverGitdirFunction · 0.90
_pullFunction · 0.90

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…