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:
@@ -53,6 +53,10 @@ Updates since v1.6.4
|
||||
* Unnecessary inefficiency in deepening of a shallow repository has
|
||||
been removed.
|
||||
|
||||
* "git clone" does not grab objects that it does not need (i.e.
|
||||
referenced only from refs outside refs/heads and refs/tags
|
||||
hierarchy) anymore.
|
||||
|
||||
* The "git" main binary used to link with libcurl, which then dragged
|
||||
in a large number of external libraries. When using basic plumbing
|
||||
commands in scripts, this unnecessarily slowed things down. We now
|
||||
@@ -154,18 +158,12 @@ Updates since v1.6.4
|
||||
* With GIT_TEST_OPTS="--root=/p/a/t/h", tests can be run outside the
|
||||
source directory; using tmpfs may give faster turnaround.
|
||||
|
||||
* With NO_PERL_MAKEMAKER set, DESTDIR= is now honoured, so you can
|
||||
build for one location, and install into another location to tar it
|
||||
up.
|
||||
|
||||
Fixes since v1.6.4
|
||||
------------------
|
||||
|
||||
# All of the fixes in v1.6.4.X maintenance series are included in this
|
||||
# release, unless otherwise noted.
|
||||
|
||||
# Here are fixes that this release has, but have not been backported to
|
||||
# v1.6.4.X series.
|
||||
|
||||
--
|
||||
exec >/var/tmp/1
|
||||
O=v1.6.5-rc1-44-ga16753d
|
||||
echo O=$(git describe master)
|
||||
git shortlog --no-merges $O..master --not maint
|
||||
All of the fixes in v1.6.4.X maintenance series are included in this
|
||||
release, unless otherwise noted.
|
||||
|
||||
@@ -539,7 +539,7 @@ branch.<name>.merge::
|
||||
|
||||
branch.<name>.mergeoptions::
|
||||
Sets default options for merging into branch <name>. The syntax and
|
||||
supported options are equal to that of linkgit:git-merge[1], but
|
||||
supported options are the same as those of linkgit:git-merge[1], but
|
||||
option values containing whitespace characters are currently not
|
||||
supported.
|
||||
|
||||
|
||||
@@ -30,10 +30,8 @@ commit) will be listed. With `--no-merged` only branches not merged into
|
||||
the named commit will be listed. If the <commit> argument is missing it
|
||||
defaults to 'HEAD' (i.e. the tip of the current branch).
|
||||
|
||||
In the command's second form, a new branch named <branchname> will be created.
|
||||
It will start out with a head equal to the one given as <start-point>.
|
||||
If no <start-point> is given, the branch will be created with a head
|
||||
equal to that of the currently checked out branch.
|
||||
The command's second form creates a new branch head named <branchname>
|
||||
which points to the current 'HEAD', or <start-point> if given.
|
||||
|
||||
Note that this will create the new branch, but it will not switch the
|
||||
working tree to it; use "git checkout <newbranch>" to switch to the
|
||||
@@ -134,11 +132,13 @@ start-point is either a local or remote branch.
|
||||
--contains <commit>::
|
||||
Only list branches which contain the specified commit.
|
||||
|
||||
--merged::
|
||||
Only list branches which are fully contained by HEAD.
|
||||
--merged [<commit>]::
|
||||
Only list branches whose tips are reachable from the
|
||||
specified commit (HEAD if not specified).
|
||||
|
||||
--no-merged::
|
||||
Do not list branches which are fully contained by HEAD.
|
||||
--no-merged [<commit>]::
|
||||
Only list branches whose tips are not reachable from the
|
||||
specified commit (HEAD if not specified).
|
||||
|
||||
<branchname>::
|
||||
The name of the branch to create or delete.
|
||||
@@ -147,9 +147,9 @@ start-point is either a local or remote branch.
|
||||
may restrict the characters allowed in a branch name.
|
||||
|
||||
<start-point>::
|
||||
The new branch will be created with a HEAD equal to this. It may
|
||||
be given as a branch name, a commit-id, or a tag. If this option
|
||||
is omitted, the current branch is assumed.
|
||||
The new branch head will point to this commit. It may be
|
||||
given as a branch name, a commit-id, or a tag. If this
|
||||
option is omitted, the current HEAD will be used instead.
|
||||
|
||||
<oldbranch>::
|
||||
The name of an existing branch to rename.
|
||||
@@ -214,7 +214,9 @@ SEE ALSO
|
||||
--------
|
||||
linkgit:git-check-ref-format[1],
|
||||
linkgit:git-fetch[1],
|
||||
linkgit:git-remote[1].
|
||||
linkgit:git-remote[1],
|
||||
link:user-manual.html#what-is-a-branch[``Understanding history: What is
|
||||
a branch?''] in the Git User's Manual.
|
||||
|
||||
Author
|
||||
------
|
||||
|
||||
@@ -19,8 +19,9 @@ DESCRIPTION
|
||||
|
||||
Clones a repository into a newly created directory, creates
|
||||
remote-tracking branches for each branch in the cloned repository
|
||||
(visible using `git branch -r`), and creates and checks out an initial
|
||||
branch equal to the cloned repository's currently active branch.
|
||||
(visible using `git branch -r`), and creates and checks out an
|
||||
initial branch that is forked from the cloned repository's
|
||||
currently active branch.
|
||||
|
||||
After the clone, a plain `git fetch` without arguments will update
|
||||
all the remote-tracking branches, and a `git pull` without
|
||||
|
||||
@@ -18,8 +18,8 @@ Takes the list of merged objects on stdin and produces a suitable
|
||||
commit message to be used for the merge commit, usually to be
|
||||
passed as the '<merge-message>' argument of 'git-merge'.
|
||||
|
||||
This script is intended mostly for internal use by scripts
|
||||
automatically invoking 'git-merge'.
|
||||
This command is intended mostly for internal use by scripts
|
||||
automatically invoking 'git merge'.
|
||||
|
||||
OPTIONS
|
||||
-------
|
||||
|
||||
@@ -28,9 +28,10 @@ OPTIONS
|
||||
include::merge-options.txt[]
|
||||
|
||||
-m <msg>::
|
||||
The commit message to be used for the merge commit (in case
|
||||
it is created). The 'git-fmt-merge-msg' script can be used
|
||||
to give a good default for automated 'git-merge' invocations.
|
||||
Set the commit message to be used for the merge commit (in
|
||||
case one is created). The 'git fmt-merge-msg' command can be
|
||||
used to give a good default for automated 'git merge'
|
||||
invocations.
|
||||
|
||||
<remote>...::
|
||||
Other branch heads to merge into our branch. You need at
|
||||
@@ -49,8 +50,8 @@ include::merge-config.txt[]
|
||||
|
||||
branch.<name>.mergeoptions::
|
||||
Sets default options for merging into branch <name>. The syntax and
|
||||
supported options are equal to that of 'git-merge', but option values
|
||||
containing whitespace characters are currently not supported.
|
||||
supported options are the same as those of 'git merge', but option
|
||||
values containing whitespace characters are currently not supported.
|
||||
|
||||
HOW MERGE WORKS
|
||||
---------------
|
||||
|
||||
@@ -43,6 +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/git.html[documentation for release 1.6.5]
|
||||
|
||||
* release notes for
|
||||
link:RelNotes-1.6.5.txt[1.6.5].
|
||||
|
||||
* link:v1.6.4.4/git.html[documentation for release 1.6.4.4]
|
||||
|
||||
* release notes for
|
||||
|
||||
@@ -456,6 +456,6 @@ This commit is referred to as a "merge commit", or sometimes just a
|
||||
of 'A' is 'origin/B' sometimes we say "'A' is tracking 'origin/B'".
|
||||
|
||||
[[def_working_tree]]working tree::
|
||||
The tree of actual checked out files. The working tree is
|
||||
normally equal to the <<def_HEAD,HEAD>> plus any local changes
|
||||
that you have made but not yet committed.
|
||||
The tree of actual checked out files. The working tree normally
|
||||
contains the contents of the <<def_HEAD,HEAD>> commit's tree,
|
||||
plus any local changes that you have made but not yet committed.
|
||||
|
||||
@@ -42,10 +42,12 @@ compared, but this is not enabled by default because this member
|
||||
is not stable on network filesystems. With `USE_NSEC`
|
||||
compile-time option, `st_mtim.tv_nsec` and `st_ctim.tv_nsec`
|
||||
members are also compared, but this is not enabled by default
|
||||
because the value of this member becomes meaningless once the
|
||||
inode is evicted from the inode cache on filesystems that do not
|
||||
store it on disk.
|
||||
|
||||
because in-core timestamps can have finer granularity than
|
||||
on-disk timestamps, resulting in meaningless changes when an
|
||||
inode is evicted from the inode cache. See commit 8ce13b0
|
||||
of git://git.kernel.org/pub/scm/linux/kernel/git/tglx/history.git
|
||||
([PATCH] Sync in core time granuality with filesystems,
|
||||
2005-01-04).
|
||||
|
||||
Racy git
|
||||
--------
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
#!/bin/sh
|
||||
|
||||
GVF=GIT-VERSION-FILE
|
||||
DEF_VER=v1.6.4.GIT
|
||||
DEF_VER=v1.6.5
|
||||
|
||||
LF='
|
||||
'
|
||||
|
||||
22
Makefile
22
Makefile
@@ -153,7 +153,11 @@ all::
|
||||
#
|
||||
# Define ASCIIDOC8 if you want to format documentation with AsciiDoc 8
|
||||
#
|
||||
# Define DOCBOOK_XSL_172 if you want to format man pages with DocBook XSL v1.72.
|
||||
# Define DOCBOOK_XSL_172 if you want to format man pages with DocBook XSL v1.72
|
||||
# (not v1.73 or v1.71).
|
||||
#
|
||||
# Define ASCIIDOC_NO_ROFF if your DocBook XSL escapes raw roff directives
|
||||
# (versions 1.72 and later and 1.68.1 and earlier).
|
||||
#
|
||||
# Define NO_PERL_MAKEMAKER if you cannot use Makefiles generated by perl's
|
||||
# MakeMaker (e.g. using ActiveState under Cygwin).
|
||||
@@ -841,11 +845,18 @@ ifeq ($(uname_S),IRIX)
|
||||
NO_MEMMEM = YesPlease
|
||||
NO_MKSTEMPS = YesPlease
|
||||
NO_MKDTEMP = YesPlease
|
||||
# When compiled with the MIPSpro 7.4.4m compiler, and without pthreads
|
||||
# (i.e. NO_PTHREADS is set), and _with_ MMAP (i.e. NO_MMAP is not set),
|
||||
# git dies with a segmentation fault when trying to access the first
|
||||
# entry of a reflog. The conservative choice is made to always set
|
||||
# NO_MMAP. If you suspect that your compiler is not affected by this
|
||||
# issue, comment out the NO_MMAP statement.
|
||||
NO_MMAP = YesPlease
|
||||
NO_EXTERNAL_GREP = UnfortunatelyYes
|
||||
SNPRINTF_RETURNS_BOGUS = YesPlease
|
||||
SHELL_PATH = /usr/gnu/bin/bash
|
||||
NEEDS_LIBGEN = YesPlease
|
||||
THREADED_DELTA_SEARCH = YesPlease
|
||||
endif
|
||||
ifeq ($(uname_S),IRIX64)
|
||||
NO_SETENV=YesPlease
|
||||
@@ -854,11 +865,18 @@ ifeq ($(uname_S),IRIX64)
|
||||
NO_MEMMEM = YesPlease
|
||||
NO_MKSTEMPS = YesPlease
|
||||
NO_MKDTEMP = YesPlease
|
||||
# When compiled with the MIPSpro 7.4.4m compiler, and without pthreads
|
||||
# (i.e. NO_PTHREADS is set), and _with_ MMAP (i.e. NO_MMAP is not set),
|
||||
# git dies with a segmentation fault when trying to access the first
|
||||
# entry of a reflog. The conservative choice is made to always set
|
||||
# NO_MMAP. If you suspect that your compiler is not affected by this
|
||||
# issue, comment out the NO_MMAP statement.
|
||||
NO_MMAP = YesPlease
|
||||
NO_EXTERNAL_GREP = UnfortunatelyYes
|
||||
SNPRINTF_RETURNS_BOGUS = YesPlease
|
||||
SHELL_PATH=/usr/gnu/bin/bash
|
||||
NEEDS_LIBGEN = YesPlease
|
||||
THREADED_DELTA_SEARCH = YesPlease
|
||||
endif
|
||||
ifeq ($(uname_S),HP-UX)
|
||||
NO_IPV6=YesPlease
|
||||
@@ -915,7 +933,7 @@ ifdef MSVC
|
||||
CC = compat/vcbuild/scripts/clink.pl
|
||||
AR = compat/vcbuild/scripts/lib.pl
|
||||
CFLAGS =
|
||||
BASIC_CFLAGS = -nologo -I. -I../zlib -Icompat/vcbuild -Icompat/vcbuild/include -DWIN32-D_CONSOLE -DHAVE_STRING_H -D_CRT_SECURE_NO_WARNINGS -D_CRT_NONSTDC_NO_DEPRECATE
|
||||
BASIC_CFLAGS = -nologo -I. -I../zlib -Icompat/vcbuild -Icompat/vcbuild/include -DWIN32 -D_CONSOLE -DHAVE_STRING_H -D_CRT_SECURE_NO_WARNINGS -D_CRT_NONSTDC_NO_DEPRECATE
|
||||
COMPAT_OBJS = compat/msvc.o compat/fnmatch/fnmatch.o compat/winansi.o
|
||||
COMPAT_CFLAGS = -D__USE_MINGW_ACCESS -DNOGDI -DHAVE_STRING_H -DHAVE_ALLOCA_H -Icompat -Icompat/fnmatch -Icompat/regex -Icompat/fnmatch -DSTRIP_EXTENSION=\".exe\"
|
||||
BASIC_LDFLAGS = -IGNORE:4217 -IGNORE:4049 -NOLOGO -SUBSYSTEM:CONSOLE -NODEFAULTLIB:MSVCRT.lib
|
||||
|
||||
@@ -115,6 +115,7 @@ static int write_archive_entry(const unsigned char *sha1, const char *base,
|
||||
|
||||
strbuf_reset(&path);
|
||||
strbuf_grow(&path, PATH_MAX);
|
||||
strbuf_add(&path, args->base, args->baselen);
|
||||
strbuf_add(&path, base, baselen);
|
||||
strbuf_addstr(&path, filename);
|
||||
path_without_prefix = path.buf + args->baselen;
|
||||
@@ -187,8 +188,8 @@ int write_archive_entries(struct archiver_args *args,
|
||||
git_attr_set_direction(GIT_ATTR_INDEX, &the_index);
|
||||
}
|
||||
|
||||
err = read_tree_recursive(args->tree, args->base, args->baselen, 0,
|
||||
args->pathspec, write_archive_entry, &context);
|
||||
err = read_tree_recursive(args->tree, "", 0, 0, args->pathspec,
|
||||
write_archive_entry, &context);
|
||||
if (err == READ_TREE_RECURSIVE)
|
||||
err = 0;
|
||||
return err;
|
||||
@@ -211,7 +212,7 @@ static const struct archiver *lookup_archiver(const char *name)
|
||||
static void parse_pathspec_arg(const char **pathspec,
|
||||
struct archiver_args *ar_args)
|
||||
{
|
||||
ar_args->pathspec = get_pathspec(ar_args->base, pathspec);
|
||||
ar_args->pathspec = get_pathspec("", pathspec);
|
||||
}
|
||||
|
||||
static void parse_treeish_arg(const char **argv,
|
||||
|
||||
@@ -524,11 +524,8 @@ int cmd_ls_files(int argc, const char **argv, const char *prefix)
|
||||
ps_matched = xcalloc(1, num);
|
||||
}
|
||||
|
||||
if ((dir.flags & DIR_SHOW_IGNORED) && !exc_given) {
|
||||
fprintf(stderr, "%s: --ignored needs some exclude pattern\n",
|
||||
argv[0]);
|
||||
exit(1);
|
||||
}
|
||||
if ((dir.flags & DIR_SHOW_IGNORED) && !exc_given)
|
||||
die("ls-files --ignored needs some exclude pattern");
|
||||
|
||||
/* With no flags, we default to showing the cached files */
|
||||
if (!(show_stage | show_deleted | show_others | show_unmerged |
|
||||
|
||||
@@ -45,4 +45,4 @@ if ($is_linking) {
|
||||
push(@args, @cflags);
|
||||
}
|
||||
#printf("**** @args\n");
|
||||
exit system(@args);
|
||||
exit (system(@args) != 0);
|
||||
|
||||
@@ -23,4 +23,4 @@ while (@ARGV) {
|
||||
}
|
||||
unshift(@args, "lib.exe");
|
||||
# printf("**** @args\n");
|
||||
exit system(@args);
|
||||
exit (system(@args) != 0);
|
||||
|
||||
@@ -496,7 +496,7 @@ __git_all_commands ()
|
||||
return
|
||||
fi
|
||||
local i IFS=" "$'\n'
|
||||
for i in $(git help -a|egrep '^ ')
|
||||
for i in $(git help -a|egrep '^ [a-zA-Z0-9]')
|
||||
do
|
||||
case $i in
|
||||
*--*) : helper pattern;;
|
||||
@@ -602,8 +602,12 @@ __git_aliases ()
|
||||
{
|
||||
local i IFS=$'\n'
|
||||
for i in $(git --git-dir="$(__gitdir)" config --get-regexp "alias\..*" 2>/dev/null); do
|
||||
i="${i#alias.}"
|
||||
echo "${i/ */}"
|
||||
case "$i" in
|
||||
alias.*)
|
||||
i="${i#alias.}"
|
||||
echo "${i/ */}"
|
||||
;;
|
||||
esac
|
||||
done
|
||||
}
|
||||
|
||||
@@ -1794,6 +1798,11 @@ _git_remote ()
|
||||
esac
|
||||
}
|
||||
|
||||
_git_replace ()
|
||||
{
|
||||
__gitcomp "$(__git_refs)"
|
||||
}
|
||||
|
||||
_git_reset ()
|
||||
{
|
||||
__git_has_doubledash && return
|
||||
@@ -2162,6 +2171,7 @@ _git ()
|
||||
push) _git_push ;;
|
||||
rebase) _git_rebase ;;
|
||||
remote) _git_remote ;;
|
||||
replace) _git_replace ;;
|
||||
reset) _git_reset ;;
|
||||
revert) _git_revert ;;
|
||||
rm) _git_rm ;;
|
||||
|
||||
@@ -140,7 +140,7 @@ foreach my $tar_file (@ARGV)
|
||||
} elsif (!$header_done && /^Author:\s+([^<>]*)\s+<(.*)>\s*$/i) {
|
||||
$this_author_name = $1;
|
||||
$this_author_email = $2;
|
||||
} elsif (!$header_done && /^$/ { # empty line ends header.
|
||||
} elsif (!$header_done && /^$/) { # empty line ends header.
|
||||
$header_done = 1;
|
||||
} else {
|
||||
$commit_msg .= $_;
|
||||
|
||||
@@ -205,7 +205,7 @@ check_patch_format () {
|
||||
# and see if it looks like that they all begin with the
|
||||
# header field names...
|
||||
sed -n -e '/^$/q' -e '/^[ ]/d' -e p "$1" |
|
||||
egrep -v '^[A-Za-z]+(-[A-Za-z]+)*:' >/dev/null ||
|
||||
LC_ALL=C egrep -v '^[!-9;-~]+:' >/dev/null ||
|
||||
patch_format=mbox
|
||||
fi
|
||||
} < "$1" || clean_abort
|
||||
|
||||
@@ -176,8 +176,10 @@ extern char *gitbasename(char *);
|
||||
|
||||
#ifdef __GNUC__
|
||||
#define NORETURN __attribute__((__noreturn__))
|
||||
#define NORETURN_PTR __attribute__((__noreturn__))
|
||||
#else
|
||||
#define NORETURN
|
||||
#define NORETURN_PTR
|
||||
#ifndef __attribute__
|
||||
#define __attribute__(x)
|
||||
#endif
|
||||
@@ -186,13 +188,13 @@ extern char *gitbasename(char *);
|
||||
#include "compat/bswap.h"
|
||||
|
||||
/* General helper functions */
|
||||
extern void usage(const char *err) NORETURN;
|
||||
extern void die(const char *err, ...) NORETURN __attribute__((format (printf, 1, 2)));
|
||||
extern void die_errno(const char *err, ...) NORETURN __attribute__((format (printf, 1, 2)));
|
||||
extern NORETURN void usage(const char *err);
|
||||
extern NORETURN void die(const char *err, ...) __attribute__((format (printf, 1, 2)));
|
||||
extern NORETURN void die_errno(const char *err, ...) __attribute__((format (printf, 1, 2)));
|
||||
extern int error(const char *err, ...) __attribute__((format (printf, 1, 2)));
|
||||
extern void warning(const char *err, ...) __attribute__((format (printf, 1, 2)));
|
||||
|
||||
extern void set_die_routine(void (*routine)(const char *err, va_list params) NORETURN);
|
||||
extern void set_die_routine(NORETURN_PTR void (*routine)(const char *err, va_list params));
|
||||
|
||||
extern int prefixcmp(const char *str, const char *prefix);
|
||||
extern time_t tm_to_time_t(const struct tm *tm);
|
||||
|
||||
16
git-pull.sh
16
git-pull.sh
@@ -90,8 +90,17 @@ error_on_no_merge_candidates () {
|
||||
|
||||
curr_branch=${curr_branch#refs/heads/}
|
||||
upstream=$(git config "branch.$curr_branch.merge")
|
||||
remote=$(git config "branch.$curr_branch.remote")
|
||||
|
||||
if [ -z "$curr_branch" ]; then
|
||||
if [ $# -gt 1 ]; then
|
||||
echo "There are no candidates for merging in 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 "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"
|
||||
@@ -116,9 +125,8 @@ error_on_no_merge_candidates () {
|
||||
echo
|
||||
echo "See git-config(1) for details."
|
||||
else
|
||||
echo "Your configuration specifies to merge the ref"
|
||||
echo "'${upstream#refs/heads/}' from the remote, but no such ref"
|
||||
echo "was fetched."
|
||||
echo "Your configuration specifies to merge the ref '${upstream#refs/heads/}' from the"
|
||||
echo "remote, but no such ref was fetched."
|
||||
fi
|
||||
exit 1
|
||||
}
|
||||
|
||||
@@ -401,7 +401,7 @@ my %aliases;
|
||||
my %parse_alias = (
|
||||
# multiline formats can be supported in the future
|
||||
mutt => sub { my $fh = shift; while (<$fh>) {
|
||||
if (/^\s*alias\s+(\S+)\s+(.*)$/) {
|
||||
if (/^\s*alias\s+(?:-group\s+\S+\s+)*(\S+)\s+(.*)$/) {
|
||||
my ($alias, $addr) = ($1, $2);
|
||||
$addr =~ s/#.*$//; # mutt allows # comments
|
||||
# commas delimit multiple addresses
|
||||
|
||||
30
git-svn.perl
30
git-svn.perl
@@ -603,8 +603,15 @@ sub cmd_dcommit {
|
||||
"\nBefore dcommitting";
|
||||
}
|
||||
if ($url_ ne $expect_url) {
|
||||
fatal "URL mismatch after rebase: ",
|
||||
"$url_ != $expect_url";
|
||||
if ($url_ eq $gs->metadata_url) {
|
||||
print
|
||||
"Accepting rewritten URL:",
|
||||
" $url_\n";
|
||||
} else {
|
||||
fatal
|
||||
"URL mismatch after rebase:",
|
||||
" $url_ != $expect_url";
|
||||
}
|
||||
}
|
||||
if ($uuid_ ne $uuid) {
|
||||
fatal "uuid mismatch after rebase: ",
|
||||
@@ -2626,7 +2633,8 @@ sub find_parent_branch {
|
||||
my $url = $self->ra->{url};
|
||||
my $new_url = $url . $branch_from;
|
||||
print STDERR "Found possible branch point: ",
|
||||
"$new_url => ", $self->full_url, ", $r\n";
|
||||
"$new_url => ", $self->full_url, ", $r\n"
|
||||
unless $::_q > 1;
|
||||
$branch_from =~ s#^/##;
|
||||
my $gs = $self->other_gs($new_url, $url,
|
||||
$branch_from, $r, $self->{ref_id});
|
||||
@@ -2647,11 +2655,13 @@ sub find_parent_branch {
|
||||
($r0, $parent) = $gs->find_rev_before($r, 1);
|
||||
}
|
||||
if (defined $r0 && defined $parent) {
|
||||
print STDERR "Found branch parent: ($self->{ref_id}) $parent\n";
|
||||
print STDERR "Found branch parent: ($self->{ref_id}) $parent\n"
|
||||
unless $::_q > 1;
|
||||
my $ed;
|
||||
if ($self->ra->can_do_switch) {
|
||||
$self->assert_index_clean($parent);
|
||||
print STDERR "Following parent with do_switch\n";
|
||||
print STDERR "Following parent with do_switch\n"
|
||||
unless $::_q > 1;
|
||||
# do_switch works with svn/trunk >= r22312, but that
|
||||
# is not included with SVN 1.4.3 (the latest version
|
||||
# at the moment), so we can't rely on it
|
||||
@@ -2666,18 +2676,20 @@ sub find_parent_branch {
|
||||
print STDERR "Trees match:\n",
|
||||
" $new_url\@$r0\n",
|
||||
" ${\$self->full_url}\@$rev\n",
|
||||
"Following parent with no changes\n";
|
||||
"Following parent with no changes\n"
|
||||
unless $::_q > 1;
|
||||
$self->tmp_index_do(sub {
|
||||
command_noisy('read-tree', $parent);
|
||||
});
|
||||
$self->{last_commit} = $parent;
|
||||
} else {
|
||||
print STDERR "Following parent with do_update\n";
|
||||
print STDERR "Following parent with do_update\n"
|
||||
unless $::_q > 1;
|
||||
$ed = SVN::Git::Fetcher->new($self);
|
||||
$self->ra->gs_do_update($rev, $rev, $self, $ed)
|
||||
or die "SVN connection failed somewhere...\n";
|
||||
}
|
||||
print STDERR "Successfully followed parent\n";
|
||||
print STDERR "Successfully followed parent\n" unless $::_q > 1;
|
||||
return $self->make_log_entry($rev, [$parent], $ed);
|
||||
}
|
||||
return undef;
|
||||
@@ -2822,7 +2834,7 @@ sub other_gs {
|
||||
$ref_id .= "\@$r";
|
||||
# just grow a tail if we're not unique enough :x
|
||||
$ref_id .= '-' while find_ref($ref_id);
|
||||
print STDERR "Initializing parent: $ref_id\n";
|
||||
print STDERR "Initializing parent: $ref_id\n" unless $::_q > 1;
|
||||
my ($u, $p, $repo_id) = ($new_url, '', $ref_id);
|
||||
if ($u =~ s#^\Q$url\E(/|$)##) {
|
||||
$p = $u;
|
||||
|
||||
@@ -206,8 +206,8 @@ static void parse_pack_header(void)
|
||||
use(sizeof(struct pack_header));
|
||||
}
|
||||
|
||||
static void bad_object(unsigned long offset, const char *format,
|
||||
...) NORETURN __attribute__((format (printf, 2, 3)));
|
||||
static NORETURN void bad_object(unsigned long offset, const char *format,
|
||||
...) __attribute__((format (printf, 2, 3)));
|
||||
|
||||
static void bad_object(unsigned long offset, const char *format, ...)
|
||||
{
|
||||
|
||||
@@ -390,7 +390,9 @@ void show_log(struct rev_info *opt)
|
||||
*/
|
||||
show_reflog_message(opt->reflog_info,
|
||||
opt->commit_format == CMIT_FMT_ONELINE,
|
||||
opt->date_mode);
|
||||
opt->date_mode_explicit ?
|
||||
opt->date_mode :
|
||||
DATE_NORMAL);
|
||||
if (opt->commit_format == CMIT_FMT_ONELINE)
|
||||
return;
|
||||
}
|
||||
|
||||
@@ -1159,8 +1159,10 @@ static int handle_revision_opt(struct rev_info *revs, int argc, const char **arg
|
||||
revs->simplify_history = 0;
|
||||
} else if (!strcmp(arg, "--relative-date")) {
|
||||
revs->date_mode = DATE_RELATIVE;
|
||||
revs->date_mode_explicit = 1;
|
||||
} else if (!strncmp(arg, "--date=", 7)) {
|
||||
revs->date_mode = parse_date_format(arg + 7);
|
||||
revs->date_mode_explicit = 1;
|
||||
} else if (!strcmp(arg, "--log-size")) {
|
||||
revs->show_log_size = 1;
|
||||
}
|
||||
|
||||
@@ -81,7 +81,8 @@ struct rev_info {
|
||||
show_merge:1,
|
||||
abbrev_commit:1,
|
||||
use_terminator:1,
|
||||
missing_newline:1;
|
||||
missing_newline:1,
|
||||
date_mode_explicit:1;
|
||||
enum date_mode date_mode;
|
||||
|
||||
unsigned int abbrev;
|
||||
|
||||
@@ -230,4 +230,16 @@ test_expect_success \
|
||||
'git archive --list outside of a git repo' \
|
||||
'GIT_DIR=some/non-existing/directory git archive --list'
|
||||
|
||||
test_expect_success 'git-archive --prefix=olde-' '
|
||||
git archive --prefix=olde- >h.tar HEAD &&
|
||||
(
|
||||
mkdir h &&
|
||||
cd h &&
|
||||
"$TAR" xf - <../h.tar
|
||||
) &&
|
||||
test -d h/olde-a &&
|
||||
test -d h/olde-a/bin &&
|
||||
test -f h/olde-a/bin/sh
|
||||
'
|
||||
|
||||
test_done
|
||||
|
||||
6
usage.c
6
usage.c
@@ -36,12 +36,12 @@ static void warn_builtin(const char *warn, va_list params)
|
||||
|
||||
/* If we are in a dlopen()ed .so write to a global variable would segfault
|
||||
* (ugh), so keep things static. */
|
||||
static void (*usage_routine)(const char *err) NORETURN = usage_builtin;
|
||||
static void (*die_routine)(const char *err, va_list params) NORETURN = die_builtin;
|
||||
static NORETURN_PTR void (*usage_routine)(const char *err) = usage_builtin;
|
||||
static NORETURN_PTR void (*die_routine)(const char *err, va_list params) = die_builtin;
|
||||
static void (*error_routine)(const char *err, va_list params) = error_builtin;
|
||||
static void (*warn_routine)(const char *err, va_list params) = warn_builtin;
|
||||
|
||||
void set_die_routine(void (*routine)(const char *err, va_list params) NORETURN)
|
||||
void set_die_routine(NORETURN_PTR void (*routine)(const char *err, va_list params))
|
||||
{
|
||||
die_routine = routine;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user