thali/install/install.js
function doGitHubEtagsMatch(projectName, depotName, branchName,
                            directoryToInstallIn) {
  return getEtagFromEtagFile(depotName, branchName, directoryToInstallIn)
    .then(function (etagFromFile) {
      if (!etagFromFile) {
        return false;
      }

      return httpRequestPromise('HEAD',
        getGitHubZipUrlObject(projectName, depotName, branchName))
        .then(function (res) {
          var etagFromHeadRequest = returnEtagFromResponse(res);
          return etagFromFile === etagFromHeadRequest;
        });
    });
}
function doGitHubEtagsMatch(projectName, depotName, branchName,
                            directoryToInstallIn) {
  return getEtagFromEtagFile(depotName, branchName, directoryToInstallIn)
    .then(function (etagFromFile) {
      if (!etagFromFile) {
        return false;
      }

      return httpRequestPromise('HEAD',
        getGitHubZipUrlObject(projectName, depotName, branchName))
        .then(function (res) {
          var etagFromHeadRequest = returnEtagFromResponse(res);
          return etagFromFile === etagFromHeadRequest;
        });
    });
}
function doGitHubEtagsMatch ( projectName , depotName , branchName , directoryToInstallIn ) { return getEtagFromEtagFile ( depotName , branchName , directoryToInstallIn ) . then ( function ( etagFromFile ) { if ( ! etagFromFile ) { return false ; } return httpRequestPromise ( 'HEAD' , getGitHubZipUrlObject ( projectName , depotName , branchName ) ) . then ( function ( res ) { var etagFromHeadRequest = returnEtagFromResponse ( res ) ; return etagFromFile === etagFromHeadRequest ; } ) ; } ) ; }
This method is a hack because I'm having trouble getting GitHub to respect
if-none-match headers. So instead I'm doing a HEAD request and manually
checking if the etags match.

@param {string} projectName The project name
@param {string} depotName The depot name
@param {string} branchName The branch name
@param {string} directoryToInstallIn The directory to install in
@returns {boolean} Do the etags match?
This method is a hack because I m having trouble getting GitHub to respect if - none - match headers . So instead I m doing a HEAD request and manually checking if the etags match .