Skip to content

Commit c470931

Browse files
committed
Fix formatting
1 parent 65a06d8 commit c470931

File tree

5 files changed

+53
-53
lines changed

5 files changed

+53
-53
lines changed

.gitignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -14,3 +14,4 @@ clones/
1414

1515
# Testing failures
1616
core
17+
.cache/

p4-fusion/commands/result.h

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -13,15 +13,15 @@ class Result : public ClientUser
1313
Error m_Error;
1414

1515
public:
16-
Result() = default;
16+
Result() = default;
1717

1818
void HandleError(Error* e) override;
1919

2020
const Error& GetError() const { return m_Error; }
2121

22-
Result(const Result&) = delete;
23-
Result& operator=(const Result&) = delete;
22+
Result(const Result&) = delete;
23+
Result& operator=(const Result&) = delete;
2424

25-
Result(Result&&) = delete;
26-
Result& operator=(Result&&) = delete;
25+
Result(Result&&) = delete;
26+
Result& operator=(Result&&) = delete;
2727
};

p4-fusion/git_api.cc

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -32,17 +32,17 @@ GitAPI::GitAPI(bool fsyncEnable)
3232

3333
GIT2(git_libgit2_opts(GIT_OPT_ENABLE_FSYNC_GITDIR, (int)fsyncEnable));
3434

35-
// Since we trust the hard-drive and operating system, we can skip the verification.
36-
GIT2(git_libgit2_opts(GIT_OPT_ENABLE_STRICT_HASH_VERIFICATION, (int)0));
35+
// Since we trust the hard-drive and operating system, we can skip the verification.
36+
GIT2(git_libgit2_opts(GIT_OPT_ENABLE_STRICT_HASH_VERIFICATION, (int)0));
3737

38-
// Global RAM cache: 1gb...
39-
GIT2(git_libgit2_opts(GIT_OPT_SET_CACHE_MAX_SIZE, (ssize_t)(1024 * 1024 * 1024)));
38+
// Global RAM cache: 1gb...
39+
GIT2(git_libgit2_opts(GIT_OPT_SET_CACHE_MAX_SIZE, (ssize_t)(1024 * 1024 * 1024)));
4040

41-
// 20Mb for the file name tree cache...
42-
GIT2(git_libgit2_opts(GIT_OPT_SET_CACHE_OBJECT_LIMIT, GIT_OBJECT_TREE, (size_t)(20 * 1024 * 1024)));
43-
44-
// 20Mb for commit info cache...
45-
GIT2(git_libgit2_opts(GIT_OPT_SET_CACHE_OBJECT_LIMIT, GIT_OBJECT_COMMIT, (size_t)(20 * 1024 * 1024)));
41+
// 20Mb for the file name tree cache...
42+
GIT2(git_libgit2_opts(GIT_OPT_SET_CACHE_OBJECT_LIMIT, GIT_OBJECT_TREE, (size_t)(20 * 1024 * 1024)));
43+
44+
// 20Mb for commit info cache...
45+
GIT2(git_libgit2_opts(GIT_OPT_SET_CACHE_OBJECT_LIMIT, GIT_OBJECT_COMMIT, (size_t)(20 * 1024 * 1024)));
4646
}
4747

4848
GitAPI::~GitAPI()

p4-fusion/main.cc

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -313,19 +313,18 @@ int Main(int argc, char** argv)
313313
ThreadPool::GetSingleton()->Initialize(networkThreads);
314314
SUCCESS("Created " << ThreadPool::GetSingleton()->GetThreadCount() << " threads in thread pool");
315315

316-
317316
// Go in the chronological order
318317
size_t lastDownloadedCL = 0;
319318
for (size_t currentCL = 0; currentCL < changes.size() && currentCL < lookAhead; currentCL++)
320319
{
321320
ChangeList& cl = changes.at(currentCL);
322-
321+
323322
// Start gathering changed files with `p4 describe` or `p4 filelog`
324323
cl.PrepareDownload(branchSet);
325-
324+
326325
lastDownloadedCL = currentCL;
327326
}
328-
327+
329328
// This is intentionally put in a separate loop.
330329
// We want to submit `p4 describe` commands before sending any of the `p4 print` commands.
331330
// Gives ~15% perf boost.

p4-fusion/p4_api.cc

Lines changed: 35 additions & 35 deletions
Original file line numberDiff line numberDiff line change
@@ -185,21 +185,21 @@ std::unique_ptr<TestResult> P4API::TestConnection(const int retries)
185185
std::unique_ptr<ChangesResult> P4API::ShortChanges(const std::string& path)
186186
{
187187
std::unique_ptr<ChangesResult> changes = Run<ChangesResult>("changes", {
188-
"-r", // Get CLs from earliest to latest
189-
"-s", "submitted", // Only include submitted CLs
190-
path // Depot path to get CLs from
191-
});
188+
"-r", // Get CLs from earliest to latest
189+
"-s", "submitted", // Only include submitted CLs
190+
path // Depot path to get CLs from
191+
});
192192
return changes;
193193
}
194194

