mirror of
https://github.com/git/git.git
synced 2026-04-01 20:40:08 +02:00
Merge branch 'master' of git://repo.or.cz/alt-git
This commit is contained in:
1
Makefile
1
Makefile
@@ -734,6 +734,7 @@ ifeq ($(uname_S),SunOS)
|
||||
NO_MKSTEMPS = YesPlease
|
||||
NO_REGEX = YesPlease
|
||||
NO_EXTERNAL_GREP = YesPlease
|
||||
THREADED_DELTA_SEARCH = YesPlease
|
||||
ifeq ($(uname_R),5.7)
|
||||
NEEDS_RESOLV = YesPlease
|
||||
NO_IPV6 = YesPlease
|
||||
|
||||
2
README
2
README
@@ -37,7 +37,7 @@ CVS users may also want to read Documentation/gitcvs-migration.txt
|
||||
("man gitcvs-migration" or "git help cvs-migration" if git is
|
||||
installed).
|
||||
|
||||
Many Git online resources are accessible from http://git.or.cz/
|
||||
Many Git online resources are accessible from http://git-scm.com/
|
||||
including full documentation and Git related tools.
|
||||
|
||||
The user discussion and development of Git take place on the Git
|
||||
|
||||
@@ -565,7 +565,15 @@ static int git_show_branch_config(const char *var, const char *value, void *cb)
|
||||
if (!strcmp(var, "showbranch.default")) {
|
||||
if (!value)
|
||||
return config_error_nonbool(var);
|
||||
if (default_alloc <= default_num + 1) {
|
||||
/*
|
||||
* default_arg is now passed to parse_options(), so we need to
|
||||
* mimick the real argv a bit better.
|
||||
*/
|
||||
if (!default_num) {
|
||||
default_alloc = 20;
|
||||
default_arg = xcalloc(default_alloc, sizeof(*default_arg));
|
||||
default_arg[default_num++] = "show-branch";
|
||||
} else if (default_alloc <= default_num + 1) {
|
||||
default_alloc = default_alloc * 3 / 2 + 20;
|
||||
default_arg = xrealloc(default_arg, sizeof *default_arg * default_alloc);
|
||||
}
|
||||
@@ -692,8 +700,8 @@ int cmd_show_branch(int ac, const char **av, const char *prefix)
|
||||
|
||||
/* If nothing is specified, try the default first */
|
||||
if (ac == 1 && default_num) {
|
||||
ac = default_num + 1;
|
||||
av = default_arg - 1; /* ick; we would not address av[0] */
|
||||
ac = default_num;
|
||||
av = default_arg;
|
||||
}
|
||||
|
||||
ac = parse_options(ac, av, prefix, builtin_show_branch_options,
|
||||
|
||||
@@ -668,7 +668,7 @@ _git_am ()
|
||||
--3way --committer-date-is-author-date --ignore-date
|
||||
--ignore-whitespace --ignore-space-change
|
||||
--interactive --keep --no-utf8 --signoff --utf8
|
||||
--whitespace=
|
||||
--whitespace= --scissors
|
||||
"
|
||||
return
|
||||
esac
|
||||
@@ -894,6 +894,7 @@ _git_commit ()
|
||||
__gitcomp "
|
||||
--all --author= --signoff --verify --no-verify
|
||||
--edit --amend --include --only --interactive
|
||||
--dry-run
|
||||
"
|
||||
return
|
||||
esac
|
||||
@@ -926,6 +927,8 @@ __git_diff_common_options="--stat --numstat --shortstat --summary
|
||||
--inter-hunk-context=
|
||||
--patience
|
||||
--raw
|
||||
--dirstat --dirstat= --dirstat-by-file
|
||||
--dirstat-by-file= --cumulative
|
||||
"
|
||||
|
||||
_git_diff ()
|
||||
@@ -1179,6 +1182,10 @@ _git_log ()
|
||||
__gitcomp "$__git_log_date_formats" "" "${cur##--date=}"
|
||||
return
|
||||
;;
|
||||
--decorate=*)
|
||||
__gitcomp "long short" "" "${cur##--decorate=}"
|
||||
return
|
||||
;;
|
||||
--*)
|
||||
__gitcomp "
|
||||
$__git_log_common_options
|
||||
@@ -1191,7 +1198,7 @@ _git_log ()
|
||||
--pretty= --format= --oneline
|
||||
--cherry-pick
|
||||
--graph
|
||||
--decorate
|
||||
--decorate --decorate=
|
||||
--walk-reflogs
|
||||
--parents --children
|
||||
$merge
|
||||
|
||||
@@ -1744,10 +1744,12 @@ static int validate_raw_date(const char *src, char *result, int maxlen)
|
||||
{
|
||||
const char *orig_src = src;
|
||||
char *endp;
|
||||
unsigned long num;
|
||||
|
||||
errno = 0;
|
||||
|
||||
strtoul(src, &endp, 10);
|
||||
num = strtoul(src, &endp, 10);
|
||||
/* NEEDSWORK: perhaps check for reasonable values? */
|
||||
if (errno || endp == src || *endp != ' ')
|
||||
return -1;
|
||||
|
||||
@@ -1755,8 +1757,9 @@ static int validate_raw_date(const char *src, char *result, int maxlen)
|
||||
if (*src != '-' && *src != '+')
|
||||
return -1;
|
||||
|
||||
strtoul(src + 1, &endp, 10);
|
||||
if (errno || endp == src || *endp || (endp - orig_src) >= maxlen)
|
||||
num = strtoul(src + 1, &endp, 10);
|
||||
if (errno || endp == src + 1 || *endp || (endp - orig_src) >= maxlen ||
|
||||
1400 < num)
|
||||
return -1;
|
||||
|
||||
strcpy(result, orig_src);
|
||||
|
||||
@@ -182,14 +182,7 @@ merge_head=$(sed -e '/ not-for-merge /d' \
|
||||
|
||||
case "$merge_head" in
|
||||
'')
|
||||
case $? in
|
||||
0) error_on_no_merge_candidates "$@";;
|
||||
1) echo >&2 "You are not currently on a branch; you must explicitly"
|
||||
echo >&2 "specify which branch you wish to merge:"
|
||||
echo >&2 " git pull <remote> <branch>"
|
||||
exit 1;;
|
||||
*) exit $?;;
|
||||
esac
|
||||
error_on_no_merge_candidates "$@"
|
||||
;;
|
||||
?*' '?*)
|
||||
if test -z "$orig_head"
|
||||
|
||||
@@ -56,4 +56,12 @@ test_expect_success 'show-branch with more than 8 branches' '
|
||||
|
||||
'
|
||||
|
||||
test_expect_success 'show-branch with showbranch.default' '
|
||||
for i in $numbers; do
|
||||
git config --add showbranch.default branch$i
|
||||
done &&
|
||||
git show-branch >out &&
|
||||
test_cmp expect out
|
||||
'
|
||||
|
||||
test_done
|
||||
|
||||
Reference in New Issue
Block a user