MCPcopy Index your code
hub / github.com/ampproject/amphtml / gitDiffFileMain

Function gitDiffFileMain

build-system/common/git.js:123–126  ·  view source on GitHub ↗

* Returns the full color diff of the given file relative to the branch point * off of the main branch. * @param {string} file * @return {string}

(file)

Source from the content-addressed store, hash-verified

121 * @return {string}
122 */
123function gitDiffFileMain(file) {
124 const mainBaseline = gitMainBaseline();
125 return getStdout(`git -c color.ui=always diff -U1 ${mainBaseline} ${file}`);
126}
127
128/**
129 * Returns the name of the branch from which the PR originated.

Callers 1

checkExactVersionsFunction · 0.85

Calls 2

gitMainBaselineFunction · 0.85
getStdoutFunction · 0.85

Tested by

no test coverage detected