Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
G
git2
Overview
Overview
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
lvzhengyang
git2
Commits
7e8934bb
Commit
7e8934bb
authored
Sep 17, 2013
by
Linquize
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Can guess win32 git template dir
parent
f84bc388
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
13 additions
and
2 deletions
+13
-2
src/fileops.c
+11
-1
src/fileops.h
+2
-1
No files found.
src/fileops.c
View file @
7e8934bb
...
@@ -624,15 +624,25 @@ static int git_futils_guess_xdg_dirs(git_buf *out)
...
@@ -624,15 +624,25 @@ static int git_futils_guess_xdg_dirs(git_buf *out)
#endif
#endif
}
}
static
int
git_futils_guess_template_dirs
(
git_buf
*
out
)
{
#ifdef GIT_WIN32
return
git_win32__find_system_dirs
(
out
,
L"share
\\
git-core
\\
templates"
);
#else
return
git_buf_sets
(
out
,
"/usr/share/git-core/templates"
);
#endif
}
typedef
int
(
*
git_futils_dirs_guess_cb
)(
git_buf
*
out
);
typedef
int
(
*
git_futils_dirs_guess_cb
)(
git_buf
*
out
);
static
git_buf
git_futils__dirs
[
GIT_FUTILS_DIR__MAX
]
=
static
git_buf
git_futils__dirs
[
GIT_FUTILS_DIR__MAX
]
=
{
GIT_BUF_INIT
,
GIT_BUF_INIT
,
GIT_BUF_INIT
};
{
GIT_BUF_INIT
,
GIT_BUF_INIT
,
GIT_BUF_INIT
,
GIT_BUF_INIT
};
static
git_futils_dirs_guess_cb
git_futils__dir_guess
[
GIT_FUTILS_DIR__MAX
]
=
{
static
git_futils_dirs_guess_cb
git_futils__dir_guess
[
GIT_FUTILS_DIR__MAX
]
=
{
git_futils_guess_system_dirs
,
git_futils_guess_system_dirs
,
git_futils_guess_global_dirs
,
git_futils_guess_global_dirs
,
git_futils_guess_xdg_dirs
,
git_futils_guess_xdg_dirs
,
git_futils_guess_template_dirs
,
};
};
int
git_futils_dirs_global_init
(
void
)
int
git_futils_dirs_global_init
(
void
)
...
...
src/fileops.h
View file @
7e8934bb
...
@@ -310,7 +310,8 @@ typedef enum {
...
@@ -310,7 +310,8 @@ typedef enum {
GIT_FUTILS_DIR_SYSTEM
=
0
,
GIT_FUTILS_DIR_SYSTEM
=
0
,
GIT_FUTILS_DIR_GLOBAL
=
1
,
GIT_FUTILS_DIR_GLOBAL
=
1
,
GIT_FUTILS_DIR_XDG
=
2
,
GIT_FUTILS_DIR_XDG
=
2
,
GIT_FUTILS_DIR__MAX
=
3
,
GIT_FUTILS_DIR_TEMPLATE
=
3
,
GIT_FUTILS_DIR__MAX
=
4
,
}
git_futils_dir_t
;
}
git_futils_dir_t
;
/**
/**
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment