mirror of
https://github.com/facebook/sapling.git
synced 2024-10-10 00:45:18 +03:00
2f39c5297e
Summary: Make use of the TopLevelIgnores class to hold the system and user GitIgnoreStack details. This is a cleaner implementation making ownership semantics more intuitive. In later commits we will provide acess to the TopLevelIgnores as part of the ServerState. It will be dynamically loaded. Reviewed By: simpkins Differential Revision: D8906226 fbshipit-source-id: d955436582498861ac4b4113a47f357432c8f32e
36 lines
956 B
C++
36 lines
956 B
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.
|
|
*
|
|
*/
|
|
|
|
#include "eden/fs/inodes/DiffContext.h"
|
|
#include "eden/fs/inodes/TopLevelIgnores.h"
|
|
#include "eden/fs/model/git/GitIgnoreStack.h"
|
|
|
|
namespace facebook {
|
|
namespace eden {
|
|
|
|
DiffContext::DiffContext(
|
|
InodeDiffCallback* cb,
|
|
bool listIgnored,
|
|
const ObjectStore* os,
|
|
std::unique_ptr<TopLevelIgnores> topLevelIgnores)
|
|
: callback{cb},
|
|
store{os},
|
|
listIgnored{listIgnored},
|
|
topLevelIgnores_(std::move(topLevelIgnores)) {}
|
|
|
|
DiffContext::~DiffContext() = default;
|
|
|
|
const GitIgnoreStack* DiffContext::getToplevelIgnore() const {
|
|
return topLevelIgnores_->getStack();
|
|
}
|
|
|
|
} // namespace eden
|
|
} // namespace facebook
|