Determines if the remote SHA/tag/branch referenced by the repostory
 differs from what appears on disk.

 @return [TrueClass|FalseClass] true if changed
439151
def remote_differs?
      remote_sha = nil
      current_sha = nil
      git_repo = git_repo_for(@repo_dir)
      without_size_limit(git_repo) do
        do_fetch(git_repo)
        revision = resolve_revision
        remote_name = validate_revision(git_repo, revision)
        remote_sha = git_repo.sha_for(remote_name ? remote_name : revision)
        current_sha = git_repo.sha_for(nil)
      end
      current_sha != remote_sha
    end
639383
def local_clone
      return @local_clone if @local_clone
      return nil if cache.nil?
      return nil if source.nil?
      hash = Digest::SHA1.hexdigest(source)[0..10]
      path = Zaru.sanitize! source.gsub(%r{[/\\:]}, '_')
      File.join cache, "repo_#{path}_#{hash}"
    end
1320880
def check_if_branch_exist(db, root_hash, key_prefix):
    
    validate_is_bytes(key_prefix)

    return _check_if_branch_exist(db, root_hash, encode_to_bin(key_prefix))
1007721
def compare_content(self, other):
        '''
        
        '''
        if type(self) is not type(other):
            return False
        s1 = self.snapshot()
        s2 = other.snapshot()
        for snapshot in (s1, s2):
            for key in snapshot.keys():
                if key[0] in ('_', '.'):
                    del snapshot[key]
        return s1 == s2
634707
def checkIfRemoteIsNewer(self, localfile):
        
        is_remote_newer = False
        if localfile.exists() and localfile.stat().st_size > 0:
            LOG.info("File exists locally, using cache")
        else:
            is_remote_newer = True
            LOG.info("No cache file, fetching entries")
        return is_remote_newer
210346
def modified?(doc)
      return true if metadata[doc.path]&.[](:forced)
      return true unless File.exist?(site.in_dest_dir(doc.path))
      modified, hash = file_mtime_of(doc.path), metadata[doc.path]
      return modified > hash[:last_modified] if hash && !hash[:dynamic] && hash[:seen_before]
      return hash[:seen_before] = true if hash && !hash[:seen_before]
      return dependencies_modified?(hash) if hash
      add(doc.path).update(seen_before: true)

      true
    end
1232158
protected final boolean hasHashChanged(Hasher hasher, RegData regDatum) {
        String urlExternalForm = regDatum.getURLExternalForm();
        // Check hash.
        String newHash = hasher.hashURL(urlExternalForm);
        boolean anyDiff = !newHash.equals(regDatum.getHash());
        return anyDiff;
    }
726050
def has_repos(self):
        
        for section in self.sections():
            if section not in self.reserved_sections:
                return True
        return False
624952
def validate_target_remote_branch
      remote_path = File.join(config[:remote], config[:branch])

      remotes = []
      @gitrepo.remotes.each { |remote| remotes << remote.name }
      unless remotes.include?(remote_path)
        ui.error 'The remote/branch specified does not seem to exist.'
        exit 7
      end
    end
1004076
def _has_commit(version, debug=False):
    
    if _has_tag(version, debug) or _has_branch(version, debug):
        return False
    cmd = sh.git.bake('cat-file', '-e', version)
    try:
        util.run_command(cmd, debug=debug)
        return True
    except sh.ErrorReturnCode:
        return False
1318853
def verify_signatures?
      return false if ENV['OVERCOMMIT_NO_VERIFY']
      return true if @hash['verify_signatures'] != false

      result = Overcommit::Utils.execute(
        %W[git config --local --get #{verify_signature_config_key}]
      )

      if result.status == 1 # Key doesn't exist
        return true
      elsif result.status != 0
        raise Overcommit::Exceptions::GitConfigError,
              "Unable to read from local repo git config: #{result.stderr}"
      end

      # We don't cast since we want to allow anything to count as "true" except
      # a literal zero
      result.stdout.strip != '0'
    end
714044
public boolean isModified()
  {
    I instance = _instance;

    if (instance == null) {
      return true;
    }
    
    if (DeployMode.MANUAL.equals(_strategy.redeployMode())) {
      return false;
    }
    
    return instance.isModified();
  }
34187
public boolean isRemoteBranch(final Git git, final String branch, final String remote) {
        try {
            final List<Ref> refs = git.branchList()
                .setListMode(ListBranchCommand.ListMode.REMOTE).call();

            final String remoteBranch = remote + "/" + branch;
            return refs.stream().anyMatch(ref -> ref.getName().endsWith(remoteBranch));
        } catch (GitAPIException e) {
            throw new IllegalStateException(e);
        }
    }
1165576
def tag_exists(self, version):
        
        for tag in self.available_tags():
            if tag == version:
                return True
        return False
1213535
def local
      local = []

      @branches.each do |branch|
        local << branch unless branch.remote?
      end

      BranchCollection.new(@repo, local)
    end
989720
def is_revision_chain_placeholder(pid):
    """"""
    return d1_gmn.app.models.ReplicaRevisionChainReference.objects.filter(
        pid__did=pid
    ).exists()
1105075
def hasoriginal(self,allowempty=False):
        """"""
        for e in self.select(Original,None,False, False):
            if not allowempty and len(e) == 0: continue
            return True
        return False