summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--Documentation/git-add.txt6
-rw-r--r--Documentation/git-diff.txt11
-rw-r--r--builtin-add.c6
-rwxr-xr-xgitweb/gitweb.perl4
4 files changed, 14 insertions, 13 deletions
diff --git a/Documentation/git-add.txt b/Documentation/git-add.txt
index e5efbc9a4e..2fe7355555 100644
--- a/Documentation/git-add.txt
+++ b/Documentation/git-add.txt
@@ -33,9 +33,9 @@ files have changes that are staged for the next commit.
The 'git add' command will not add ignored files by default. If any
ignored files were explicitly specified on the command line, 'git add'
will fail with a list of ignored files. Ignored files reached by
-directory recursion or filename globbing will be silently ignored.
-The 'add' command can be used to add ignored files with the `-f`
-(force) option.
+directory recursion or filename globbing performed by Git (quote your
+globs before the shell) will be silently ignored. The 'add' command can
+be used to add ignored files with the `-f` (force) option.
Please see gitlink:git-commit[1] for alternative ways to add content to a
commit.
diff --git a/Documentation/git-diff.txt b/Documentation/git-diff.txt
index 68e65324f8..db2eb46a19 100644
--- a/Documentation/git-diff.txt
+++ b/Documentation/git-diff.txt
@@ -53,23 +53,24 @@ forced by --no-index.
one side is omitted, it will have the same effect as
using HEAD instead.
-'git-diff' [--options] <commit>...<commit> [--] [<path>...]::
+'git-diff' [--options] <commit>\...<commit> [--] [<path>...]::
This form is to view the changes on the branch containing
and up to the second <commit>, starting at a common ancestor
- of both <commit>. "git-diff A...B" is equivalent to
+ of both <commit>. "git-diff A\...B" is equivalent to
"git-diff $(git-merge-base A B) B". You can omit any one
of <commit>, which has the same effect as using HEAD instead.
Just in case if you are doing something exotic, it should be
-noted that all of the <commit> in the above description can be
-any <tree-ish>.
+noted that all of the <commit> in the above description, except
+for the last two forms that use ".." notations, can be any
+<tree-ish>.
For a more complete list of ways to spell <commit>, see
"SPECIFYING REVISIONS" section in gitlink:git-rev-parse[1].
However, "diff" is about comparing two _endpoints_, not ranges,
and the range notations ("<commit>..<commit>" and
-"<commit>...<commit>") do not mean a range as defined in the
+"<commit>\...<commit>") do not mean a range as defined in the
"SPECIFYING RANGES" section in gitlink:git-rev-parse[1].
OPTIONS
diff --git a/builtin-add.c b/builtin-add.c
index b08e68831a..105a9f0e1f 100644
--- a/builtin-add.c
+++ b/builtin-add.c
@@ -155,7 +155,7 @@ static int git_add_config(const char *var, const char *value)
static struct lock_file lock_file;
-static const char ignore_warning[] =
+static const char ignore_error[] =
"The following paths are ignored by one of your .gitignore files:\n";
int cmd_add(int argc, const char **argv, const char *prefix)
@@ -250,12 +250,12 @@ int cmd_add(int argc, const char **argv, const char *prefix)
die("index file corrupt");
if (dir.ignored_nr) {
- fprintf(stderr, ignore_warning);
+ fprintf(stderr, ignore_error);
for (i = 0; i < dir.ignored_nr; i++) {
fprintf(stderr, "%s\n", dir.ignored[i]->name);
}
fprintf(stderr, "Use -f if you really want to add them.\n");
- exit(1);
+ die("no files added");
}
for (i = 0; i < dir.nr; i++)
diff --git a/gitweb/gitweb.perl b/gitweb/gitweb.perl
index 18042843d6..b2bae1b250 100755
--- a/gitweb/gitweb.perl
+++ b/gitweb/gitweb.perl
@@ -3419,7 +3419,7 @@ sub git_project_list_body {
"<td>" . $cgi->a({-href => href(project=>$pr->{'path'}, action=>"summary"),
-class => "list", -title => $pr->{'descr_long'}},
esc_html($pr->{'descr'})) . "</td>\n" .
- "<td><i>" . chop_str($pr->{'owner'}, 15) . "</i></td>\n";
+ "<td><i>" . esc_html(chop_str($pr->{'owner'}, 15)) . "</i></td>\n";
print "<td class=\"". age_class($pr->{'age'}) . "\">" .
(defined $pr->{'age_string'} ? $pr->{'age_string'} : "No commits") . "</td>\n" .
"<td class=\"link\">" .
@@ -3795,7 +3795,7 @@ sub git_summary {
print "<div class=\"title\">&nbsp;</div>\n";
print "<table cellspacing=\"0\">\n" .
"<tr><td>description</td><td>" . esc_html($descr) . "</td></tr>\n" .
- "<tr><td>owner</td><td>$owner</td></tr>\n";
+ "<tr><td>owner</td><td>" . esc_html($owner) . "</td></tr>\n";
if (defined $cd{'rfc2822'}) {
print "<tr><td>last change</td><td>$cd{'rfc2822'}</td></tr>\n";
}