From e0ecd63dfdd8a569c3de077d19a4bc0047034539 Mon Sep 17 00:00:00 2001 From: Riyyi Date: Fri, 24 Jan 2025 22:04:12 +0100 Subject: [PATCH] Manager: Allow pushing/pulling of the '.' directory --- src/dotfile.cpp | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/src/dotfile.cpp b/src/dotfile.cpp index aabbc67..4d8ff48 100644 --- a/src/dotfile.cpp +++ b/src/dotfile.cpp @@ -115,7 +115,12 @@ bool Dotfile::match(const std::string& path, const std::vector& pat std::string pathString = path.substr(cutFrom); for (const auto& pattern : patterns) { + // A dot matches everything in the current working directory + if (pattern == ".") { + return true; + } + // Exact match is obviously true if (pathString == pattern) { return true; }