File tree Expand file tree Collapse file tree 5 files changed +39
-2
lines changed
Expand file tree Collapse file tree 5 files changed +39
-2
lines changed Original file line number Diff line number Diff line change @@ -7,7 +7,7 @@ git-add - Add files to the index file.
77
88SYNOPSIS
99--------
10- 'git-add' [-n] [-v] <file>...
10+ 'git-add' [-n] [-v] [--] <file>...
1111
1212DESCRIPTION
1313-----------
@@ -26,6 +26,11 @@ OPTIONS
2626-v::
2727 Be verbose.
2828
29+ --::
30+ This option can be used to separate command-line options from
31+ the list of files, (useful when filenames might be mistaken
32+ for command-line options).
33+
2934
3035DISCUSSION
3136----------
Original file line number Diff line number Diff line change @@ -43,6 +43,12 @@ to fast forward the remote ref that matches <dst>. If
4343the optional plus `+` is used, the remote ref is updated
4444even if it does not result in a fast forward update.
4545+
46+ Note: If no explicit refspec is found, (that is neither
47+ on the command line nor in any Push line of the
48+ corresponding remotes file---see below), then all the
49+ refs that exist both on the local side and on the remote
50+ side are updated.
51+ +
4652Some short-cut notations are also supported.
4753+
4854* `tag <tag>` means the same as `refs/tags/<tag>:refs/tags/<tag>`.
Original file line number Diff line number Diff line change @@ -14,6 +14,10 @@ while : ; do
1414 -v)
1515 verbose=--verbose
1616 ;;
17+ --)
18+ shift
19+ break
20+ ;;
1721 -* )
1822 usage
1923 ;;
Original file line number Diff line number Diff line change @@ -189,7 +189,7 @@ my @month_names = qw(Jan Feb Mar Apr May Jun Jul Aug Sep Oct Nov Dec);
189189sub show_date {
190190 my ($time, $tz) = @_;
191191 my $minutes = abs($tz);
192- $minutes = ($minutes / 100) * 60 + ($minutes % 100);
192+ $minutes = int ($minutes / 100) * 60 + ($minutes % 100);
193193 if ($tz < 0) {
194194 $minutes = -$minutes;
195195 }
Original file line number Diff line number Diff line change 1+ #! /bin/sh
2+ #
3+ # Copyright (c) 2006 Carl D. Worth
4+ #
5+
6+ test_description=' Test of git-add, including the -- option.'
7+
8+ . ./test-lib.sh
9+
10+ test_expect_success \
11+ ' Test of git-add' \
12+ ' touch foo && git-add foo'
13+
14+ test_expect_success \
15+ ' Post-check that foo is in the index' \
16+ ' git-ls-files foo | grep foo'
17+
18+ test_expect_success \
19+ ' Test that "git-add -- -q" works' \
20+ ' touch -- -q && git-add -- -q'
21+
22+ test_done
You can’t perform that action at this time.
0 commit comments