src/client/pfs.go
func (c APIClient) DiffFile(newRepoName, newCommitID, newPath, oldRepoName,
	oldCommitID, oldPath string, shallow bool) ([]*pfs.FileInfo, []*pfs.FileInfo, error) {
	var oldFile *pfs.File
	if oldRepoName != "" {
		oldFile = NewFile(oldRepoName, oldCommitID, oldPath)
	}
	resp, err := c.PfsAPIClient.DiffFile(
		c.Ctx(),
		&pfs.DiffFileRequest{
			NewFile: NewFile(newRepoName, newCommitID, newPath),
			OldFile: oldFile,
			Shallow: shallow,
		},
	)
	if err != nil {
		return nil, nil, grpcutil.ScrubGRPC(err)
	}
	return resp.NewFiles, resp.OldFiles, nil
}
func (c APIClient) DiffFile(newRepoName, newCommitID, newPath, oldRepoName,
	oldCommitID, oldPath string, shallow bool) ([]*pfs.FileInfo, []*pfs.FileInfo, error) {
	var oldFile *pfs.File
	if oldRepoName != "" {
		oldFile = NewFile(oldRepoName, oldCommitID, oldPath)
	}
	resp, err := c.PfsAPIClient.DiffFile(
		c.Ctx(),
		&pfs.DiffFileRequest{
			NewFile: NewFile(newRepoName, newCommitID, newPath),
			OldFile: oldFile,
			Shallow: shallow,
		},
	)
	if err != nil {
		return nil, nil, grpcutil.ScrubGRPC(err)
	}
	return resp.NewFiles, resp.OldFiles, nil
}
func ( c APIClient ) DiffFile ( newRepoName , newCommitID , newPath , oldRepoName , oldCommitID , oldPath string , shallow bool ) ( [ ] * pfs . FileInfo , [ ] * pfs . FileInfo , error ) { var oldFile * pfs . File if oldRepoName != " " { oldFile = NewFile ( oldRepoName , oldCommitID , oldPath ) } resp , err := c . PfsAPIClient . DiffFile ( c . Ctx ( ) , & pfs . DiffFileRequest { NewFile : NewFile ( newRepoName , newCommitID , newPath ) , OldFile : oldFile , Shallow : shallow , } , ) if err != nil { return nil , nil , grpcutil . ScrubGRPC ( err ) } return resp . NewFiles , resp . OldFiles , nil }
// DiffFile returns the difference between 2 paths, old path may be omitted in
// which case the parent of the new path will be used. DiffFile return 2 values
// (unless it returns an error) the first value is files present under new
// path, the second is files present under old path, files which are under both
// paths and have identical content are omitted.
DiffFile returns the difference between 2 paths old path may be omitted in which case the parent of the new path will be used . DiffFile return 2 values ( unless it returns an error ) the first value is files present under new path the second is files present under old path files which are under both paths and have identical content are omitted .