MCPcopy Index your code
hub / github.com/isomorphic-git/isomorphic-git / removeNote

Function removeNote

src/api/removeNote.js:39–89  ·  view source on GitHub ↗
({
  fs: _fs,
  onSign,
  dir,
  gitdir = join(dir, '.git'),
  ref = 'refs/notes/commits',
  oid,
  author: _author,
  committer: _committer,
  signingKey,
  cache = {},
})

Source from the content-addressed store, hash-verified

37 */
38
39export async function removeNote({
40 fs: _fs,
41 onSign,
42 dir,
43 gitdir = join(dir, '.git'),
44 ref = 'refs/notes/commits',
45 oid,
46 author: _author,
47 committer: _committer,
48 signingKey,
49 cache = {},
50}) {
51 try {
52 assertParameter('fs', _fs)
53 assertParameter('gitdir', gitdir)
54 assertParameter('oid', oid)
55
56 const fs = new FileSystem(_fs)
57 const updatedGitdir = await discoverGitdir({ fsp: fs, dotgit: gitdir })
58
59 const author = await normalizeAuthorObject({
60 fs,
61 gitdir: updatedGitdir,
62 author: _author,
63 })
64 if (!author) throw new MissingNameError('author')
65
66 const committer = await normalizeCommitterObject({
67 fs,
68 gitdir: updatedGitdir,
69 author,
70 committer: _committer,
71 })
72 if (!committer) throw new MissingNameError('committer')
73
74 return await _removeNote({
75 fs,
76 cache,
77 onSign,
78 gitdir: updatedGitdir,
79 ref,
80 oid,
81 author,
82 committer,
83 signingKey,
84 })
85 } catch (err) {
86 err.caller = 'git.removeNote'
87 throw err
88 }
89}

Callers 2

test-removeNote.jsFile · 0.85

Calls 6

joinFunction · 0.90
assertParameterFunction · 0.90
discoverGitdirFunction · 0.90
normalizeAuthorObjectFunction · 0.90
normalizeCommitterObjectFunction · 0.90
_removeNoteFunction · 0.90

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…