gitfile.hpp 1.5 KB

1234567891011121314151617181920212223242526272829303132333435363738394041
  1. /*##############################################################################
  2. Copyright (C) 2011 HPCC Systems.
  3. All rights reserved. This program is free software: you can redistribute it and/or modify
  4. it under the terms of the GNU Affero General Public License as
  5. published by the Free Software Foundation, either version 3 of the
  6. License, or (at your option) any later version.
  7. This program is distributed in the hope that it will be useful,
  8. but WITHOUT ANY WARRANTY; without even the implied warranty of
  9. MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
  10. GNU Affero General Public License for more details.
  11. You should have received a copy of the GNU Affero General Public License
  12. along with this program. If not, see <http://www.gnu.org/licenses/>.
  13. ############################################################################## */
  14. #ifndef GITFILE_HPP
  15. #define GITFILE_HPP
  16. #include "jfile.hpp"
  17. #ifdef REMOTE_EXPORTS
  18. #define REMOTE_API __declspec(dllexport)
  19. #else
  20. #define REMOTE_API __declspec(dllimport)
  21. #endif
  22. /*
  23. * Direct access to files in git repositories, by revision, without needing to check them out first
  24. * Installs hooks into createIFile, spotting filenames of the form /my/directory/.git/{revision}/path/within/git
  25. */
  26. extern REMOTE_API IFile * createGitFile(const char * _filename); // create directly without installing createIFile hook
  27. extern REMOTE_API void installGitFileHook();
  28. extern REMOTE_API void removeGitFileHook();
  29. #endif