summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--Documentation/tutorial-2.txt2
-rwxr-xr-xGIT-VERSION-GEN4
-rw-r--r--Makefile9
-rw-r--r--diff.c2
-rwxr-xr-xgenerate-cmdlist.sh1
-rwxr-xr-xgit-clone.sh4
-rwxr-xr-xgit-cvsimport.perl9
-rw-r--r--http-fetch.c4
8 files changed, 22 insertions, 13 deletions
diff --git a/Documentation/tutorial-2.txt b/Documentation/tutorial-2.txt
index 7de91aa735..08d3453e5c 100644
--- a/Documentation/tutorial-2.txt
+++ b/Documentation/tutorial-2.txt
@@ -375,7 +375,7 @@ What next?
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
-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
link:glossary.html[Glosssay].
diff --git a/GIT-VERSION-GEN b/GIT-VERSION-GEN
index 7fcefcd7c4..a461518cde 100755
--- a/GIT-VERSION-GEN
+++ b/GIT-VERSION-GEN
@@ -5,7 +5,7 @@ DEF_VER=v1.3.GIT
# First try git-describe, then see if there is a version file
# (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');
elif test -f version
then
@@ -16,7 +16,7 @@ fi
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
'')
;;
diff --git a/Makefile b/Makefile
index 5bf820c82b..677bc13344 100644
--- a/Makefile
+++ b/Makefile
@@ -631,7 +631,14 @@ install: all
$(MAKE) -C templates install
$(INSTALL) -d -m755 '$(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:
$(MAKE) -C Documentation install
diff --git a/diff.c b/diff.c
index 7f35e595c9..a7bb9b95bd 100644
--- a/diff.c
+++ b/diff.c
@@ -237,7 +237,7 @@ static char *pprint_rename(const char *a, const char *b)
if (a_midlen < 0) a_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",
pfx_length, a,
a_midlen, a + pfx_length,
diff --git a/generate-cmdlist.sh b/generate-cmdlist.sh
index 6c59dbd68f..ec1eda20de 100755
--- a/generate-cmdlist.sh
+++ b/generate-cmdlist.sh
@@ -37,7 +37,6 @@ show-branch
status
tag
verify-tag
-whatchanged
EOF
while read cmd
do
diff --git a/git-clone.sh b/git-clone.sh
index 227245c865..d96894d4c2 100755
--- a/git-clone.sh
+++ b/git-clone.sh
@@ -199,7 +199,7 @@ dir="$2"
[ -e "$dir" ] && echo "$dir already exists." && usage
mkdir -p "$dir" &&
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
yes) GIT_DIR="$D" ;;
*) GIT_DIR="$D/.git" ;;
@@ -407,5 +407,5 @@ Pull: refs/heads/$head_points_at:$origin_track" &&
fi
rm -f "$GIT_DIR/CLONE_HEAD" "$GIT_DIR/REMOTE_HEAD"
-trap - exit
+trap - 0
diff --git a/git-cvsimport.perl b/git-cvsimport.perl
index 8c707f2c66..d257e668d6 100755
--- a/git-cvsimport.perl
+++ b/git-cvsimport.perl
@@ -563,7 +563,7 @@ my $state = 0;
my($patchset,$date,$author_name,$author_email,$branch,$ancestor,$tag,$logmsg);
my(@old,@new,@skipped);
-my $commit = sub {
+sub commit {
my $pid;
while(@old) {
my @o2;
@@ -650,6 +650,8 @@ my $commit = sub {
"GIT_COMMITTER_DATE=".strftime("+0000 %Y-%m-%d %H:%M:%S",gmtime($date)),
"git-commit-tree", $tree,@par);
die "Cannot exec git-commit-tree: $!\n";
+
+ close OUT;
}
$pw->writer();
$pr->reader();
@@ -661,6 +663,7 @@ my $commit = sub {
if (@skipped) {
$logmsg .= "\n\n\nSKIPPED:\n\t";
$logmsg .= join("\n\t", @skipped) . "\n";
+ @skipped = ();
}
print $pw "$logmsg\n"
@@ -849,7 +852,7 @@ while(<CVS>) {
} elsif($state == 9 and /^\s*$/) {
$state = 10;
} elsif(($state == 9 or $state == 10) and /^-+$/) {
- &$commit();
+ commit();
$state = 1;
} elsif($state == 11 and /^-+$/) {
$state = 1;
@@ -859,7 +862,7 @@ while(<CVS>) {
print "* UNKNOWN LINE * $_\n";
}
}
-&$commit() if $branch and $state != 11;
+commit() if $branch and $state != 11;
unlink($git_index);
diff --git a/http-fetch.c b/http-fetch.c
index 861644b27e..178f1ee311 100644
--- a/http-fetch.c
+++ b/http-fetch.c
@@ -1269,10 +1269,10 @@ int main(int argc, char **argv)
if (pull(commit_id))
rc = 1;
- curl_slist_free_all(no_pragma_header);
-
http_cleanup();
+ curl_slist_free_all(no_pragma_header);
+
if (corrupt_object_found) {
fprintf(stderr,
"Some loose object were found to be corrupt, but they might be just\n"