mirror of
https://github.com/libgit2/libgit2.git
synced 2026-01-25 02:56:17 +00:00
repo: workdir_path implies no dotgit in init
When specifying a separate working directory path, the given repository path should never have a `.git` directory created beneath it. That simply doesn't make sense. As a result, the `GIT_REPOSITORY_INIT_NO_DOTGIT_DIR` now _also_ no longer makes sense. It would only ever be a sensible option when one wanted a separate `.git` directory and working directory, otherwise the git files and working directory files would be comingled. Remove the option entirely.
This commit is contained in:
@@ -748,6 +748,17 @@ GIT_EXTERN(int) git_tag_create_frombuffer(
|
||||
|
||||
/**@}*/
|
||||
|
||||
/** @name Deprecated Repository Constants
|
||||
*
|
||||
* These enumeration values are retained for backward compatibility.
|
||||
*/
|
||||
|
||||
/**
|
||||
* @deprecated This option is deprecated; it is now implied when
|
||||
* a separate working directory is specified to `git_repository_init`.
|
||||
*/
|
||||
#define GIT_REPOSITORY_INIT_NO_DOTGIT_DIR 0
|
||||
|
||||
/** @name Deprecated Revspec Constants
|
||||
*
|
||||
* These enumeration values are retained for backward compatibility.
|
||||
|
||||
@@ -258,13 +258,6 @@ typedef enum {
|
||||
*/
|
||||
GIT_REPOSITORY_INIT_NO_REINIT = (1u << 1),
|
||||
|
||||
/**
|
||||
* Normally a "/.git/" will be appended to the repo path for
|
||||
* non-bare repos (if it is not already there), but passing this flag
|
||||
* prevents that behavior.
|
||||
*/
|
||||
GIT_REPOSITORY_INIT_NO_DOTGIT_DIR = (1u << 2),
|
||||
|
||||
/**
|
||||
* Make the repo_path (and workdir_path) as needed. Init is always willing
|
||||
* to create the ".git" directory even without this flag. This flag tells
|
||||
|
||||
Reference in New Issue
Block a user