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
|
||||
-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
|
||||
-------
|
||||
|
@ -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
|
||||
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]]
|
||||
All configuration variables can also be overridden for a specific method of
|
||||
access. Valid method names are "ext" (for SSH access) and "pserver". The
|
||||
|
@ -450,6 +450,29 @@ String::
|
||||
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
|
||||
-------
|
||||
|
||||
@ -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
|
||||
---
|
||||
|
@ -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
|
||||
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
|
||||
-------------------------------------
|
||||
|
||||
|
@ -30,7 +30,7 @@ This is designed to be as compact as possible.
|
||||
|
||||
commit <sha1>
|
||||
Author: <author>
|
||||
Date: <date>
|
||||
Date: <author date>
|
||||
|
||||
<title line>
|
||||
|
||||
@ -50,9 +50,9 @@ This is designed to be as compact as possible.
|
||||
|
||||
commit <sha1>
|
||||
Author: <author>
|
||||
AuthorDate: <date & time>
|
||||
AuthorDate: <author date>
|
||||
Commit: <committer>
|
||||
CommitDate: <date & time>
|
||||
CommitDate: <committer date>
|
||||
|
||||
<title line>
|
||||
|
||||
@ -62,7 +62,7 @@ This is designed to be as compact as possible.
|
||||
|
||||
From <sha1> <date>
|
||||
From: <author>
|
||||
Date: <date & time>
|
||||
Date: <author date>
|
||||
Subject: [PATCH] <title line>
|
||||
|
||||
<full commit message>
|
||||
|
@ -45,7 +45,8 @@ static enum {
|
||||
COMMIT_PARTIAL,
|
||||
} 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 *author_name, *author_email, *author_date;
|
||||
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)
|
||||
{
|
||||
if (!strcmp(k, "commit.template")) {
|
||||
if (!v)
|
||||
return config_error_nonbool(v);
|
||||
template_file = xstrdup(v);
|
||||
return 0;
|
||||
}
|
||||
if (!strcmp(k, "commit.template"))
|
||||
return git_config_string(&template_file, k, v);
|
||||
|
||||
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"))
|
||||
return git_config_string(&fmt_pretty, var, value);
|
||||
if (!strcmp(var, "format.subjectprefix")) {
|
||||
if (!value)
|
||||
config_error_nonbool(var);
|
||||
fmt_patch_subject_prefix = xstrdup(value);
|
||||
return 0;
|
||||
}
|
||||
if (!strcmp(var, "format.subjectprefix"))
|
||||
return git_config_string(&fmt_patch_subject_prefix, var, value);
|
||||
if (!strcmp(var, "log.date"))
|
||||
return git_config_string(&default_date_mode, var, value);
|
||||
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);
|
||||
return 0;
|
||||
}
|
||||
if (!strcmp(var, "format.suffix")) {
|
||||
if (!value)
|
||||
return config_error_nonbool(var);
|
||||
fmt_patch_suffix = xstrdup(value);
|
||||
return 0;
|
||||
}
|
||||
if (!strcmp(var, "format.suffix"))
|
||||
return git_config_string(&fmt_patch_suffix, var, value);
|
||||
if (!strcmp(var, "format.cc")) {
|
||||
if (!value)
|
||||
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 {
|
||||
const char *name;
|
||||
struct convert_driver *next;
|
||||
char *smudge;
|
||||
char *clean;
|
||||
const char *smudge;
|
||||
const char *clean;
|
||||
} *user_convert, **user_convert_tail;
|
||||
|
||||
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.
|
||||
*/
|
||||
|
||||
if (!strcmp("smudge", ep)) {
|
||||
if (!value)
|
||||
return config_error_nonbool(var);
|
||||
drv->smudge = strdup(value);
|
||||
return 0;
|
||||
}
|
||||
if (!strcmp("smudge", ep))
|
||||
return git_config_string(&drv->smudge, var, value);
|
||||
|
||||
if (!strcmp("clean", ep))
|
||||
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;
|
||||
}
|
||||
|
||||
@ -576,7 +569,7 @@ int convert_to_git(const char *path, const char *src, size_t len,
|
||||
struct git_attr_check check[3];
|
||||
int crlf = CRLF_GUESS;
|
||||
int ident = 0, ret = 0;
|
||||
char *filter = NULL;
|
||||
const char *filter = NULL;
|
||||
|
||||
setup_convert_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];
|
||||
int crlf = CRLF_GUESS;
|
||||
int ident = 0, ret = 0;
|
||||
char *filter = NULL;
|
||||
const char *filter = NULL;
|
||||
|
||||
setup_convert_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);
|
||||
return 0;
|
||||
}
|
||||
if (!strcmp(var, "diff.external")) {
|
||||
if (!value)
|
||||
return config_error_nonbool(var);
|
||||
external_diff_cmd_cfg = xstrdup(value);
|
||||
return 0;
|
||||
}
|
||||
if (!strcmp(var, "diff.external"))
|
||||
return git_config_string(&external_diff_cmd_cfg, var, value);
|
||||
if (!prefixcmp(var, "diff.")) {
|
||||
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];
|
||||
|
||||
static int curl_ssl_verify = -1;
|
||||
static char *ssl_cert = NULL;
|
||||
static const char *ssl_cert = NULL;
|
||||
#if LIBCURL_VERSION_NUM >= 0x070902
|
||||
static char *ssl_key = NULL;
|
||||
static const char *ssl_key = NULL;
|
||||
#endif
|
||||
#if LIBCURL_VERSION_NUM >= 0x070908
|
||||
static char *ssl_capath = NULL;
|
||||
static const char *ssl_capath = NULL;
|
||||
#endif
|
||||
static char *ssl_cainfo = NULL;
|
||||
static const char *ssl_cainfo = NULL;
|
||||
static long curl_low_speed_limit = -1;
|
||||
static long curl_low_speed_time = -1;
|
||||
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 (ssl_cert == NULL) {
|
||||
if (!value)
|
||||
return config_error_nonbool(var);
|
||||
ssl_cert = xstrdup(value);
|
||||
}
|
||||
if (ssl_cert == NULL)
|
||||
return git_config_string(&ssl_cert, var, value);
|
||||
return 0;
|
||||
}
|
||||
#if LIBCURL_VERSION_NUM >= 0x070902
|
||||
if (!strcmp("http.sslkey", var)) {
|
||||
if (ssl_key == NULL) {
|
||||
if (!value)
|
||||
return config_error_nonbool(var);
|
||||
ssl_key = xstrdup(value);
|
||||
}
|
||||
if (ssl_key == NULL)
|
||||
return git_config_string(&ssl_key, var, value);
|
||||
return 0;
|
||||
}
|
||||
#endif
|
||||
#if LIBCURL_VERSION_NUM >= 0x070908
|
||||
if (!strcmp("http.sslcapath", var)) {
|
||||
if (ssl_capath == NULL) {
|
||||
if (!value)
|
||||
return config_error_nonbool(var);
|
||||
ssl_capath = xstrdup(value);
|
||||
}
|
||||
if (ssl_capath == NULL)
|
||||
return git_config_string(&ssl_capath, var, value);
|
||||
return 0;
|
||||
}
|
||||
#endif
|
||||
if (!strcmp("http.sslcainfo", var)) {
|
||||
if (ssl_cainfo == NULL) {
|
||||
if (!value)
|
||||
return config_error_nonbool(var);
|
||||
ssl_cainfo = xstrdup(value);
|
||||
}
|
||||
if (ssl_cainfo == NULL)
|
||||
return git_config_string(&ssl_cainfo, var, value);
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
@ -645,7 +645,9 @@ static int fetch_refs_via_pack(struct transport *transport,
|
||||
args.lock_pack = 1;
|
||||
args.use_thin_pack = data->thin;
|
||||
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;
|
||||
|
||||
for (i = 0; i < nr_heads; i++)
|
||||
|
Loading…
Reference in New Issue
Block a user