summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--Documentation/git-commit.txt3
-rw-r--r--cache.h1
-rwxr-xr-xgit-remote.perl7
-rw-r--r--sha1_file.c6
-rw-r--r--t/lib-git-svn.sh7
-rwxr-xr-xt/t9104-git-svn-follow-parent.sh1
-rw-r--r--write_or_die.c12
-rw-r--r--wt-status.c2
8 files changed, 18 insertions, 21 deletions
diff --git a/Documentation/git-commit.txt b/Documentation/git-commit.txt
index cb081cda89..b4528d72ba 100644
--- a/Documentation/git-commit.txt
+++ b/Documentation/git-commit.txt
@@ -32,7 +32,8 @@ methods:
4. by using the -a switch with the 'commit' command to automatically "add"
changes from all known files i.e. files that have already been committed
- before, and perform the actual commit.
+ before, and to automatically "rm" files that have been
+ removed from the working tree, and perform the actual commit.
The gitlink:git-status[1] command can be used to obtain a
summary of what is included by any of the above for the next
diff --git a/cache.h b/cache.h
index c482c32a03..620b6a4ed4 100644
--- a/cache.h
+++ b/cache.h
@@ -434,7 +434,6 @@ extern char *git_log_output_encoding;
extern int copy_fd(int ifd, int ofd);
extern int read_in_full(int fd, void *buf, size_t count);
-extern void read_or_die(int fd, void *buf, size_t count);
extern int write_in_full(int fd, const void *buf, size_t count);
extern void write_or_die(int fd, const void *buf, size_t count);
extern int write_or_whine(int fd, const void *buf, size_t count, const char *msg);
diff --git a/git-remote.perl b/git-remote.perl
index 059c141b68..fc055b6d95 100755
--- a/git-remote.perl
+++ b/git-remote.perl
@@ -274,4 +274,9 @@ elsif ($ARGV[0] eq 'add') {
}
add_remote($ARGV[1], $ARGV[2]);
}
-
+else {
+ print STDERR "Usage: git remote\n";
+ print STDERR " git remote add <name> <url>\n";
+ print STDERR " git remote show <name>\n";
+ exit(1);
+}
diff --git a/sha1_file.c b/sha1_file.c
index 2a5be53fac..1b1c0f7b4d 100644
--- a/sha1_file.c
+++ b/sha1_file.c
@@ -572,7 +572,8 @@ static void open_packed_git(struct packed_git *p)
die("cannot set FD_CLOEXEC");
/* Verify we recognize this pack file format. */
- read_or_die(p->pack_fd, &hdr, sizeof(hdr));
+ if (read_in_full(p->pack_fd, &hdr, sizeof(hdr)) != sizeof(hdr))
+ die("file %s is far too short to be a packfile", p->pack_name);
if (hdr.hdr_signature != htonl(PACK_SIGNATURE))
die("file %s is not a GIT packfile", p->pack_name);
if (!pack_version_ok(hdr.hdr_version))
@@ -588,7 +589,8 @@ static void open_packed_git(struct packed_git *p)
num_packed_objects(p));
if (lseek(p->pack_fd, p->pack_size - sizeof(sha1), SEEK_SET) == -1)
die("end of packfile %s is unavailable", p->pack_name);
- read_or_die(p->pack_fd, sha1, sizeof(sha1));
+ if (read_in_full(p->pack_fd, sha1, sizeof(sha1)) != sizeof(sha1))
+ die("packfile %s signature is unavailable", p->pack_name);
idx_sha1 = ((unsigned char *)p->index_base) + p->index_size - 40;
if (hashcmp(sha1, idx_sha1))
die("packfile %s does not match index", p->pack_name);
diff --git a/t/lib-git-svn.sh b/t/lib-git-svn.sh
index af42ccc8d1..bb1d7b84bc 100644
--- a/t/lib-git-svn.sh
+++ b/t/lib-git-svn.sh
@@ -25,14 +25,15 @@ perl -w -e "
use SVN::Core;
use SVN::Repos;
\$SVN::Core::VERSION gt '1.1.0' or exit(42);
-SVN::Repos::create('$svnrepo', undef, undef, undef,
- { 'fs-config' => 'fsfs'});
-"
+system(qw/svnadmin create --fs-type fsfs/, '$svnrepo') == 0 or exit(41);
+" >&3 2>&4
x=$?
if test $x -ne 0
then
if test $x -eq 42; then
err='Perl SVN libraries must be >= 1.1.0'
+ elif test $x -eq 41; then
+ err='svnadmin failed to create fsfs repository'
else
err='Perl SVN libraries not found or unusable, skipping test'
fi
diff --git a/t/t9104-git-svn-follow-parent.sh b/t/t9104-git-svn-follow-parent.sh
index 400c21cd49..8d2e2fec39 100755
--- a/t/t9104-git-svn-follow-parent.sh
+++ b/t/t9104-git-svn-follow-parent.sh
@@ -17,6 +17,7 @@ test_expect_success 'initialize repo' "
cd wc &&
echo world >> trunk/readme &&
svn commit -m 'another commit' &&
+ svn up &&
svn mv -m 'rename to thunk' trunk thunk &&
svn up &&
echo goodbye >> thunk/readme &&
diff --git a/write_or_die.c b/write_or_die.c
index 4e8183e93e..046e79d485 100644
--- a/write_or_die.c
+++ b/write_or_die.c
@@ -17,18 +17,6 @@ int read_in_full(int fd, void *buf, size_t count)
return total;
}
-void read_or_die(int fd, void *buf, size_t count)
-{
- ssize_t loaded;
-
- loaded = read_in_full(fd, buf, count);
- if (loaded != count) {
- if (loaded < 0)
- die("read error (%s)", strerror(errno));
- die("read error: end of file");
- }
-}
-
int write_in_full(int fd, const void *buf, size_t count)
{
const char *p = buf;
diff --git a/wt-status.c b/wt-status.c
index daba9a6105..b7250e4310 100644
--- a/wt-status.c
+++ b/wt-status.c
@@ -335,7 +335,7 @@ void wt_status_print(struct wt_status *s)
if (s->amend)
printf("# No changes\n");
else if (s->workdir_dirty)
- printf("no changes added to commit (use \"git add\" and/or \"git commit [-a|-i|-o]\")\n");
+ printf("no changes added to commit (use \"git add\" and/or \"git commit -a\")\n");
else if (s->workdir_untracked)
printf("nothing added to commit but untracked files present (use \"git add\" to track)\n");
else if (s->is_initial)