Cached builds

Source units now point to their previous revision if the unit isn't changed, and those units aren't rebuilt during the `make` step.
Doesn't HEAD include the index and working tree?

Sent from my iPhone

> On Dec 31, 2014, at 19:29, Samer Masterson <notifications@github.com> wrote:
> 
> In src/repo_config.go:
> 
> > @@ -95,6 +95,32 @@ func resolveWorkingTreeRevision(vcsType string, dir string) (string, error) {
> >  	return strings.TrimSuffix(string(bytes.TrimSpace(out)), "+"), nil
> >  }
> >  
> > +func listRevisions(vcsType string, dir string) ([]string, error) {
> > +	if vcsType != "git" {
> > +		return nil, fmt.Errorf("listRevisions: unsupported vcs type: %q", vcsType)
> > +	}
> > +	cmd := exec.Command("git", "rev-list", "--max-count=5", "HEAD")
> > +	cmd.Dir = dir
> > +	out, err := cmd.CombinedOutput()
> > +	if err != nil {
> > +		return nil, err
> > +	}
> > +	return strings.Split(string(bytes.TrimSpace(out)), "\n"), nil
> > +}
> > +
> > +func changedFilesFromCurrentRev(vcsType string, dir string, fromRev string) ([]string, error) {
> Just to clarify, changedFilesFromCurrentRev only returns the files that have changed between fromRev and HEAD. I hadn't thought of the case where srclib is building uncommitted code, and I think changedFilesFromCurrentRev should diff with the current working directory to be consistent with srclib's current behavior. Let me fix up the name, though. Quinn Slack writes:
> …
> —
> Reply to this email directly or view it on GitHub.
>