mirror of
https://github.com/facebook/sapling.git
synced 2024-10-10 08:47:12 +03:00
65a682a1ff
Summary: Add a function for diffing two source control commits without needing to instantiate TreeInode objects. Reviewed By: wez Differential Revision: D7341604 fbshipit-source-id: 557eef87faa2785ab96d51b09569a46f892a71f6
47 lines
1.1 KiB
C++
47 lines
1.1 KiB
C++
/*
|
|
* Copyright (c) 2004-present, Facebook, Inc.
|
|
* All rights reserved.
|
|
*
|
|
* This source code is licensed under the BSD-style license found in the
|
|
* LICENSE file in the root directory of this source tree. An additional grant
|
|
* of patent rights can be found in the PATENTS file in the same directory.
|
|
*
|
|
*/
|
|
#pragma once
|
|
|
|
#include "eden/fs/service/gen-cpp2/eden_types.h"
|
|
|
|
namespace folly {
|
|
template <typename T>
|
|
class Future;
|
|
}
|
|
|
|
namespace facebook {
|
|
namespace eden {
|
|
|
|
class Hash;
|
|
class ObjectStore;
|
|
class Tree;
|
|
|
|
/**
|
|
* Compute the diff between two commits.
|
|
*
|
|
* The caller is responsible for ensuring that the ObjectStore remains valid
|
|
* until the returned Future completes.
|
|
*/
|
|
folly::Future<ScmStatus>
|
|
diffCommits(ObjectStore* store, Hash commit1, Hash commit2);
|
|
|
|
/**
|
|
* Compute the diff between two commits.
|
|
*
|
|
* The caller is responsible for ensuring that the ObjectStore remains valid
|
|
* until the returned Future completes.
|
|
*/
|
|
folly::Future<ScmStatus> diffTrees(ObjectStore* store, Hash tree1, Hash tree2);
|
|
folly::Future<ScmStatus>
|
|
diffTrees(ObjectStore* store, const Tree& tree1, const Tree& tree2);
|
|
|
|
} // namespace eden
|
|
} // namespace facebook
|