mirror of
https://github.com/git/git.git
synced 2026-04-01 12:30:09 +02:00
Merge branch 'master' of git://repo.or.cz/alt-git
This commit is contained in:
1
Documentation/.gitignore
vendored
1
Documentation/.gitignore
vendored
@@ -8,3 +8,4 @@ gitman.info
|
||||
howto-index.txt
|
||||
doc.dep
|
||||
cmds-*.txt
|
||||
manpage-base-url.xsl
|
||||
|
||||
@@ -104,6 +104,17 @@ ifdef DOCBOOK_SUPPRESS_SP
|
||||
XMLTO_EXTRA += -m manpage-suppress-sp.xsl
|
||||
endif
|
||||
|
||||
# Newer DocBook stylesheet emits warning cruft in the output when
|
||||
# this is not set, and if set it shows an absolute link. Older
|
||||
# stylesheets simply ignore this parameter.
|
||||
#
|
||||
# Distros may want to use MAN_BASE_URL=file:///path/to/git/docs/
|
||||
# or similar.
|
||||
ifndef MAN_BASE_URL
|
||||
MAN_BASE_URL = file://$(htmldir)/
|
||||
endif
|
||||
XMLTO_EXTRA += -m manpage-base-url.xsl
|
||||
|
||||
# If your target system uses GNU groff, it may try to render
|
||||
# apostrophes as a "pretty" apostrophe using unicode. This breaks
|
||||
# cut&paste, so you should set GNU_ROFF to force them to be ASCII
|
||||
@@ -231,6 +242,7 @@ clean:
|
||||
$(RM) howto-index.txt howto/*.html doc.dep
|
||||
$(RM) technical/api-*.html technical/api-index.txt
|
||||
$(RM) $(cmds_txt) *.made
|
||||
$(RM) manpage-base-url.xsl
|
||||
|
||||
$(MAN_HTML): %.html : %.txt
|
||||
$(QUIET_ASCIIDOC)$(RM) $@+ $@ && \
|
||||
@@ -238,7 +250,10 @@ $(MAN_HTML): %.html : %.txt
|
||||
$(ASCIIDOC_EXTRA) -agit_version=$(GIT_VERSION) -o $@+ $< && \
|
||||
mv $@+ $@
|
||||
|
||||
%.1 %.5 %.7 : %.xml
|
||||
manpage-base-url.xsl: manpage-base-url.xsl.in
|
||||
sed "s|@@MAN_BASE_URL@@|$(MAN_BASE_URL)|" $< > $@
|
||||
|
||||
%.1 %.5 %.7 : %.xml manpage-base-url.xsl
|
||||
$(QUIET_XMLTO)$(RM) $@ && \
|
||||
xmlto -m $(MANPAGE_XSL) $(XMLTO_EXTRA) man $<
|
||||
|
||||
|
||||
49
Documentation/RelNotes-1.6.5.5.txt
Normal file
49
Documentation/RelNotes-1.6.5.5.txt
Normal file
@@ -0,0 +1,49 @@
|
||||
Git v1.6.5.5 Release Notes
|
||||
==========================
|
||||
|
||||
Fixes since v1.6.5.4
|
||||
--------------------
|
||||
|
||||
* Manual pages can be formatted with older xmlto again.
|
||||
|
||||
* GREP_OPTIONS exported from user's environment could have broken
|
||||
our scripted commands.
|
||||
|
||||
* In configuration files, a few variables that name paths can begin with
|
||||
~/ and ~username/ and they are expanded as expected. This is not a
|
||||
bugfix but 1.6.6 will have this and without backporting users cannot
|
||||
easily use the same ~/.gitconfig across versions.
|
||||
|
||||
* "git diff -B -M" did the same computation to hash lines of contents
|
||||
twice, and held onto memory after it has used the data in it
|
||||
unnecessarily before it freed.
|
||||
|
||||
* "git diff -B" and "git diff --dirstat" was not counting newly added
|
||||
contents correctly.
|
||||
|
||||
* "git format-patch revisions... -- path" issued an incorrect error
|
||||
message that suggested to use "--" on the command line when path
|
||||
does not exist in the current work tree (it is a separate matter if
|
||||
it makes sense to limit format-patch with pathspecs like that
|
||||
without using the --full-diff option).
|
||||
|
||||
* "git grep -F -i StRiNg" did not work as expected.
|
||||
|
||||
* Enumeration of available merge strategies iterated over the list of
|
||||
commands in a wrong way, sometimes producing an incorrect result.
|
||||
|
||||
* "git shortlog" did not honor the "encoding" header embedded in the
|
||||
commit object like "git log" did.
|
||||
|
||||
* Reading progress messages that come from the remote side while running
|
||||
"git pull" is given precedence over reading the actual pack data to
|
||||
prevent garbled progress message on the user's terminal.
|
||||
|
||||
* "git rebase" got confused when the log message began with certain
|
||||
strings that looked like Subject:, Date: or From: header.
|
||||
|
||||
* "git reset" accidentally run in .git/ directory checked out the
|
||||
work tree contents in there.
|
||||
|
||||
|
||||
Other minor documentation updates are included.
|
||||
@@ -25,24 +25,25 @@ the sake of backward compatibility.
|
||||
When necessary, transition strategy for existing users has been designed
|
||||
not to force them running around setting configuration variables and
|
||||
updating their scripts in order to either keep the traditional behaviour
|
||||
or use the new behaviour on the day their sysadmin decides to install
|
||||
or adjust to the new behaviour on the day their sysadmin decides to install
|
||||
the new version of git. When we switched from "git-foo" to "git foo" in
|
||||
1.6.0, even though the change had been advertised and the transition
|
||||
guide had been provided for a very long time, the users procrastinated
|
||||
during the entire transtion period, and ended up panicking on the day
|
||||
their sysadmins updated their git installation. We tried very hard to
|
||||
avoid repeating that unpleasantness.
|
||||
their sysadmins updated their git installation. We are trying to avoid
|
||||
repeating that unpleasantness in the 1.7.0 release.
|
||||
|
||||
For changes decided to be in 1.7.0, we have been much louder to strongly
|
||||
discourage such procrastination. If you have been using recent versions
|
||||
of git, you would have already seen warnings issued when you exercised
|
||||
features whose behaviour will change, with the instruction on how to
|
||||
keep the existing behaviour if you want to. You hopefully should be
|
||||
well prepared already.
|
||||
For changes decided to be in 1.7.0, commands that will be affected
|
||||
have been much louder to strongly discourage such procrastination. If
|
||||
you have been using recent versions of git, you would have seen
|
||||
warnings issued when you exercised features whose behaviour will
|
||||
change, with a clear instruction on how to keep the existing behaviour
|
||||
if you want to. You hopefully are already well prepared.
|
||||
|
||||
Of course, we have also given "this and that will change in 1.7.0;
|
||||
prepare yourselves" warnings in the release notes and announcement
|
||||
messages. Let's see how well users will fare this time.
|
||||
Of course, we have also been giving "this and that will change in
|
||||
1.7.0; prepare yourselves" warnings in the release notes and
|
||||
announcement messages for the past few releases. Let's see how well
|
||||
users will fare this time.
|
||||
|
||||
* "git push" into a branch that is currently checked out (i.e. pointed by
|
||||
HEAD in a repository that is not bare) will be refused by default.
|
||||
@@ -54,10 +55,10 @@ messages. Let's see how well users will fare this time.
|
||||
Setting the configuration variables receive.denyCurrentBranch and
|
||||
receive.denyDeleteCurrent to 'ignore' in the receiving repository
|
||||
can be used to override these safety features. Versions of git
|
||||
since 1.6.2 have issued a loud warning when you tried to do them
|
||||
without setting the configuration, so repositories of people who
|
||||
still need to be able to perform such a push should already have
|
||||
been future proofed.
|
||||
since 1.6.2 have issued a loud warning when you tried to do these
|
||||
operations without setting the configuration, so repositories of
|
||||
people who still need to be able to perform such a push should
|
||||
already have been future proofed.
|
||||
|
||||
Please refer to:
|
||||
|
||||
@@ -107,9 +108,15 @@ Updates since v1.6.5
|
||||
|
||||
(subsystems)
|
||||
|
||||
* various git-gui updates including new translations, wm states, etc.
|
||||
* various gitk updates including use of themed widgets under Tk 8.5,
|
||||
Japanese translation, a fix to a bug when running "gui blame" from
|
||||
a subdirectory, etc.
|
||||
|
||||
* git-svn updates.
|
||||
* various git-gui updates including new translations, wm states fixes,
|
||||
Tk bug workaround after quitting, improved heuristics to trigger gc,
|
||||
etc.
|
||||
|
||||
* various git-svn updates.
|
||||
|
||||
* "git fetch" over http learned a new mode that is different from the
|
||||
traditional "dumb commit walker".
|
||||
@@ -182,10 +189,6 @@ Updates since v1.6.5
|
||||
* "git merge" (and "git pull") learned --ff-only option to make it fail
|
||||
if the merge does not result in a fast-forward.
|
||||
|
||||
* The ancient "git merge <message> HEAD <branch>..." syntax will be
|
||||
removed in later versions of git. A warning is given and tells
|
||||
users to use the "git merge -m <message> <branch>..." instead.
|
||||
|
||||
* "git mergetool" learned to use p4merge.
|
||||
|
||||
* "git rebase -i" learned "reword" that acts like "edit" but immediately
|
||||
@@ -239,5 +242,5 @@ release, unless otherwise noted.
|
||||
---
|
||||
exec >/var/tmp/1
|
||||
echo O=$(git describe master)
|
||||
O=v1.6.6-rc0-119-gc0ecb07
|
||||
O=v1.6.6-rc1-79-g529f8c6
|
||||
git shortlog --no-merges $O..master --not maint
|
||||
|
||||
@@ -74,8 +74,9 @@ OPTIONS
|
||||
The tree or commit to produce an archive for.
|
||||
|
||||
path::
|
||||
If one or more paths are specified, include only these in the
|
||||
archive, otherwise include all files and subdirectories.
|
||||
Without an optional path parameter, all files and subdirectories
|
||||
of the current working directory are included in the archive.
|
||||
If one or more paths are specified, only these are included.
|
||||
|
||||
BACKEND EXTRA OPTIONS
|
||||
---------------------
|
||||
|
||||
@@ -43,9 +43,11 @@ unreleased) version of git, that is available from 'master'
|
||||
branch of the `git.git` repository.
|
||||
Documentation for older releases are available here:
|
||||
|
||||
* link:v1.6.5.3/git.html[documentation for release 1.6.5.3]
|
||||
* link:v1.6.5.5/git.html[documentation for release 1.6.5.5]
|
||||
|
||||
* release notes for
|
||||
link:RelNotes-1.6.5.5.txt[1.6.5.5],
|
||||
link:RelNotes-1.6.5.4.txt[1.6.5.4],
|
||||
link:RelNotes-1.6.5.3.txt[1.6.5.3],
|
||||
link:RelNotes-1.6.5.2.txt[1.6.5.2],
|
||||
link:RelNotes-1.6.5.1.txt[1.6.5.1],
|
||||
|
||||
10
Documentation/manpage-base-url.xsl.in
Normal file
10
Documentation/manpage-base-url.xsl.in
Normal file
@@ -0,0 +1,10 @@
|
||||
<!-- manpage-base-url.xsl:
|
||||
special settings for manpages rendered from newer docbook -->
|
||||
<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
|
||||
version="1.0">
|
||||
|
||||
<!-- set a base URL for relative links -->
|
||||
<xsl:param name="man.base.url.for.relative.links"
|
||||
>@@MAN_BASE_URL@@</xsl:param>
|
||||
|
||||
</xsl:stylesheet>
|
||||
@@ -1,7 +1,7 @@
|
||||
#!/bin/sh
|
||||
|
||||
GVF=GIT-VERSION-FILE
|
||||
DEF_VER=v1.6.6-rc1.GIT
|
||||
DEF_VER=v1.6.6-rc2.GIT
|
||||
|
||||
LF='
|
||||
'
|
||||
|
||||
@@ -796,11 +796,6 @@ static int suggest_conflicts(void)
|
||||
return 1;
|
||||
}
|
||||
|
||||
static const char deprecation_warning[] =
|
||||
"'git merge <msg> HEAD <commit>' is deprecated. Please update\n"
|
||||
"your script to use 'git merge -m <msg> <commit>' instead.\n"
|
||||
"In future versions of git, this syntax will be removed.";
|
||||
|
||||
static struct commit *is_old_style_invocation(int argc, const char **argv)
|
||||
{
|
||||
struct commit *second_token = NULL;
|
||||
@@ -814,7 +809,6 @@ static struct commit *is_old_style_invocation(int argc, const char **argv)
|
||||
die("'%s' is not a commit", argv[1]);
|
||||
if (hashcmp(second_token->object.sha1, head))
|
||||
return NULL;
|
||||
warning(deprecation_warning);
|
||||
}
|
||||
return second_token;
|
||||
}
|
||||
|
||||
@@ -48,6 +48,8 @@ static void garbage_collect(struct string_list *rr)
|
||||
|
||||
git_config(git_rerere_gc_config, NULL);
|
||||
dir = opendir(git_path("rr-cache"));
|
||||
if (!dir)
|
||||
die_errno("unable to open rr-cache directory");
|
||||
while ((e = readdir(dir))) {
|
||||
if (is_dot_or_dotdot(e->d_name))
|
||||
continue;
|
||||
|
||||
@@ -286,8 +286,10 @@ int cmd_reset(int argc, const char **argv, const char *prefix)
|
||||
if (reset_type == NONE)
|
||||
reset_type = MIXED; /* by default */
|
||||
|
||||
if (reset_type == HARD && is_bare_repository())
|
||||
die("hard reset makes no sense in a bare repository");
|
||||
if ((reset_type == HARD || reset_type == MERGE)
|
||||
&& !is_inside_work_tree())
|
||||
die("%s reset requires a work tree",
|
||||
reset_type_names[reset_type]);
|
||||
|
||||
/* Soft reset does not touch the index file nor the working tree
|
||||
* at all, but requires them in a good order. Other resets reset
|
||||
|
||||
@@ -896,11 +896,31 @@ _git_commit ()
|
||||
|
||||
local cur="${COMP_WORDS[COMP_CWORD]}"
|
||||
case "$cur" in
|
||||
--cleanup=*)
|
||||
__gitcomp "default strip verbatim whitespace
|
||||
" "" "${cur##--cleanup=}"
|
||||
return
|
||||
;;
|
||||
--reuse-message=*)
|
||||
__gitcomp "$(__git_refs)" "" "${cur##--reuse-message=}"
|
||||
return
|
||||
;;
|
||||
--reedit-message=*)
|
||||
__gitcomp "$(__git_refs)" "" "${cur##--reedit-message=}"
|
||||
return
|
||||
;;
|
||||
--untracked-files=*)
|
||||
__gitcomp "all no normal" "" "${cur##--untracked-files=}"
|
||||
return
|
||||
;;
|
||||
--*)
|
||||
__gitcomp "
|
||||
--all --author= --signoff --verify --no-verify
|
||||
--edit --amend --include --only --interactive
|
||||
--dry-run
|
||||
--dry-run --reuse-message= --reedit-message=
|
||||
--reset-author --file= --message= --template=
|
||||
--cleanup= --untracked-files --untracked-files=
|
||||
--verbose --quiet
|
||||
"
|
||||
return
|
||||
esac
|
||||
|
||||
@@ -201,10 +201,15 @@ int diffcore_count_changes(struct diff_filespec *src,
|
||||
while (d->cnt) {
|
||||
if (d->hashval >= s->hashval)
|
||||
break;
|
||||
la += d->cnt;
|
||||
d++;
|
||||
}
|
||||
src_cnt = s->cnt;
|
||||
dst_cnt = d->hashval == s->hashval ? d->cnt : 0;
|
||||
dst_cnt = 0;
|
||||
if (d->cnt && d->hashval == s->hashval) {
|
||||
dst_cnt = d->cnt;
|
||||
d++;
|
||||
}
|
||||
if (src_cnt < dst_cnt) {
|
||||
la += dst_cnt - src_cnt;
|
||||
sc += src_cnt;
|
||||
@@ -213,6 +218,10 @@ int diffcore_count_changes(struct diff_filespec *src,
|
||||
sc += dst_cnt;
|
||||
s++;
|
||||
}
|
||||
while (d->cnt) {
|
||||
la += d->cnt;
|
||||
d++;
|
||||
}
|
||||
|
||||
if (!src_count_p)
|
||||
free(src_count);
|
||||
|
||||
@@ -1216,7 +1216,11 @@ sub patch_update_file {
|
||||
if (@{$mode->{TEXT}}) {
|
||||
unshift @hunk, $mode;
|
||||
}
|
||||
if (@{$deletion->{TEXT}} && !@hunk) {
|
||||
if (@{$deletion->{TEXT}}) {
|
||||
foreach my $hunk (@hunk) {
|
||||
push @{$deletion->{TEXT}}, @{$hunk->{TEXT}};
|
||||
push @{$deletion->{DISPLAY}}, @{$hunk->{DISPLAY}};
|
||||
}
|
||||
@hunk = ($deletion);
|
||||
}
|
||||
|
||||
|
||||
@@ -2052,6 +2052,11 @@ proc do_quit {{rc {1}}} {
|
||||
}
|
||||
|
||||
set ret_code $rc
|
||||
|
||||
# Briefly enable send again, working around Tk bug
|
||||
# http://sourceforge.net/tracker/?func=detail&atid=112997&aid=1821174&group_id=12997
|
||||
tk appname [appname]
|
||||
|
||||
destroy .
|
||||
}
|
||||
|
||||
|
||||
@@ -1245,6 +1245,18 @@ method _open_tooltip {cur_w} {
|
||||
|
||||
$tooltip_t conf -state disabled
|
||||
_position_tooltip $this
|
||||
|
||||
# On MacOS raising a window causes it to acquire focus.
|
||||
# Tk 8.5 on MacOS seems to properly support wm transient,
|
||||
# so we can safely counter the effect there.
|
||||
if {$::have_tk85 && [is_MacOSX]} {
|
||||
update
|
||||
if {$w eq {}} {
|
||||
raise .
|
||||
} else {
|
||||
raise $w
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
method _position_tooltip {} {
|
||||
@@ -1268,7 +1280,9 @@ method _position_tooltip {} {
|
||||
append g $pos_y
|
||||
|
||||
wm geometry $tooltip_wm $g
|
||||
raise $tooltip_wm
|
||||
if {![is_MacOSX]} {
|
||||
raise $tooltip_wm
|
||||
}
|
||||
}
|
||||
|
||||
method _hide_tooltip {} {
|
||||
|
||||
@@ -89,27 +89,26 @@ proc do_fsck_objects {} {
|
||||
}
|
||||
|
||||
proc hint_gc {} {
|
||||
set object_limit 8
|
||||
set ndirs 1
|
||||
set limit 8
|
||||
if {[is_Windows]} {
|
||||
set object_limit 1
|
||||
set ndirs 4
|
||||
set limit 1
|
||||
}
|
||||
|
||||
set objects_current [llength [glob \
|
||||
-directory [gitdir objects 42] \
|
||||
set count [llength [glob \
|
||||
-nocomplain \
|
||||
-tails \
|
||||
-- \
|
||||
*]]
|
||||
[gitdir objects 4\[0-[expr {$ndirs-1}]\]/*]]]
|
||||
|
||||
if {$objects_current >= $object_limit} {
|
||||
set objects_current [expr {$objects_current * 250}]
|
||||
set object_limit [expr {$object_limit * 250}]
|
||||
if {$count >= $limit * $ndirs} {
|
||||
set objects_current [expr {$count * 256/$ndirs}]
|
||||
if {[ask_popup \
|
||||
[mc "This repository currently has approximately %i loose objects.
|
||||
|
||||
To maintain optimal performance it is strongly recommended that you compress the database when more than %i loose objects exist.
|
||||
To maintain optimal performance it is strongly recommended that you compress the database.
|
||||
|
||||
Compress the database now?" $objects_current $object_limit]] eq yes} {
|
||||
Compress the database now?" $objects_current]] eq yes} {
|
||||
do_gc
|
||||
}
|
||||
}
|
||||
|
||||
@@ -250,6 +250,8 @@ method _write_url {args} { set urltype url }
|
||||
method _write_check_head {args} { set checktype head }
|
||||
|
||||
method _write_head_list {args} {
|
||||
global current_branch
|
||||
|
||||
$head_m delete 0 end
|
||||
foreach abr $head_list {
|
||||
$head_m insert end radiobutton \
|
||||
@@ -258,7 +260,11 @@ method _write_head_list {args} {
|
||||
-variable @check_head
|
||||
}
|
||||
if {[lsearch -exact -sorted $head_list $check_head] < 0} {
|
||||
set check_head {}
|
||||
if {[lsearch -exact -sorted $head_list $current_branch] < 0} {
|
||||
set check_head {}
|
||||
} else {
|
||||
set check_head $current_branch
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
54
git-pull.sh
54
git-pull.sh
@@ -91,45 +91,63 @@ error_on_no_merge_candidates () {
|
||||
esac
|
||||
done
|
||||
|
||||
if test true = "$rebase"
|
||||
then
|
||||
op_type=rebase
|
||||
op_prep=against
|
||||
else
|
||||
op_type=merge
|
||||
op_prep=with
|
||||
fi
|
||||
|
||||
curr_branch=${curr_branch#refs/heads/}
|
||||
upstream=$(git config "branch.$curr_branch.merge")
|
||||
remote=$(git config "branch.$curr_branch.remote")
|
||||
|
||||
if [ $# -gt 1 ]; then
|
||||
echo "There are no candidates for merging in the refs that you just fetched."
|
||||
if [ "$rebase" = true ]; then
|
||||
printf "There is no candidate for rebasing against "
|
||||
else
|
||||
printf "There are no candidates for merging "
|
||||
fi
|
||||
echo "among the refs that you just fetched."
|
||||
echo "Generally this means that you provided a wildcard refspec which had no"
|
||||
echo "matches on the remote end."
|
||||
elif [ $# -gt 0 ] && [ "$1" != "$remote" ]; then
|
||||
echo "You asked to pull from the remote '$1', but did not specify"
|
||||
echo "a branch to merge. Because this is not the default configured remote"
|
||||
echo "a branch. Because this is not the default configured remote"
|
||||
echo "for your current branch, you must specify a branch on the command line."
|
||||
elif [ -z "$curr_branch" ]; then
|
||||
echo "You are not currently on a branch, so I cannot use any"
|
||||
echo "'branch.<branchname>.merge' in your configuration file."
|
||||
echo "Please specify which branch you want to merge on the command"
|
||||
echo "Please specify which remote branch you want to use on the command"
|
||||
echo "line and try again (e.g. 'git pull <repository> <refspec>')."
|
||||
echo "See git-pull(1) for details."
|
||||
elif [ -z "$upstream" ]; then
|
||||
echo "You asked me to pull without telling me which branch you"
|
||||
echo "want to merge with, and 'branch.${curr_branch}.merge' in"
|
||||
echo "your configuration file does not tell me either. Please"
|
||||
echo "specify which branch you want to merge on the command line and"
|
||||
echo "want to $op_type $op_prep, and 'branch.${curr_branch}.merge' in"
|
||||
echo "your configuration file does not tell me, either. Please"
|
||||
echo "specify which branch you want to use on the command line and"
|
||||
echo "try again (e.g. 'git pull <repository> <refspec>')."
|
||||
echo "See git-pull(1) for details."
|
||||
echo
|
||||
echo "If you often merge with the same branch, you may want to"
|
||||
echo "configure the following variables in your configuration"
|
||||
echo "file:"
|
||||
echo "If you often $op_type $op_prep the same branch, you may want to"
|
||||
echo "use something like the following in your configuration file:"
|
||||
echo
|
||||
echo " branch.${curr_branch}.remote = <nickname>"
|
||||
echo " branch.${curr_branch}.merge = <remote-ref>"
|
||||
echo " remote.<nickname>.url = <url>"
|
||||
echo " remote.<nickname>.fetch = <refspec>"
|
||||
echo " [branch \"${curr_branch}\"]"
|
||||
echo " remote = <nickname>"
|
||||
echo " merge = <remote-ref>"
|
||||
test rebase = "$op_type" &&
|
||||
echo " rebase = true"
|
||||
echo
|
||||
echo " [remote \"<nickname>\"]"
|
||||
echo " url = <url>"
|
||||
echo " fetch = <refspec>"
|
||||
echo
|
||||
echo "See git-config(1) for details."
|
||||
else
|
||||
echo "Your configuration specifies to merge the ref '${upstream#refs/heads/}' from the"
|
||||
echo "remote, but no such ref was fetched."
|
||||
echo "Your configuration specifies to $op_type $op_prep the ref '${upstream#refs/heads/}'"
|
||||
echo "from the remote, but no such ref was fetched."
|
||||
fi
|
||||
exit 1
|
||||
}
|
||||
@@ -216,7 +234,7 @@ fi
|
||||
|
||||
merge_name=$(git fmt-merge-msg $log_arg <"$GIT_DIR/FETCH_HEAD") || exit
|
||||
test true = "$rebase" &&
|
||||
exec git rebase $diffstat $strategy_args --onto $merge_head \
|
||||
exec git-rebase $diffstat $strategy_args --onto $merge_head \
|
||||
${oldremoteref:-$merge_head}
|
||||
exec git merge $verbosity $diffstat $no_commit $squash $no_ff $ff_only $log_arg $strategy_args \
|
||||
-m "$merge_name" $merge_head
|
||||
exec git-merge $diffstat $no_commit $squash $no_ff $ff_only $log_arg $strategy_args \
|
||||
"$merge_name" HEAD $merge_head $verbosity
|
||||
|
||||
15
git-svn.perl
15
git-svn.perl
@@ -392,9 +392,11 @@ sub cmd_clone {
|
||||
$path = $url;
|
||||
}
|
||||
$path = basename($url) if !defined $path || !length $path;
|
||||
my $authors_absolute = $_authors ? File::Spec->rel2abs($_authors) : "";
|
||||
cmd_init($url, $path);
|
||||
command_oneline('config', 'svn.authorsfile', $authors_absolute)
|
||||
if $_authors;
|
||||
Git::SVN::fetch_all($Git::SVN::default_repo_id);
|
||||
command_oneline('config', 'svn.authorsfile', $_authors) if $_authors;
|
||||
}
|
||||
|
||||
sub cmd_init {
|
||||
@@ -2748,7 +2750,8 @@ sub mkemptydirs {
|
||||
} elsif (/^ \+empty_dir: (.+)$/) {
|
||||
$empty_dirs{$1} = 1;
|
||||
} elsif (/^ \-empty_dir: (.+)$/) {
|
||||
delete $empty_dirs{$1};
|
||||
my @d = grep {m[^\Q$1\E(/|$)]} (keys %empty_dirs);
|
||||
delete @empty_dirs{@d};
|
||||
}
|
||||
}
|
||||
close $fh;
|
||||
@@ -2940,10 +2943,14 @@ sub find_extra_svk_parents {
|
||||
if ( my $commit = $gs->rev_map_get($rev, $uuid) ) {
|
||||
# wahey! we found it, but it might be
|
||||
# an old one (!)
|
||||
push @known_parents, $commit;
|
||||
push @known_parents, [ $rev, $commit ];
|
||||
}
|
||||
}
|
||||
}
|
||||
# Ordering matters; highest-numbered commit merge tickets
|
||||
# first, as they may account for later merge ticket additions
|
||||
# or changes.
|
||||
@known_parents = map {$_->[1]} sort {$b->[0] <=> $a->[0]} @known_parents;
|
||||
for my $parent ( @known_parents ) {
|
||||
my @cmd = ('rev-list', $parent, map { "^$_" } @$parents );
|
||||
my ($msg_fh, $ctx) = command_output_pipe(@cmd);
|
||||
@@ -3886,11 +3893,11 @@ sub delete_entry {
|
||||
}
|
||||
print "\tD\t$gpath/\n" unless $::_q;
|
||||
command_close_pipe($ls, $ctx);
|
||||
$self->{empty}->{$path} = 0
|
||||
} else {
|
||||
$self->{gii}->remove($gpath);
|
||||
print "\tD\t$gpath\n" unless $::_q;
|
||||
}
|
||||
$self->{empty}->{$path} = 0;
|
||||
undef;
|
||||
}
|
||||
|
||||
|
||||
835
gitk-git/gitk
835
gitk-git/gitk
File diff suppressed because it is too large
Load Diff
1255
gitk-git/po/ja.po
Normal file
1255
gitk-git/po/ja.po
Normal file
File diff suppressed because it is too large
Load Diff
@@ -95,7 +95,8 @@ You can specify the following configuration variables when building GIT:
|
||||
* GITWEB_JS
|
||||
Points to the localtion where you put gitweb.js on your web server
|
||||
(or to be more generic URI of JavaScript code used by gitweb).
|
||||
Relative to base URI of gitweb. [Default: gitweb.js]
|
||||
Relative to base URI of gitweb. [Default: gitweb.js (or gitweb.min.js
|
||||
if JSMIN build variable is defined / JavaScript minifier is used)]
|
||||
* GITWEB_CONFIG
|
||||
This Perl file will be loaded using 'do' and can be used to override any
|
||||
of the options above as well as some other options -- see the "Runtime
|
||||
|
||||
2
notes.c
2
notes.c
@@ -331,6 +331,8 @@ static void load_subtree(struct leaf_node *subtree, struct int_node *node,
|
||||
hashcpy(l->key_sha1, commit_sha1);
|
||||
hashcpy(l->val_sha1, entry.sha1);
|
||||
if (len < 20) {
|
||||
if (!S_ISDIR(entry.mode))
|
||||
continue; /* entry cannot be subtree */
|
||||
l->key_sha1[19] = (unsigned char) len;
|
||||
type = PTR_TYPE_SUBTREE;
|
||||
}
|
||||
|
||||
172
t/t3304-notes-mixed.sh
Executable file
172
t/t3304-notes-mixed.sh
Executable file
@@ -0,0 +1,172 @@
|
||||
#!/bin/sh
|
||||
|
||||
test_description='Test notes trees that also contain non-notes'
|
||||
|
||||
. ./test-lib.sh
|
||||
|
||||
number_of_commits=100
|
||||
|
||||
start_note_commit () {
|
||||
test_tick &&
|
||||
cat <<INPUT_END
|
||||
commit refs/notes/commits
|
||||
committer $GIT_COMMITTER_NAME <$GIT_COMMITTER_EMAIL> $GIT_COMMITTER_DATE
|
||||
data <<COMMIT
|
||||
notes
|
||||
COMMIT
|
||||
|
||||
from refs/notes/commits^0
|
||||
deleteall
|
||||
INPUT_END
|
||||
|
||||
}
|
||||
|
||||
verify_notes () {
|
||||
git log | grep "^ " > output &&
|
||||
i=$number_of_commits &&
|
||||
while [ $i -gt 0 ]; do
|
||||
echo " commit #$i" &&
|
||||
echo " note for commit #$i" &&
|
||||
i=$(($i-1));
|
||||
done > expect &&
|
||||
test_cmp expect output
|
||||
}
|
||||
|
||||
test_expect_success "setup: create a couple of commits" '
|
||||
|
||||
test_tick &&
|
||||
cat <<INPUT_END >input &&
|
||||
commit refs/heads/master
|
||||
committer $GIT_COMMITTER_NAME <$GIT_COMMITTER_EMAIL> $GIT_COMMITTER_DATE
|
||||
data <<COMMIT
|
||||
commit #1
|
||||
COMMIT
|
||||
|
||||
M 644 inline file
|
||||
data <<EOF
|
||||
file in commit #1
|
||||
EOF
|
||||
|
||||
INPUT_END
|
||||
|
||||
test_tick &&
|
||||
cat <<INPUT_END >>input &&
|
||||
commit refs/heads/master
|
||||
committer $GIT_COMMITTER_NAME <$GIT_COMMITTER_EMAIL> $GIT_COMMITTER_DATE
|
||||
data <<COMMIT
|
||||
commit #2
|
||||
COMMIT
|
||||
|
||||
M 644 inline file
|
||||
data <<EOF
|
||||
file in commit #2
|
||||
EOF
|
||||
|
||||
INPUT_END
|
||||
git fast-import --quiet <input
|
||||
'
|
||||
|
||||
test_expect_success "create a notes tree with both notes and non-notes" '
|
||||
|
||||
commit1=$(git rev-parse refs/heads/master^) &&
|
||||
commit2=$(git rev-parse refs/heads/master) &&
|
||||
test_tick &&
|
||||
cat <<INPUT_END >input &&
|
||||
commit refs/notes/commits
|
||||
committer $GIT_COMMITTER_NAME <$GIT_COMMITTER_EMAIL> $GIT_COMMITTER_DATE
|
||||
data <<COMMIT
|
||||
notes commit #1
|
||||
COMMIT
|
||||
|
||||
N inline $commit1
|
||||
data <<EOF
|
||||
note for commit #1
|
||||
EOF
|
||||
|
||||
N inline $commit2
|
||||
data <<EOF
|
||||
note for commit #2
|
||||
EOF
|
||||
|
||||
INPUT_END
|
||||
test_tick &&
|
||||
cat <<INPUT_END >>input &&
|
||||
commit refs/notes/commits
|
||||
committer $GIT_COMMITTER_NAME <$GIT_COMMITTER_EMAIL> $GIT_COMMITTER_DATE
|
||||
data <<COMMIT
|
||||
notes commit #2
|
||||
COMMIT
|
||||
|
||||
M 644 inline foobar/non-note.txt
|
||||
data <<EOF
|
||||
A non-note in a notes tree
|
||||
EOF
|
||||
|
||||
N inline $commit2
|
||||
data <<EOF
|
||||
edited note for commit #2
|
||||
EOF
|
||||
|
||||
INPUT_END
|
||||
test_tick &&
|
||||
cat <<INPUT_END >>input &&
|
||||
commit refs/notes/commits
|
||||
committer $GIT_COMMITTER_NAME <$GIT_COMMITTER_EMAIL> $GIT_COMMITTER_DATE
|
||||
data <<COMMIT
|
||||
notes commit #3
|
||||
COMMIT
|
||||
|
||||
N inline $commit1
|
||||
data <<EOF
|
||||
edited note for commit #1
|
||||
EOF
|
||||
|
||||
M 644 inline deadbeef
|
||||
data <<EOF
|
||||
non-note with SHA1-like name
|
||||
EOF
|
||||
|
||||
M 644 inline de/adbeef
|
||||
data <<EOF
|
||||
another non-note with SHA1-like name
|
||||
EOF
|
||||
|
||||
INPUT_END
|
||||
git fast-import --quiet <input &&
|
||||
git config core.notesRef refs/notes/commits
|
||||
'
|
||||
|
||||
cat >expect <<EXPECT_END
|
||||
commit #2
|
||||
edited note for commit #2
|
||||
commit #1
|
||||
edited note for commit #1
|
||||
EXPECT_END
|
||||
|
||||
test_expect_success "verify contents of notes" '
|
||||
|
||||
git log | grep "^ " > actual &&
|
||||
test_cmp expect actual
|
||||
'
|
||||
|
||||
cat >expect_nn1 <<EXPECT_END
|
||||
A non-note in a notes tree
|
||||
EXPECT_END
|
||||
cat >expect_nn2 <<EXPECT_END
|
||||
non-note with SHA1-like name
|
||||
EXPECT_END
|
||||
cat >expect_nn3 <<EXPECT_END
|
||||
another non-note with SHA1-like name
|
||||
EXPECT_END
|
||||
|
||||
test_expect_success "verify contents of non-notes" '
|
||||
|
||||
git cat-file -p refs/notes/commits:foobar/non-note.txt > actual_nn1 &&
|
||||
test_cmp expect_nn1 actual_nn1 &&
|
||||
git cat-file -p refs/notes/commits:deadbeef > actual_nn2 &&
|
||||
test_cmp expect_nn2 actual_nn2 &&
|
||||
git cat-file -p refs/notes/commits:de/adbeef > actual_nn3 &&
|
||||
test_cmp expect_nn3 actual_nn3
|
||||
'
|
||||
|
||||
test_done
|
||||
@@ -228,6 +228,26 @@ test_expect_success 'add first line works' '
|
||||
test_cmp expected diff
|
||||
'
|
||||
|
||||
cat >expected <<EOF
|
||||
diff --git a/non-empty b/non-empty
|
||||
deleted file mode 100644
|
||||
index d95f3ad..0000000
|
||||
--- a/non-empty
|
||||
+++ /dev/null
|
||||
@@ -1 +0,0 @@
|
||||
-content
|
||||
EOF
|
||||
test_expect_success 'deleting a non-empty file' '
|
||||
git reset --hard &&
|
||||
echo content >non-empty &&
|
||||
git add non-empty &&
|
||||
git commit -m non-empty &&
|
||||
rm non-empty &&
|
||||
echo y | git add -p non-empty &&
|
||||
git diff --cached >diff &&
|
||||
test_cmp expected diff
|
||||
'
|
||||
|
||||
cat >expected <<EOF
|
||||
diff --git a/empty b/empty
|
||||
deleted file mode 100644
|
||||
|
||||
@@ -53,7 +53,7 @@ GIT_DIR=non-existing git shortlog -w < log > out
|
||||
test_expect_success 'shortlog from non-git directory' 'test_cmp expect out'
|
||||
|
||||
iconvfromutf8toiso88591() {
|
||||
printf "%s" "$*" | iconv -f UTF-8 -t ISO-8859-1
|
||||
printf "%s" "$*" | iconv -f UTF-8 -t ISO8859-1
|
||||
}
|
||||
|
||||
DSCHO="Jöhännës \"Dschö\" Schindëlin"
|
||||
@@ -72,7 +72,7 @@ test_expect_success 'shortlog encoding' '
|
||||
git config --unset i18n.commitencoding &&
|
||||
echo 2 > a1 &&
|
||||
git commit --quiet -m "$MSG1" --author="$DSCHOE" a1 &&
|
||||
git config i18n.commitencoding "ISO-8859-1" &&
|
||||
git config i18n.commitencoding "ISO8859-1" &&
|
||||
echo 3 > a1 &&
|
||||
git commit --quiet -m "$(iconvfromutf8toiso88591 "$MSG2")" \
|
||||
--author="$(iconvfromutf8toiso88591 "$DSCHOE")" a1 &&
|
||||
|
||||
@@ -11,16 +11,42 @@ test_expect_success 'setup non-bare' '
|
||||
git commit -a -m two
|
||||
'
|
||||
|
||||
test_expect_success 'hard reset requires a worktree' '
|
||||
(cd .git &&
|
||||
test_must_fail git reset --hard)
|
||||
'
|
||||
|
||||
test_expect_success 'merge reset requires a worktree' '
|
||||
(cd .git &&
|
||||
test_must_fail git reset --merge)
|
||||
'
|
||||
|
||||
test_expect_success 'mixed reset is ok' '
|
||||
(cd .git && git reset)
|
||||
'
|
||||
|
||||
test_expect_success 'soft reset is ok' '
|
||||
(cd .git && git reset --soft)
|
||||
'
|
||||
|
||||
test_expect_success 'setup bare' '
|
||||
git clone --bare . bare.git &&
|
||||
cd bare.git
|
||||
'
|
||||
|
||||
test_expect_success 'hard reset is not allowed' '
|
||||
test_must_fail git reset --hard HEAD^
|
||||
test_expect_success 'hard reset is not allowed in bare' '
|
||||
test_must_fail git reset --hard HEAD^
|
||||
'
|
||||
|
||||
test_expect_success 'soft reset is allowed' '
|
||||
test_expect_success 'merge reset is not allowed in bare' '
|
||||
test_must_fail git reset --merge HEAD^
|
||||
'
|
||||
|
||||
test_expect_success 'mixed reset is not allowed in bare' '
|
||||
test_must_fail git reset --mixed HEAD^
|
||||
'
|
||||
|
||||
test_expect_success 'soft reset is allowed in bare' '
|
||||
git reset --soft HEAD^ &&
|
||||
test "`git show --pretty=format:%s | head -n 1`" = "one"
|
||||
'
|
||||
|
||||
@@ -827,7 +827,7 @@ test_expect_success 'no warning with an explicit --no-chain-reply-to' '
|
||||
--dry-run \
|
||||
--from="Example <nobody@example.com>" \
|
||||
--to=nobody@example.com \
|
||||
--no-chain-reply-to \
|
||||
--nochain-reply-to \
|
||||
outdir/000?-*.patch 2>errors >out &&
|
||||
! grep "no-chain-reply-to" errors
|
||||
'
|
||||
|
||||
@@ -105,4 +105,14 @@ test_expect_success 'empty directories in trunk exist' '
|
||||
)
|
||||
'
|
||||
|
||||
test_expect_success 'remove a top-level directory from svn' '
|
||||
svn_cmd rm -m "remove d" "$svnrepo"/d
|
||||
'
|
||||
|
||||
test_expect_success 'removed top-level directory does not exist' '
|
||||
git svn clone "$svnrepo" removed &&
|
||||
test ! -e removed/d
|
||||
|
||||
'
|
||||
|
||||
test_done
|
||||
|
||||
Reference in New Issue
Block a user