Sync with 1.5.6.5
This commit is contained in:
commit
f44bc33c72
@ -6,6 +6,9 @@ Fixes since v1.5.6.4
|
|||||||
|
|
||||||
* "git cvsimport" used to spit out "UNKNOWN LINE..." diagnostics to stdout.
|
* "git cvsimport" used to spit out "UNKNOWN LINE..." diagnostics to stdout.
|
||||||
|
|
||||||
|
* "git commit -F filename" and "git tag -F filename" run from subdirectories
|
||||||
|
did not read the right file.
|
||||||
|
|
||||||
* "git init --template=" with blank "template" parameter linked files
|
* "git init --template=" with blank "template" parameter linked files
|
||||||
under root directories to .git, which was a total nonsense. Instead, it
|
under root directories to .git, which was a total nonsense. Instead, it
|
||||||
means "I do not want to use anything from the template directory".
|
means "I do not want to use anything from the template directory".
|
||||||
@ -24,9 +27,3 @@ Fixes since v1.5.6.4
|
|||||||
header properly.
|
header properly.
|
||||||
|
|
||||||
Contains other various documentation fixes.
|
Contains other various documentation fixes.
|
||||||
|
|
||||||
--
|
|
||||||
exec >/var/tmp/1
|
|
||||||
echo O=$(git describe maint)
|
|
||||||
O=v1.5.6.4-26-g2b6ca6d
|
|
||||||
git shortlog --no-merges $O..maint
|
|
||||||
|
@ -49,13 +49,13 @@ include::diff-options.txt[]
|
|||||||
--stdin::
|
--stdin::
|
||||||
When '--stdin' is specified, the command does not take
|
When '--stdin' is specified, the command does not take
|
||||||
<tree-ish> arguments from the command line. Instead, it
|
<tree-ish> arguments from the command line. Instead, it
|
||||||
reads either one <commit> or a pair of <tree-ish>
|
reads either one <commit> or a list of <commit>
|
||||||
separated with a single space from its standard input.
|
separated with a single space from its standard input.
|
||||||
+
|
+
|
||||||
When a single commit is given on one line of such input, it compares
|
When a single commit is given on one line of such input, it compares
|
||||||
the commit with its parents. The following flags further affects its
|
the commit with its parents. The following flags further affects its
|
||||||
behavior. This does not apply to the case where two <tree-ish>
|
behavior. The remaining commits, when given, are used as if they are
|
||||||
separated with a single space are given.
|
parents of the first commit.
|
||||||
|
|
||||||
-m::
|
-m::
|
||||||
By default, 'git-diff-tree --stdin' does not show
|
By default, 'git-diff-tree --stdin' does not show
|
||||||
|
@ -43,9 +43,10 @@ unreleased) version of git, that is available from 'master'
|
|||||||
branch of the `git.git` repository.
|
branch of the `git.git` repository.
|
||||||
Documentation for older releases are available here:
|
Documentation for older releases are available here:
|
||||||
|
|
||||||
* link:v1.5.6.4/git.html[documentation for release 1.5.6.4]
|
* link:v1.5.6.5/git.html[documentation for release 1.5.6.5]
|
||||||
|
|
||||||
* release notes for
|
* release notes for
|
||||||
|
link:RelNotes-1.5.6.5.txt[1.5.6.5],
|
||||||
link:RelNotes-1.5.6.4.txt[1.5.6.4],
|
link:RelNotes-1.5.6.4.txt[1.5.6.4],
|
||||||
link:RelNotes-1.5.6.3.txt[1.5.6.3],
|
link:RelNotes-1.5.6.3.txt[1.5.6.3],
|
||||||
link:RelNotes-1.5.6.2.txt[1.5.6.2],
|
link:RelNotes-1.5.6.2.txt[1.5.6.2],
|
||||||
|
@ -46,7 +46,7 @@ static enum {
|
|||||||
COMMIT_PARTIAL,
|
COMMIT_PARTIAL,
|
||||||
} commit_style;
|
} commit_style;
|
||||||
|
|
||||||
static char *logfile, *force_author;
|
static const char *logfile, *force_author;
|
||||||
static const char *template_file;
|
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;
|
||||||
@ -711,11 +711,14 @@ static int message_is_empty(struct strbuf *sb, int start)
|
|||||||
}
|
}
|
||||||
|
|
||||||
static int parse_and_validate_options(int argc, const char *argv[],
|
static int parse_and_validate_options(int argc, const char *argv[],
|
||||||
const char * const usage[])
|
const char * const usage[],
|
||||||
|
const char *prefix)
|
||||||
{
|
{
|
||||||
int f = 0;
|
int f = 0;
|
||||||
|
|
||||||
argc = parse_options(argc, argv, builtin_commit_options, usage, 0);
|
argc = parse_options(argc, argv, builtin_commit_options, usage, 0);
|
||||||
|
logfile = parse_options_fix_filename(prefix, logfile);
|
||||||
|
template_file = parse_options_fix_filename(prefix, template_file);
|
||||||
|
|
||||||
if (logfile || message.len || use_message)
|
if (logfile || message.len || use_message)
|
||||||
use_editor = 0;
|
use_editor = 0;
|
||||||
@ -836,7 +839,7 @@ int cmd_status(int argc, const char **argv, const char *prefix)
|
|||||||
if (wt_status_use_color == -1)
|
if (wt_status_use_color == -1)
|
||||||
wt_status_use_color = git_use_color_default;
|
wt_status_use_color = git_use_color_default;
|
||||||
|
|
||||||
argc = parse_and_validate_options(argc, argv, builtin_status_usage);
|
argc = parse_and_validate_options(argc, argv, builtin_status_usage, prefix);
|
||||||
|
|
||||||
index_file = prepare_index(argc, argv, prefix);
|
index_file = prepare_index(argc, argv, prefix);
|
||||||
|
|
||||||
@ -929,7 +932,7 @@ int cmd_commit(int argc, const char **argv, const char *prefix)
|
|||||||
|
|
||||||
git_config(git_commit_config, NULL);
|
git_config(git_commit_config, NULL);
|
||||||
|
|
||||||
argc = parse_and_validate_options(argc, argv, builtin_commit_usage);
|
argc = parse_and_validate_options(argc, argv, builtin_commit_usage, prefix);
|
||||||
|
|
||||||
index_file = prepare_index(argc, argv, prefix);
|
index_file = prepare_index(argc, argv, prefix);
|
||||||
|
|
||||||
|
@ -346,7 +346,7 @@ int cmd_tag(int argc, const char **argv, const char *prefix)
|
|||||||
|
|
||||||
int annotate = 0, sign = 0, force = 0, lines = 0,
|
int annotate = 0, sign = 0, force = 0, lines = 0,
|
||||||
list = 0, delete = 0, verify = 0;
|
list = 0, delete = 0, verify = 0;
|
||||||
char *msgfile = NULL, *keyid = NULL;
|
const char *msgfile = NULL, *keyid = NULL;
|
||||||
struct msg_arg msg = { 0, STRBUF_INIT };
|
struct msg_arg msg = { 0, STRBUF_INIT };
|
||||||
struct option options[] = {
|
struct option options[] = {
|
||||||
OPT_BOOLEAN('l', NULL, &list, "list tag names"),
|
OPT_BOOLEAN('l', NULL, &list, "list tag names"),
|
||||||
@ -372,6 +372,7 @@ int cmd_tag(int argc, const char **argv, const char *prefix)
|
|||||||
git_config(git_tag_config, NULL);
|
git_config(git_tag_config, NULL);
|
||||||
|
|
||||||
argc = parse_options(argc, argv, options, git_tag_usage, 0);
|
argc = parse_options(argc, argv, options, git_tag_usage, 0);
|
||||||
|
msgfile = parse_options_fix_filename(prefix, msgfile);
|
||||||
|
|
||||||
if (keyid) {
|
if (keyid) {
|
||||||
sign = 1;
|
sign = 1;
|
||||||
|
@ -483,3 +483,15 @@ int parse_opt_approxidate_cb(const struct option *opt, const char *arg,
|
|||||||
*(unsigned long *)(opt->value) = approxidate(arg);
|
*(unsigned long *)(opt->value) = approxidate(arg);
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/*
|
||||||
|
* This should really be OPTION_FILENAME type as a part of
|
||||||
|
* parse_options that take prefix to do this while parsing.
|
||||||
|
*/
|
||||||
|
extern const char *parse_options_fix_filename(const char *prefix, const char *file)
|
||||||
|
{
|
||||||
|
if (!file || !prefix || is_absolute_path(file) || !strcmp("-", file))
|
||||||
|
return file;
|
||||||
|
return prefix_filename(prefix, strlen(prefix), file);
|
||||||
|
}
|
||||||
|
|
||||||
|
@ -159,4 +159,6 @@ extern int parse_opt_approxidate_cb(const struct option *, const char *, int);
|
|||||||
"use <n> digits to display SHA-1s", \
|
"use <n> digits to display SHA-1s", \
|
||||||
PARSE_OPT_OPTARG, &parse_opt_abbrev_cb, 0 }
|
PARSE_OPT_OPTARG, &parse_opt_abbrev_cb, 0 }
|
||||||
|
|
||||||
|
extern const char *parse_options_fix_filename(const char *prefix, const char *file);
|
||||||
|
|
||||||
#endif
|
#endif
|
||||||
|
@ -1070,4 +1070,24 @@ test_expect_success \
|
|||||||
test_cmp expect actual
|
test_cmp expect actual
|
||||||
'
|
'
|
||||||
|
|
||||||
|
test_expect_success 'filename for the message is relative to cwd' '
|
||||||
|
mkdir subdir &&
|
||||||
|
echo "Tag message in top directory" >msgfile-5 &&
|
||||||
|
echo "Tag message in sub directory" >subdir/msgfile-5 &&
|
||||||
|
(
|
||||||
|
cd subdir &&
|
||||||
|
git tag -a -F msgfile-5 tag-from-subdir
|
||||||
|
) &&
|
||||||
|
git cat-file tag tag-from-subdir | grep "in sub directory"
|
||||||
|
'
|
||||||
|
|
||||||
|
test_expect_success 'filename for the message is relative to cwd' '
|
||||||
|
echo "Tag message in sub directory" >subdir/msgfile-6 &&
|
||||||
|
(
|
||||||
|
cd subdir &&
|
||||||
|
git tag -a -F msgfile-6 tag-from-subdir-2
|
||||||
|
) &&
|
||||||
|
git cat-file tag tag-from-subdir-2 | grep "in sub directory"
|
||||||
|
'
|
||||||
|
|
||||||
test_done
|
test_done
|
||||||
|
@ -138,4 +138,33 @@ test_expect_success '--signoff' '
|
|||||||
diff expect output
|
diff expect output
|
||||||
'
|
'
|
||||||
|
|
||||||
|
test_expect_success 'commit message from file (1)' '
|
||||||
|
mkdir subdir &&
|
||||||
|
echo "Log in top directory" >log &&
|
||||||
|
echo "Log in sub directory" >subdir/log &&
|
||||||
|
(
|
||||||
|
cd subdir &&
|
||||||
|
git commit --allow-empty -F log
|
||||||
|
) &&
|
||||||
|
commit_msg_is "Log in sub directory"
|
||||||
|
'
|
||||||
|
|
||||||
|
test_expect_success 'commit message from file (2)' '
|
||||||
|
rm -f log &&
|
||||||
|
echo "Log in sub directory" >subdir/log &&
|
||||||
|
(
|
||||||
|
cd subdir &&
|
||||||
|
git commit --allow-empty -F log
|
||||||
|
) &&
|
||||||
|
commit_msg_is "Log in sub directory"
|
||||||
|
'
|
||||||
|
|
||||||
|
test_expect_success 'commit message from stdin' '
|
||||||
|
(
|
||||||
|
cd subdir &&
|
||||||
|
echo "Log with foo word" | git commit --allow-empty -F -
|
||||||
|
) &&
|
||||||
|
commit_msg_is "Log with foo word"
|
||||||
|
'
|
||||||
|
|
||||||
test_done
|
test_done
|
||||||
|
Loading…
Reference in New Issue
Block a user