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

Function push

src/api/push.js:58–110  ·  view source on GitHub ↗
({
  fs,
  http,
  onProgress,
  onMessage,
  onAuth,
  onAuthSuccess,
  onAuthFailure,
  onPrePush,
  dir,
  gitdir = join(dir, '.git'),
  ref,
  remoteRef,
  remote = 'origin',
  url,
  force = false,
  delete: _delete = false,
  corsProxy,
  headers = {},
  cache = {},
})

Source from the content-addressed store, hash-verified

56 *
57 */
58export async function push({
59 fs,
60 http,
61 onProgress,
62 onMessage,
63 onAuth,
64 onAuthSuccess,
65 onAuthFailure,
66 onPrePush,
67 dir,
68 gitdir = join(dir, '.git'),
69 ref,
70 remoteRef,
71 remote = 'origin',
72 url,
73 force = false,
74 delete: _delete = false,
75 corsProxy,
76 headers = {},
77 cache = {},
78}) {
79 try {
80 assertParameter('fs', fs)
81 assertParameter('http', http)
82 assertParameter('gitdir', gitdir)
83
84 const fsp = new FileSystem(fs)
85 const updatedGitdir = await discoverGitdir({ fsp, dotgit: gitdir })
86 return await _push({
87 fs: fsp,
88 cache,
89 http,
90 onProgress,
91 onMessage,
92 onAuth,
93 onAuthSuccess,
94 onAuthFailure,
95 onPrePush,
96 gitdir: updatedGitdir,
97 ref,
98 remoteRef,
99 remote,
100 url,
101 force,
102 delete: _delete,
103 corsProxy,
104 headers,
105 })
106 } catch (err) {
107 err.caller = 'git.push'
108 throw err
109 }
110}

Calls 4

joinFunction · 0.90
assertParameterFunction · 0.90
discoverGitdirFunction · 0.90
_pushFunction · 0.90

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…