Merge branch 'qq/maint'
* qq/maint: clone -q: honor "quiet" option over native transports. attribute documentation: keep EXAMPLE at end builtin-commit.c: Use 'git_config_string' to get 'commit.template' http.c: Use 'git_config_string' to clean up SSL config. diff.c: Use 'git_config_string' to get 'diff.external' convert.c: Use 'git_config_string' to get 'smudge' and 'clean' builtin-log.c: Use 'git_config_string' to get 'format.subjectprefix' and 'format.suffix' Documentation cvs: Clarify when a bare repository is needed Documentation: be precise about which date --pretty uses Conflicts: Documentation/gitattributes.txt
This commit is contained in:
commit
08b51f51e6
@ -31,6 +31,12 @@ to work with; after that, you need to 'git-merge' incremental imports, or
|
|||||||
any CVS branches, yourself. It is advisable to specify a named remote via
|
any CVS branches, yourself. It is advisable to specify a named remote via
|
||||||
-r to separate and protect the incoming branches.
|
-r to separate and protect the incoming branches.
|
||||||
|
|
||||||
|
If you intend to set up a shared public repository that all developers can
|
||||||
|
read/write, or if you want to use linkgit:git-cvsserver[1], then you
|
||||||
|
probably want to make a bare clone of the imported repository,
|
||||||
|
and use the clone as the shared repository.
|
||||||
|
See linkgit:gitcvs-migration[7].
|
||||||
|
|
||||||
|
|
||||||
OPTIONS
|
OPTIONS
|
||||||
-------
|
-------
|
||||||
|
@ -133,6 +133,9 @@ write access to the log file and to the database (see
|
|||||||
<<dbbackend,Database Backend>>. If you want to offer write access over
|
<<dbbackend,Database Backend>>. If you want to offer write access over
|
||||||
SSH, the users of course also need write access to the git repository itself.
|
SSH, the users of course also need write access to the git repository itself.
|
||||||
|
|
||||||
|
You also need to ensure that each repository is "bare" (without a git index
|
||||||
|
file) for `cvs commit` to work. See linkgit:gitcvs-migration[7].
|
||||||
|
|
||||||
[[configaccessmethod]]
|
[[configaccessmethod]]
|
||||||
All configuration variables can also be overridden for a specific method of
|
All configuration variables can also be overridden for a specific method of
|
||||||
access. Valid method names are "ext" (for SSH access) and "pserver". The
|
access. Valid method names are "ext" (for SSH access) and "pserver". The
|
||||||
|
@ -450,6 +450,29 @@ String::
|
|||||||
variable.
|
variable.
|
||||||
|
|
||||||
|
|
||||||
|
Creating an archive
|
||||||
|
~~~~~~~~~~~~~~~~~~~
|
||||||
|
|
||||||
|
`export-ignore`
|
||||||
|
^^^^^^^^^^^^^^^
|
||||||
|
|
||||||
|
Files and directories with the attribute `export-ignore` won't be added to
|
||||||
|
archive files.
|
||||||
|
|
||||||
|
`export-subst`
|
||||||
|
^^^^^^^^^^^^^^
|
||||||
|
|
||||||
|
If the attribute `export-subst` is set for a file then git will expand
|
||||||
|
several placeholders when adding this file to an archive. The
|
||||||
|
expansion depends on the availability of a commit ID, i.e., if
|
||||||
|
linkgit:git-archive[1] has been given a tree instead of a commit or a
|
||||||
|
tag then no replacement will be done. The placeholders are the same
|
||||||
|
as those for the option `--pretty=format:` of linkgit:git-log[1],
|
||||||
|
except that they need to be wrapped like this: `$Format:PLACEHOLDERS$`
|
||||||
|
in the file. E.g. the string `$Format:%H$` will be replaced by the
|
||||||
|
commit hash.
|
||||||
|
|
||||||
|
|
||||||
EXAMPLE
|
EXAMPLE
|
||||||
-------
|
-------
|
||||||
|
|
||||||
@ -499,28 +522,6 @@ frotz unspecified
|
|||||||
----------------------------------------------------------------
|
----------------------------------------------------------------
|
||||||
|
|
||||||
|
|
||||||
Creating an archive
|
|
||||||
~~~~~~~~~~~~~~~~~~~
|
|
||||||
|
|
||||||
`export-ignore`
|
|
||||||
^^^^^^^^^^^^^^^
|
|
||||||
|
|
||||||
Files and directories with the attribute `export-ignore` won't be added to
|
|
||||||
archive files.
|
|
||||||
|
|
||||||
`export-subst`
|
|
||||||
^^^^^^^^^^^^^^
|
|
||||||
|
|
||||||
If the attribute `export-subst` is set for a file then git will expand
|
|
||||||
several placeholders when adding this file to an archive. The
|
|
||||||
expansion depends on the availability of a commit ID, i.e., if
|
|
||||||
'git-archive' has been given a tree instead of a commit or a
|
|
||||||
tag then no replacement will be done. The placeholders are the same
|
|
||||||
as those for the option `--pretty=format:` of linkgit:git-log[1],
|
|
||||||
except that they need to be wrapped like this: `$Format:PLACEHOLDERS$`
|
|
||||||
in the file. E.g. the string `$Format:%H$` will be replaced by the
|
|
||||||
commit hash.
|
|
||||||
|
|
||||||
|
|
||||||
GIT
|
GIT
|
||||||
---
|
---
|
||||||
|
@ -143,6 +143,11 @@ work, you must not modify the imported branches; instead, create new
|
|||||||
branches for your own changes, and merge in the imported branches as
|
branches for your own changes, and merge in the imported branches as
|
||||||
necessary.
|
necessary.
|
||||||
|
|
||||||
|
If you want a shared repository, you will need to make a bare clone
|
||||||
|
of the imported directory, as described above. Then treat the imported
|
||||||
|
directory as another development clone for purposes of merging
|
||||||
|
incremental imports.
|
||||||
|
|
||||||
Advanced Shared Repository Management
|
Advanced Shared Repository Management
|
||||||
-------------------------------------
|
-------------------------------------
|
||||||
|
|
||||||
|
@ -30,7 +30,7 @@ This is designed to be as compact as possible.
|
|||||||
|
|
||||||
commit <sha1>
|
commit <sha1>
|
||||||
Author: <author>
|
Author: <author>
|
||||||
Date: <date>
|
Date: <author date>
|
||||||
|
|
||||||
<title line>
|
<title line>
|
||||||
|
|
||||||
@ -50,9 +50,9 @@ This is designed to be as compact as possible.
|
|||||||
|
|
||||||
commit <sha1>
|
commit <sha1>
|
||||||
Author: <author>
|
Author: <author>
|
||||||
AuthorDate: <date & time>
|
AuthorDate: <author date>
|
||||||
Commit: <committer>
|
Commit: <committer>
|
||||||
CommitDate: <date & time>
|
CommitDate: <committer date>
|
||||||
|
|
||||||
<title line>
|
<title line>
|
||||||
|
|
||||||
@ -62,7 +62,7 @@ This is designed to be as compact as possible.
|
|||||||
|
|
||||||
From <sha1> <date>
|
From <sha1> <date>
|
||||||
From: <author>
|
From: <author>
|
||||||
Date: <date & time>
|
Date: <author date>
|
||||||
Subject: [PATCH] <title line>
|
Subject: [PATCH] <title line>
|
||||||
|
|
||||||
<full commit message>
|
<full commit message>
|
||||||
|
@ -45,7 +45,8 @@ static enum {
|
|||||||
COMMIT_PARTIAL,
|
COMMIT_PARTIAL,
|
||||||
} commit_style;
|
} commit_style;
|
||||||
|
|
||||||
static char *logfile, *force_author, *template_file;
|
static char *logfile, *force_author;
|
||||||
|
static const char *template_file;
|
||||||
static char *edit_message, *use_message;
|
static char *edit_message, *use_message;
|
||||||
static char *author_name, *author_email, *author_date;
|
static char *author_name, *author_email, *author_date;
|
||||||
static int all, edit_flag, also, interactive, only, amend, signoff;
|
static int all, edit_flag, also, interactive, only, amend, signoff;
|
||||||
@ -877,12 +878,8 @@ static void print_summary(const char *prefix, const unsigned char *sha1)
|
|||||||
|
|
||||||
int git_commit_config(const char *k, const char *v, void *cb)
|
int git_commit_config(const char *k, const char *v, void *cb)
|
||||||
{
|
{
|
||||||
if (!strcmp(k, "commit.template")) {
|
if (!strcmp(k, "commit.template"))
|
||||||
if (!v)
|
return git_config_string(&template_file, k, v);
|
||||||
return config_error_nonbool(v);
|
|
||||||
template_file = xstrdup(v);
|
|
||||||
return 0;
|
|
||||||
}
|
|
||||||
|
|
||||||
return git_status_config(k, v, cb);
|
return git_status_config(k, v, cb);
|
||||||
}
|
}
|
||||||
|
@ -234,12 +234,8 @@ static int git_log_config(const char *var, const char *value, void *cb)
|
|||||||
{
|
{
|
||||||
if (!strcmp(var, "format.pretty"))
|
if (!strcmp(var, "format.pretty"))
|
||||||
return git_config_string(&fmt_pretty, var, value);
|
return git_config_string(&fmt_pretty, var, value);
|
||||||
if (!strcmp(var, "format.subjectprefix")) {
|
if (!strcmp(var, "format.subjectprefix"))
|
||||||
if (!value)
|
return git_config_string(&fmt_patch_subject_prefix, var, value);
|
||||||
config_error_nonbool(var);
|
|
||||||
fmt_patch_subject_prefix = xstrdup(value);
|
|
||||||
return 0;
|
|
||||||
}
|
|
||||||
if (!strcmp(var, "log.date"))
|
if (!strcmp(var, "log.date"))
|
||||||
return git_config_string(&default_date_mode, var, value);
|
return git_config_string(&default_date_mode, var, value);
|
||||||
if (!strcmp(var, "log.showroot")) {
|
if (!strcmp(var, "log.showroot")) {
|
||||||
@ -489,12 +485,8 @@ static int git_format_config(const char *var, const char *value, void *cb)
|
|||||||
add_header(value);
|
add_header(value);
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
if (!strcmp(var, "format.suffix")) {
|
if (!strcmp(var, "format.suffix"))
|
||||||
if (!value)
|
return git_config_string(&fmt_patch_suffix, var, value);
|
||||||
return config_error_nonbool(var);
|
|
||||||
fmt_patch_suffix = xstrdup(value);
|
|
||||||
return 0;
|
|
||||||
}
|
|
||||||
if (!strcmp(var, "format.cc")) {
|
if (!strcmp(var, "format.cc")) {
|
||||||
if (!value)
|
if (!value)
|
||||||
return config_error_nonbool(var);
|
return config_error_nonbool(var);
|
||||||
|
25
convert.c
25
convert.c
@ -319,8 +319,8 @@ static int apply_filter(const char *path, const char *src, size_t len,
|
|||||||
static struct convert_driver {
|
static struct convert_driver {
|
||||||
const char *name;
|
const char *name;
|
||||||
struct convert_driver *next;
|
struct convert_driver *next;
|
||||||
char *smudge;
|
const char *smudge;
|
||||||
char *clean;
|
const char *clean;
|
||||||
} *user_convert, **user_convert_tail;
|
} *user_convert, **user_convert_tail;
|
||||||
|
|
||||||
static int read_convert_config(const char *var, const char *value, void *cb)
|
static int read_convert_config(const char *var, const char *value, void *cb)
|
||||||
@ -358,19 +358,12 @@ static int read_convert_config(const char *var, const char *value, void *cb)
|
|||||||
* The command-line will not be interpolated in any way.
|
* The command-line will not be interpolated in any way.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
if (!strcmp("smudge", ep)) {
|
if (!strcmp("smudge", ep))
|
||||||
if (!value)
|
return git_config_string(&drv->smudge, var, value);
|
||||||
return config_error_nonbool(var);
|
|
||||||
drv->smudge = strdup(value);
|
if (!strcmp("clean", ep))
|
||||||
return 0;
|
return git_config_string(&drv->clean, var, value);
|
||||||
}
|
|
||||||
|
|
||||||
if (!strcmp("clean", ep)) {
|
|
||||||
if (!value)
|
|
||||||
return config_error_nonbool(var);
|
|
||||||
drv->clean = strdup(value);
|
|
||||||
return 0;
|
|
||||||
}
|
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -576,7 +569,7 @@ int convert_to_git(const char *path, const char *src, size_t len,
|
|||||||
struct git_attr_check check[3];
|
struct git_attr_check check[3];
|
||||||
int crlf = CRLF_GUESS;
|
int crlf = CRLF_GUESS;
|
||||||
int ident = 0, ret = 0;
|
int ident = 0, ret = 0;
|
||||||
char *filter = NULL;
|
const char *filter = NULL;
|
||||||
|
|
||||||
setup_convert_check(check);
|
setup_convert_check(check);
|
||||||
if (!git_checkattr(path, ARRAY_SIZE(check), check)) {
|
if (!git_checkattr(path, ARRAY_SIZE(check), check)) {
|
||||||
@ -606,7 +599,7 @@ int convert_to_working_tree(const char *path, const char *src, size_t len, struc
|
|||||||
struct git_attr_check check[3];
|
struct git_attr_check check[3];
|
||||||
int crlf = CRLF_GUESS;
|
int crlf = CRLF_GUESS;
|
||||||
int ident = 0, ret = 0;
|
int ident = 0, ret = 0;
|
||||||
char *filter = NULL;
|
const char *filter = NULL;
|
||||||
|
|
||||||
setup_convert_check(check);
|
setup_convert_check(check);
|
||||||
if (!git_checkattr(path, ARRAY_SIZE(check), check)) {
|
if (!git_checkattr(path, ARRAY_SIZE(check), check)) {
|
||||||
|
8
diff.c
8
diff.c
@ -153,12 +153,8 @@ int git_diff_ui_config(const char *var, const char *value, void *cb)
|
|||||||
diff_auto_refresh_index = git_config_bool(var, value);
|
diff_auto_refresh_index = git_config_bool(var, value);
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
if (!strcmp(var, "diff.external")) {
|
if (!strcmp(var, "diff.external"))
|
||||||
if (!value)
|
return git_config_string(&external_diff_cmd_cfg, var, value);
|
||||||
return config_error_nonbool(var);
|
|
||||||
external_diff_cmd_cfg = xstrdup(value);
|
|
||||||
return 0;
|
|
||||||
}
|
|
||||||
if (!prefixcmp(var, "diff.")) {
|
if (!prefixcmp(var, "diff.")) {
|
||||||
const char *ep = strrchr(var, '.');
|
const char *ep = strrchr(var, '.');
|
||||||
|
|
||||||
|
36
http.c
36
http.c
@ -13,14 +13,14 @@ static CURL *curl_default;
|
|||||||
char curl_errorstr[CURL_ERROR_SIZE];
|
char curl_errorstr[CURL_ERROR_SIZE];
|
||||||
|
|
||||||
static int curl_ssl_verify = -1;
|
static int curl_ssl_verify = -1;
|
||||||
static char *ssl_cert = NULL;
|
static const char *ssl_cert = NULL;
|
||||||
#if LIBCURL_VERSION_NUM >= 0x070902
|
#if LIBCURL_VERSION_NUM >= 0x070902
|
||||||
static char *ssl_key = NULL;
|
static const char *ssl_key = NULL;
|
||||||
#endif
|
#endif
|
||||||
#if LIBCURL_VERSION_NUM >= 0x070908
|
#if LIBCURL_VERSION_NUM >= 0x070908
|
||||||
static char *ssl_capath = NULL;
|
static const char *ssl_capath = NULL;
|
||||||
#endif
|
#endif
|
||||||
static char *ssl_cainfo = NULL;
|
static const char *ssl_cainfo = NULL;
|
||||||
static long curl_low_speed_limit = -1;
|
static long curl_low_speed_limit = -1;
|
||||||
static long curl_low_speed_time = -1;
|
static long curl_low_speed_time = -1;
|
||||||
static int curl_ftp_no_epsv = 0;
|
static int curl_ftp_no_epsv = 0;
|
||||||
@ -101,39 +101,27 @@ static int http_options(const char *var, const char *value, void *cb)
|
|||||||
}
|
}
|
||||||
|
|
||||||
if (!strcmp("http.sslcert", var)) {
|
if (!strcmp("http.sslcert", var)) {
|
||||||
if (ssl_cert == NULL) {
|
if (ssl_cert == NULL)
|
||||||
if (!value)
|
return git_config_string(&ssl_cert, var, value);
|
||||||
return config_error_nonbool(var);
|
|
||||||
ssl_cert = xstrdup(value);
|
|
||||||
}
|
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
#if LIBCURL_VERSION_NUM >= 0x070902
|
#if LIBCURL_VERSION_NUM >= 0x070902
|
||||||
if (!strcmp("http.sslkey", var)) {
|
if (!strcmp("http.sslkey", var)) {
|
||||||
if (ssl_key == NULL) {
|
if (ssl_key == NULL)
|
||||||
if (!value)
|
return git_config_string(&ssl_key, var, value);
|
||||||
return config_error_nonbool(var);
|
|
||||||
ssl_key = xstrdup(value);
|
|
||||||
}
|
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
#if LIBCURL_VERSION_NUM >= 0x070908
|
#if LIBCURL_VERSION_NUM >= 0x070908
|
||||||
if (!strcmp("http.sslcapath", var)) {
|
if (!strcmp("http.sslcapath", var)) {
|
||||||
if (ssl_capath == NULL) {
|
if (ssl_capath == NULL)
|
||||||
if (!value)
|
return git_config_string(&ssl_capath, var, value);
|
||||||
return config_error_nonbool(var);
|
|
||||||
ssl_capath = xstrdup(value);
|
|
||||||
}
|
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
if (!strcmp("http.sslcainfo", var)) {
|
if (!strcmp("http.sslcainfo", var)) {
|
||||||
if (ssl_cainfo == NULL) {
|
if (ssl_cainfo == NULL)
|
||||||
if (!value)
|
return git_config_string(&ssl_cainfo, var, value);
|
||||||
return config_error_nonbool(var);
|
|
||||||
ssl_cainfo = xstrdup(value);
|
|
||||||
}
|
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -645,7 +645,9 @@ static int fetch_refs_via_pack(struct transport *transport,
|
|||||||
args.lock_pack = 1;
|
args.lock_pack = 1;
|
||||||
args.use_thin_pack = data->thin;
|
args.use_thin_pack = data->thin;
|
||||||
args.include_tag = data->followtags;
|
args.include_tag = data->followtags;
|
||||||
args.verbose = transport->verbose > 0;
|
args.verbose = (transport->verbose > 0);
|
||||||
|
args.quiet = args.no_progress = (transport->verbose < 0);
|
||||||
|
args.no_progress = !isatty(1);
|
||||||
args.depth = data->depth;
|
args.depth = data->depth;
|
||||||
|
|
||||||
for (i = 0; i < nr_heads; i++)
|
for (i = 0; i < nr_heads; i++)
|
||||||
|
Loading…
x
Reference in New Issue
Block a user