195195
std::unique_ptr<ChangesResult> P4API::Changes(const std::string& path)
196196
{
197197
MTR_SCOPE("P4", __func__);
198198
return Run<ChangesResult>("changes", {
199-
"-l", // Get full descriptions instead of sending cut-short ones
200-
"-s", "submitted", // Only include submitted CLs
201-
path // Depot path to get CLs from
202-
});
199+
"-l", // Get full descriptions instead of sending cut-short ones
200+
"-s", "submitted", // Only include submitted CLs
201+
path // Depot path to get CLs from
202+
});
203203
}
204204

205205
std::unique_ptr<ChangesResult> P4API::Changes(const std::string& path, const std::string& from, int32_t maxCount)
@@ -241,47 +241,47 @@ std::unique_ptr<ChangesResult> P4API::ChangesFromTo(const std::string& path, con
241241
{
242242
std::string pathArg = path + "@" + from + "," + to;
243243
return Run<ChangesResult>("changes", {
244-
"-s", "submitted", // Only include submitted CLs
245-
pathArg // Depot path to get CLs from
246-
});
244+
"-s", "submitted", // Only include submitted CLs
245+
pathArg // Depot path to get CLs from
246+
});
247247
}
248248

249249
std::unique_ptr<ChangesResult> P4API::LatestChange(const std::string& path)
250250
{
251251
MTR_SCOPE("P4", __func__);
252252
return Run<ChangesResult>("changes", {
253-
"-s", "submitted", // Only include submitted CLs,
254-
"-m", "1", // Get top-most change
255-
path // Depot path to get CLs from
256-
});
253+
"-s", "submitted", // Only include submitted CLs,
254+
"-m", "1", // Get top-most change
255+
path // Depot path to get CLs from
256+
});
257257
}
258258

259259
std::unique_ptr<ChangesResult> P4API::OldestChange(const std::string& path)
260260
{
261261
std::unique_ptr<ChangesResult> changes = Run<ChangesResult>("changes", {
262-
"-r", // List from earliest to latest
263-
"-s", "submitted", // Only include submitted CLs,
264-
"-m", "1", // Get top-most change
265-
path // Depot path to get CLs from
266-
});
262+
"-r", // List from earliest to latest
263+
"-s", "submitted", // Only include submitted CLs,
264+
"-m", "1", // Get top-most change
265+
path // Depot path to get CLs from
266+
});
267267
return changes;
268268
}
269269

270270
std::unique_ptr<DescribeResult> P4API::Describe(const std::string& cl)
271271
{
272272
MTR_SCOPE("P4", __func__);
273273
return Run<DescribeResult>("describe", { "-s", // Omit the diffs
274-
cl });
274+
cl });
275275
}
276276

277277
std::unique_ptr<FileLogResult> P4API::FileLog(const std::string& changelist)
278278
{
279279
return Run<FileLogResult>("filelog", {
280-
"-c", // restrict output to a single changelist
281-
changelist,
282-
"-m1", // don't get the full history, just the first entry.
283-
"//..." // rather than require the path to be passed in, just list all files.
284-
});
280+
"-c", // restrict output to a single changelist
281+
changelist,
282+
"-m1", // don't get the full history, just the first entry.
283+
"//..." // rather than require the path to be passed in, just list all files.
284+
});
285285
}
286286

287287
std::unique_ptr<SizesResult> P4API::Size(const std::string& file)
@@ -298,16 +298,16 @@ std::unique_ptr<SyncResult> P4API::GetFilesToSyncAtCL(const std::string& path, c
298298
{
299299
std::string clCommand = "@" + cl;
300300
return Run<SyncResult>("sync", {
301-
"-n", // Only preview the files to sync. Don't send file contents...yet
302-
clCommand,
303-
});
301+
"-n", // Only preview the files to sync. Don't send file contents...yet
302+
clCommand,
303+
});
304304
}
305305

306306
std::unique_ptr<PrintResult> P4API::PrintFile(const std::string& filePathRevision)
307307
{
308308
return Run<PrintResult>("print", {
309-
filePathRevision,
310-
});
309+
filePathRevision,
310+
});
311311
}
312312

313313
std::unique_ptr<PrintResult> P4API::PrintFiles(const std::vector<std::string>& fileRevisions)
@@ -325,15 +325,15 @@ std::unique_ptr<PrintResult> P4API::PrintFiles(const std::vector<std::string>& f
325325
std::unique_ptr<Result> P4API::Sync(const std::string& path)
326326
{
327327
return Run<Result>("sync", {
328-
path // Sync a particular depot path
329-
});
328+
path // Sync a particular depot path
329+
});
330330
}
331331

332332
std::unique_ptr<UsersResult> P4API::Users()
333333
{
334334
return Run<UsersResult>("users", {
335-
"-a" // Include service accounts
336-
});
335+
"-a" // Include service accounts
336+
});
337337
}
338338

339339
std::unique_ptr<InfoResult> P4API::Info()

0 commit comments

Comments
 (0)