Merge branch 'se/http' into next
* se/http: Remove possible segfault in http-fetch. Install git builtins into gitexecdir rather than bindir. Change GIT-VERSION-GEN to call git commands with "git" not "git-". cvsimport: replace anonymous sub ref with a normal sub cvsimport: minor fixups Problem: 'trap...exit' causes error message when /bin/sh is ash. Avoid segfault in diff --stat rename output. Tutorial #2: broken link fix. git help: remove whatchanged from list of common commands
This commit is contained in:
commit
4d8df3feb8
@ -375,7 +375,7 @@ What next?
|
|||||||
|
|
||||||
At this point you should know everything necessary to read the man
|
At this point you should know everything necessary to read the man
|
||||||
pages for any of the git commands; one good place to start would be
|
pages for any of the git commands; one good place to start would be
|
||||||
with the commands mentioned in link:everday.html[Everyday git]. You
|
with the commands mentioned in link:everyday.html[Everyday git]. You
|
||||||
should be able to find any unknown jargon in the
|
should be able to find any unknown jargon in the
|
||||||
link:glossary.html[Glosssay].
|
link:glossary.html[Glosssay].
|
||||||
|
|
||||||
|
@ -5,7 +5,7 @@ DEF_VER=v1.3.GIT
|
|||||||
|
|
||||||
# First try git-describe, then see if there is a version file
|
# First try git-describe, then see if there is a version file
|
||||||
# (included in release tarballs), then default
|
# (included in release tarballs), then default
|
||||||
if VN=$(git-describe --abbrev=4 HEAD 2>/dev/null); then
|
if VN=$(git describe --abbrev=4 HEAD 2>/dev/null); then
|
||||||
VN=$(echo "$VN" | sed -e 's/-/./g');
|
VN=$(echo "$VN" | sed -e 's/-/./g');
|
||||||
elif test -f version
|
elif test -f version
|
||||||
then
|
then
|
||||||
@ -16,7 +16,7 @@ fi
|
|||||||
|
|
||||||
VN=$(expr "$VN" : v*'\(.*\)')
|
VN=$(expr "$VN" : v*'\(.*\)')
|
||||||
|
|
||||||
dirty=$(sh -c 'git-diff-index --name-only HEAD' 2>/dev/null) || dirty=
|
dirty=$(sh -c 'git diff-index --name-only HEAD' 2>/dev/null) || dirty=
|
||||||
case "$dirty" in
|
case "$dirty" in
|
||||||
'')
|
'')
|
||||||
;;
|
;;
|
||||||
|
9
Makefile
9
Makefile
@ -631,7 +631,14 @@ install: all
|
|||||||
$(MAKE) -C templates install
|
$(MAKE) -C templates install
|
||||||
$(INSTALL) -d -m755 '$(DESTDIR_SQ)$(GIT_PYTHON_DIR_SQ)'
|
$(INSTALL) -d -m755 '$(DESTDIR_SQ)$(GIT_PYTHON_DIR_SQ)'
|
||||||
$(INSTALL) $(PYMODULES) '$(DESTDIR_SQ)$(GIT_PYTHON_DIR_SQ)'
|
$(INSTALL) $(PYMODULES) '$(DESTDIR_SQ)$(GIT_PYTHON_DIR_SQ)'
|
||||||
$(foreach p,$(BUILT_INS), rm -f '$(DESTDIR_SQ)$(bindir_SQ)/$p' && ln '$(DESTDIR_SQ)$(bindir_SQ)/git$X' '$(DESTDIR_SQ)$(bindir_SQ)/$p' ;)
|
if test 'z$(bindir_SQ)' != 'z$(gitexecdir_SQ)'; \
|
||||||
|
then \
|
||||||
|
ln -f '$(DESTDIR_SQ)$(bindir_SQ)/git$X' \
|
||||||
|
'$(DESTDIR_SQ)$(gitexecdir_SQ)/git$X' || \
|
||||||
|
cp '$(DESTDIR_SQ)$(bindir_SQ)/git$X' \
|
||||||
|
'$(DESTDIR_SQ)$(gitexecdir_SQ)/git$X'; \
|
||||||
|
fi
|
||||||
|
$(foreach p,$(BUILT_INS), rm -f '$(DESTDIR_SQ)$(gitexecdir_SQ)/$p' && ln '$(DESTDIR_SQ)$(gitexecdir_SQ)/git$X' '$(DESTDIR_SQ)$(gitexecdir_SQ)/$p' ;)
|
||||||
|
|
||||||
install-doc:
|
install-doc:
|
||||||
$(MAKE) -C Documentation install
|
$(MAKE) -C Documentation install
|
||||||
|
2
diff.c
2
diff.c
@ -237,7 +237,7 @@ static char *pprint_rename(const char *a, const char *b)
|
|||||||
if (a_midlen < 0) a_midlen = 0;
|
if (a_midlen < 0) a_midlen = 0;
|
||||||
if (b_midlen < 0) b_midlen = 0;
|
if (b_midlen < 0) b_midlen = 0;
|
||||||
|
|
||||||
name = xmalloc(len_a + len_b - pfx_length - sfx_length + 7);
|
name = xmalloc(pfx_length + a_midlen + b_midlen + sfx_length + 7);
|
||||||
sprintf(name, "%.*s{%.*s => %.*s}%s",
|
sprintf(name, "%.*s{%.*s => %.*s}%s",
|
||||||
pfx_length, a,
|
pfx_length, a,
|
||||||
a_midlen, a + pfx_length,
|
a_midlen, a + pfx_length,
|
||||||
|
@ -37,7 +37,6 @@ show-branch
|
|||||||
status
|
status
|
||||||
tag
|
tag
|
||||||
verify-tag
|
verify-tag
|
||||||
whatchanged
|
|
||||||
EOF
|
EOF
|
||||||
while read cmd
|
while read cmd
|
||||||
do
|
do
|
||||||
|
@ -199,7 +199,7 @@ dir="$2"
|
|||||||
[ -e "$dir" ] && echo "$dir already exists." && usage
|
[ -e "$dir" ] && echo "$dir already exists." && usage
|
||||||
mkdir -p "$dir" &&
|
mkdir -p "$dir" &&
|
||||||
D=$(cd "$dir" && pwd) &&
|
D=$(cd "$dir" && pwd) &&
|
||||||
trap 'err=$?; cd ..; rm -r "$D"; exit $err' exit
|
trap 'err=$?; cd ..; rm -r "$D"; exit $err' 0
|
||||||
case "$bare" in
|
case "$bare" in
|
||||||
yes) GIT_DIR="$D" ;;
|
yes) GIT_DIR="$D" ;;
|
||||||
*) GIT_DIR="$D/.git" ;;
|
*) GIT_DIR="$D/.git" ;;
|
||||||
@ -407,5 +407,5 @@ Pull: refs/heads/$head_points_at:$origin_track" &&
|
|||||||
fi
|
fi
|
||||||
rm -f "$GIT_DIR/CLONE_HEAD" "$GIT_DIR/REMOTE_HEAD"
|
rm -f "$GIT_DIR/CLONE_HEAD" "$GIT_DIR/REMOTE_HEAD"
|
||||||
|
|
||||||
trap - exit
|
trap - 0
|
||||||
|
|
||||||
|
@ -563,7 +563,7 @@ my $state = 0;
|
|||||||
|
|
||||||
my($patchset,$date,$author_name,$author_email,$branch,$ancestor,$tag,$logmsg);
|
my($patchset,$date,$author_name,$author_email,$branch,$ancestor,$tag,$logmsg);
|
||||||
my(@old,@new,@skipped);
|
my(@old,@new,@skipped);
|
||||||
my $commit = sub {
|
sub commit {
|
||||||
my $pid;
|
my $pid;
|
||||||
while(@old) {
|
while(@old) {
|
||||||
my @o2;
|
my @o2;
|
||||||
@ -650,6 +650,8 @@ my $commit = sub {
|
|||||||
"GIT_COMMITTER_DATE=".strftime("+0000 %Y-%m-%d %H:%M:%S",gmtime($date)),
|
"GIT_COMMITTER_DATE=".strftime("+0000 %Y-%m-%d %H:%M:%S",gmtime($date)),
|
||||||
"git-commit-tree", $tree,@par);
|
"git-commit-tree", $tree,@par);
|
||||||
die "Cannot exec git-commit-tree: $!\n";
|
die "Cannot exec git-commit-tree: $!\n";
|
||||||
|
|
||||||
|
close OUT;
|
||||||
}
|
}
|
||||||
$pw->writer();
|
$pw->writer();
|
||||||
$pr->reader();
|
$pr->reader();
|
||||||
@ -661,6 +663,7 @@ my $commit = sub {
|
|||||||
if (@skipped) {
|
if (@skipped) {
|
||||||
$logmsg .= "\n\n\nSKIPPED:\n\t";
|
$logmsg .= "\n\n\nSKIPPED:\n\t";
|
||||||
$logmsg .= join("\n\t", @skipped) . "\n";
|
$logmsg .= join("\n\t", @skipped) . "\n";
|
||||||
|
@skipped = ();
|
||||||
}
|
}
|
||||||
|
|
||||||
print $pw "$logmsg\n"
|
print $pw "$logmsg\n"
|
||||||
@ -849,7 +852,7 @@ while(<CVS>) {
|
|||||||
} elsif($state == 9 and /^\s*$/) {
|
} elsif($state == 9 and /^\s*$/) {
|
||||||
$state = 10;
|
$state = 10;
|
||||||
} elsif(($state == 9 or $state == 10) and /^-+$/) {
|
} elsif(($state == 9 or $state == 10) and /^-+$/) {
|
||||||
&$commit();
|
commit();
|
||||||
$state = 1;
|
$state = 1;
|
||||||
} elsif($state == 11 and /^-+$/) {
|
} elsif($state == 11 and /^-+$/) {
|
||||||
$state = 1;
|
$state = 1;
|
||||||
@ -859,7 +862,7 @@ while(<CVS>) {
|
|||||||
print "* UNKNOWN LINE * $_\n";
|
print "* UNKNOWN LINE * $_\n";
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
&$commit() if $branch and $state != 11;
|
commit() if $branch and $state != 11;
|
||||||
|
|
||||||
unlink($git_index);
|
unlink($git_index);
|
||||||
|
|
||||||
|
@ -1269,10 +1269,10 @@ int main(int argc, char **argv)
|
|||||||
if (pull(commit_id))
|
if (pull(commit_id))
|
||||||
rc = 1;
|
rc = 1;
|
||||||
|
|
||||||
curl_slist_free_all(no_pragma_header);
|
|
||||||
|
|
||||||
http_cleanup();
|
http_cleanup();
|
||||||
|
|
||||||
|
curl_slist_free_all(no_pragma_header);
|
||||||
|
|
||||||
if (corrupt_object_found) {
|
if (corrupt_object_found) {
|
||||||
fprintf(stderr,
|
fprintf(stderr,
|
||||||
"Some loose object were found to be corrupt, but they might be just\n"
|
"Some loose object were found to be corrupt, but they might be just\n"
|
||||||
|
Loading…
Reference in New Issue
Block a user