Граф коммитов

31079 Коммитов

Автор SHA1 Сообщение Дата
Jeff King 823ab40fd4 add global --literal-pathspecs option
Git takes pathspec arguments in many places to limit the
scope of an operation. These pathspecs are treated not as
literal paths, but as glob patterns that can be fed to
fnmatch. When a user is giving a specific pattern, this is a
nice feature.

However, when programatically providing pathspecs, it can be
a nuisance. For example, to find the latest revision which
modified "$foo", one can use "git rev-list -- $foo". But if
"$foo" contains glob characters (e.g., "f*"), it will
erroneously match more entries than desired. The caller
needs to quote the characters in $foo, and even then, the
results may not be exactly the same as with a literal
pathspec. For instance, the depth checks in
match_pathspec_depth do not kick in if we match via fnmatch.

This patch introduces a global command-line option (i.e.,
one for "git" itself, not for specific commands) to turn
this behavior off. It also has a matching environment
variable, which can make it easier if you are a script or
porcelain interface that is going to issue many such
commands.

This option cannot turn off globbing for particular
pathspecs. That could eventually be done with a ":(noglob)"
magic pathspec prefix. However, that level of granularity is
more cumbersome to use for many cases, and doing ":(noglob)"
right would mean converting the whole codebase to use
"struct pathspec", as the usual "const char **pathspec"
cannot represent extra per-item flags.

Signed-off-by: Jeff King <peff@peff.net>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2012-12-19 14:58:59 -08:00
Thomas Ackermann 18499ba694 Remove duplicate entry in ./Documentation/Makefile
Signed-off-by: Thomas Ackermann <th.acker@arcor.de>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2012-12-19 10:24:23 -08:00
Junio C Hamano 252f922b19 Merge branch 'maint'
* maint:
  t7004: do not create unneeded gpghome/gpg.conf when GPG is not used
2012-12-18 15:35:01 -08:00
Junio C Hamano 086cb91153 t7004: do not create unneeded gpghome/gpg.conf when GPG is not used
These tests themselves are properly protected by the GPG
prerequisite, but one of the set-up steps outside the
test_expect_success block unconditionally assumed that there is a
gpghome/ directory, which is not true if GPG is not being used.

It may be a good idea to move the whole set-up steps in the test but
that is a follow-up topic.

Signed-off-by: Junio C Hamano <gitster@pobox.com>
2012-12-18 11:26:24 -08:00
Junio C Hamano b7cd0c9b69 Sync with 'maint' 2012-12-18 10:51:22 -08:00
Junio C Hamano 8e8c8817cd Merge branch 'jk/pickaxe-textconv' into maint
"git log -p -S<string>" now looks for the <string> after applying
the textconv filter (if defined); earlier it inspected the contents
of the blobs without filtering.
2012-12-18 10:50:07 -08:00
Sitaram Chamarty 31d66aa408 clarify -M without % symbol in diff-options
Signed-off-by: Sitaram Chamarty <sitaramc@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2012-12-18 08:46:15 -08:00
Junio C Hamano 2e900297db Git 1.8.1-rc2
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2012-12-15 11:19:02 -08:00
Thomas Ackermann fef11965da Renumber list in api-command.txt
Start list with 1 instead of 0; ASCIIDOC will renumber it anyway.

Signed-off-by: Thomas Ackermann <th.acker@arcor.de>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2012-12-15 10:46:47 -08:00
Jeff King bfae342c97 remote-testsvn: fix unitialized variable
In remote-test-svn, there is a parse_rev_note function to
parse lines of the form "Revision-number" from notes. If it
finds such a line and parses it, it returns 0, copying the
value into a "struct rev_note". If it finds an entry that is
garbled or out of range, it returns -1 to signal an error.

However, if it does not find any "Revision-number" line at
all, it returns success but does not put anything into the
rev_note. So upon a successful return, the rev_note may or
may not be initialized, and the caller has no way of
knowing.

gcc does not usually catch the use of the unitialized
variable because the conditional assignment happens in a
separate function from the point of use. However, when
compiling with -O3, gcc will inline parse_rev_note and
notice the problem.

We can fix it by returning "-1" when no note is found (so on
a zero return, we always found a valid value).

Signed-off-by: Jeff King <peff@peff.net>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2012-12-15 10:43:11 -08:00
Junio C Hamano 790c83cda9 Merge branch 'maint' 2012-12-13 11:13:56 -08:00
Matthew Daley bdd478d620 Fix sizeof usage in get_permutations
Currently it gets the size of an otherwise unrelated, unused variable
instead of the expected struct size.

Signed-off-by: Matthew Daley <mattjd@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2012-12-13 11:13:44 -08:00
Junio C Hamano 538d1239a8 Merge branch 'mh/doc-remote-helpers'
* mh/doc-remote-helpers:
  git-remote-helpers.txt: clarify options & ref list attributes
  git-remote-helpers.txt: clarify command <-> capability correspondences
  git-remote-helpers.txt: rearrange description of capabilities
  git-remote-helpers.txt: minor grammar fix
  git-remote-helpers.txt: document missing capabilities
  git-remote-helpers.txt: document invocation before input format
2012-12-13 11:00:15 -08:00
Manlio Perillo 75940a001a git.txt: add missing info about --git-dir command-line option
Unlike other environment variables (e.g. GIT_WORK_TREE,	GIT_NAMESPACE),
the Documentation/git.txt file did not mention that the GIT_DIR
environment variable can also be set using the --git-dir command line
option.

Signed-off-by: Manlio Perillo <manlio.perillo@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2012-12-13 10:54:01 -08:00
Junio C Hamano 24a62db7bb git(1): show link to contributor summary page
We earlier removed a link to list of contributors that pointed to a
defunct page; let's use a working one from Ohloh.net to replace it
instead.

Signed-off-by: Junio C Hamano <gitster@pobox.com>
2012-12-12 11:58:17 -08:00
Junio C Hamano 4881616c1a Merge branch 'so/prompt-command'
* so/prompt-command:
  git-prompt.sh: update PROMPT_COMMAND documentation
2012-12-12 11:08:13 -08:00
Junio C Hamano de29a7ac0e git-prompt.sh: update PROMPT_COMMAND documentation
The description of __git_ps1 function operating in two-arg mode was
not very clear.  It said "set PROMPT_COMMAND=__git_ps1" which is not
the right usage for this mode, followed by "To customize the prompt,
do this", giving a false impression that those who do not want to
customize it can get away with no-arg form, which was incorrect.

Make it clear that this mode always takes two arguments, pre and
post, with an example.

The straight-forward one should be listed as the primary usage, and
the confusing one should be an alternate for advanced users.  Swap
the order of these two.

Acked-by: Simon Oosthoek <s.oosthoek@xs4all.nl>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2012-12-12 11:07:48 -08:00
Marc Khouzam 75ed918bda Add file completion to tcsh git completion.
For bash completion, the option '-o bashdefault' is used to indicate
that when no other choices are available, file completion should be
performed.  Since this option is not available in tcsh, no file
completion is ever performed.  Therefore, commands like 'git add ',
'git send-email ', etc, require the user to manually type out
the file name.  This can be quite annoying.

To improve the user experience we try to simulate file completion
directly in this script (although not perfectly).

The known issues with the file completion simulation are:
- Possible completions are shown with their directory prefix.
- Completions containing shell variables are not handled.
- Completions with ~ as the first character are not handled.

Signed-off-by: Marc Khouzam <marc.khouzam@ericsson.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2012-12-11 21:49:25 -08:00
Junio C Hamano 7348159380 Merge branch 'ef/mingw-rmdir'
MinGW has a workaround when rmdir unnecessarily fails to retry with
a prompt, but the logic was kicking in when the rmdir failed with
ENOTEMPTY, i.e. was expected to fail and there is no point retrying.

* ef/mingw-rmdir:
  mingw_rmdir: do not prompt for retry when non-empty
2012-12-11 15:51:14 -08:00
Junio C Hamano 1bfe99ed36 Merge branch 'ef/mingw-tty-getpass'
Update getpass() emulation for MinGW.

* ef/mingw-tty-getpass:
  mingw: get rid of getpass implementation
  mingw: reuse tty-version of git_terminal_prompt
  compat/terminal: separate input and output handles
  compat/terminal: factor out echo-disabling
  mingw: make fgetc raise SIGINT if apropriate
  mingw: correct exit-code for SIGALRM's SIG_DFL
2012-12-11 15:51:09 -08:00
Junio C Hamano f993e2e15d Merge branch 'maint'
* maint:
  git-prompt: Document GIT_PS1_DESCRIBE_STYLE
2012-12-11 15:50:10 -08:00
Anders Kaseorg 50b03b04c0 git-prompt: Document GIT_PS1_DESCRIBE_STYLE
GIT_PS1_DESCRIBE_STYLE was introduced in v1.6.3.2~35.  Document it in the
header comments.

Signed-off-by: Anders Kaseorg <andersk@mit.edu>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2012-12-11 15:36:13 -08:00
Junio C Hamano 7e0651a630 Sync with 1.8.0.2
* maint:
  Git 1.8.0.2
  Documentation/git-stash.txt: add a missing verb
  git(1): remove a defunct link to "list of authors"

Signed-off-by: Junio C Hamano <gitster@pobox.com>
2012-12-10 13:07:12 -08:00
Junio C Hamano 3e53891f85 Git 1.8.0.2
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2012-12-10 13:05:47 -08:00
Stefano Lattarini dd6fc7ca91 Makefile: whitespace style fixes in macro definitions
Consistently use a single space before and after the "=" (or ":=", "+=",
etc.) in assignments to make macros.  Granted, this was not a big deal,
but I did find the needless inconsistency quite distracting.

Signed-off-by: Stefano Lattarini <stefano.lattarini@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2012-12-10 08:35:56 -08:00
Erik Faye-Lund a83b2b578c mingw_rmdir: do not prompt for retry when non-empty
in ab1a11be ("mingw_rmdir: set errno=ENOTEMPTY when appropriate"),
a check was added to prevent us from retrying to delete a directory
that is both in use and non-empty.

However, this logic was slightly flawed; since we didn't return
immediately, we end up falling out of the retry-loop, but right into
the prompting-loop.

Fix this by setting errno, and guarding the prompting-loop with an
errno-check.

Signed-off-by: Erik Faye-Lund <kusmabite@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2012-12-10 08:23:53 -08:00
Sébastien Loriot 5badfdcf88 Documentation/git-stash.txt: add a missing verb
Signed-off-by: Sébastien Loriot <sloriot.ml@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2012-12-10 08:18:25 -08:00
Junio C Hamano ac046c0e8c git(1): remove a defunct link to "list of authors"
The linked page has not been showing the promised "more complete
list" for more than 6 months by now, and nobody has resurrected
the list there nor elsewhere since then.

Signed-off-by: Junio C Hamano <gitster@pobox.com>
2012-12-09 00:33:04 -08:00
Junio C Hamano 816f290752 Git 1.8.1-rc1
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2012-12-07 15:17:21 -08:00
Junio C Hamano 00704e4ba5 Documentation/diff-config: work around AsciiDoc misfortune
The line that happens to begin with indent followed by "3. " was
interpreted as if it was an enumerated list; just wrap the lines
differently to work it around for now.

Signed-off-by: Junio C Hamano <gitster@pobox.com>
2012-12-07 15:15:59 -08:00
Junio C Hamano 5a2c11b6db Merge branch 'maint'
* maint:
  Update draft release notes to 1.8.0.2
2012-12-07 14:16:52 -08:00
Junio C Hamano a859d3ee57 Update draft release notes to 1.8.0.2
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2012-12-07 14:16:38 -08:00
Junio C Hamano f07f4134ae Merge branch 'jc/doc-push-satellite' into maint
* jc/doc-push-satellite:
  Documentation/git-push.txt: clarify the "push from satellite" workflow
2012-12-07 14:11:21 -08:00
Junio C Hamano fff26a6805 Merge branch 'jc/same-encoding' into maint
Various codepaths checked if two encoding names are the same using
ad-hoc code and some of them ended up asking iconv() to convert
between "utf8" and "UTF-8".  The former is not a valid way to spell
the encoding name, but often people use it by mistake, and we
equated them in some but not all codepaths. Introduce a new helper
function to make these codepaths consistent.

* jc/same-encoding:
  reencode_string(): introduce and use same_encoding()
2012-12-07 14:10:56 -08:00
Junio C Hamano 6a402843c2 Merge branch 'lt/diff-stat-show-0-lines' into maint
"git diff --stat" miscounted the total number of changed lines when
binary files were involved and hidden beyond --stat-count.  It also
miscounted the total number of changed files when there were
unmerged paths.

* lt/diff-stat-show-0-lines:
  t4049: refocus tests
  diff --shortstat: do not count "unmerged" entries
  diff --stat: do not count "unmerged" entries
  diff --stat: move the "total count" logic to the last loop
  diff --stat: use "file" temporary variable to refer to data->files[i]
  diff --stat: status of unmodified pair in diff-q is not zero
  test: add failing tests for "diff --stat" to t4049
  Fix "git diff --stat" for interesting - but empty - file changes
2012-12-07 14:10:17 -08:00
Max Horn 9ec8bcda60 git-remote-helpers.txt: clarify options & ref list attributes
The documentation was misleading in that it gave the impression that
'for-push' could be used as a ref attribute in the output of the
'list' command. That is wrong.

Also, explicitly point out the connection between the commands
'list' and 'options' on the one hand, and the sections
'REF LIST ATTRIBUTES' and 'OPTIONS' on the other hand.

Signed-off-by: Max Horn <max@quendi.de>
Acked-by: Sverre Rabbelier <srabbelier@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2012-12-07 13:54:15 -08:00
Max Horn 754cb1aeba git-remote-helpers.txt: clarify command <-> capability correspondences
In particular, document 'list for-push' separately from 'list', as
the former needs only be supported for the push/export
capabilities, and the latter only for fetch/import. Indeed, a
hypothetically 'push-only' helper would only need to support the
former, not the latter.

Signed-off-by: Max Horn <max@quendi.de>
Acked-by: Sverre Rabbelier <srabbelier@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2012-12-07 13:54:15 -08:00
Max Horn 0673bb28d0 git-remote-helpers.txt: rearrange description of capabilities
This also remove some duplication in the descriptions
(e.g. refspec was explained twice with similar level of detail).

Signed-off-by: Max Horn <max@quendi.de>
Acked-by: Sverre Rabbelier <srabbelier@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2012-12-07 13:54:15 -08:00
Max Horn b20c457a39 git-remote-helpers.txt: minor grammar fix
Signed-off-by: Max Horn <max@quendi.de>
Acked-by: Sverre Rabbelier <srabbelier@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2012-12-07 13:54:15 -08:00
Max Horn b4b106e5a5 git-remote-helpers.txt: document missing capabilities
Specifically, document the 'export' and '(im|ex)port-marks'
capabilities as well as the export command, which were
undocumented (but in active use).

Signed-off-by: Max Horn <max@quendi.de>
Acked-by: Sverre Rabbelier <srabbelier@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2012-12-07 13:54:15 -08:00
Max Horn f829a9eae6 git-remote-helpers.txt: document invocation before input format
In the distant past, the order things were documented was
'Invocation', 'Commands', 'Capabilities', ...

Then it was decided that before giving a list of Commands, there
should be an overall description of the 'Input format', which was
a wise decision. However, this description was put as the very
first thing, with the rationale that any implementor would want
to know that first.

However, it seems an implementor would actually first need to
know how the remote helper will be invoked, so moving
'Invocation' to the front again seems logical. Moreover, we now
don't switch from discussing the input format to the invocation
style and then back to input related stuff.

Signed-off-by: Max Horn <max@quendi.de>
Acked-by: Sverre Rabbelier <srabbelier@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2012-12-07 13:54:14 -08:00
Junio C Hamano feeb42e306 Merge branch 'master' of git://github.com/git-l10n/git-po
* 'master' of git://github.com/git-l10n/git-po:
  l10n: de.po: translate 22 new messages
  l10n: de.po: translate 825 new messages
  l10n: Update Swedish translation (1979t0f0u)
  l10n: vi.po: update to git-v1.8.0.1-347-gf94c3
  l10n: Update git.pot (5 new, 1 removed messages)
2012-12-07 10:32:22 -08:00
Junio C Hamano 7e2ef8b049 Merge branch 'rr/t4041-cleanup'
* rr/t4041-cleanup:
  t4041 (diff-submodule-option): modernize style
  t4041 (diff-submodule-option): rewrite add_file() routine
  t4041 (diff-submodule-option): parse digests sensibly
  t4041 (diff-submodule-option): don't hardcode SHA-1 in expected outputs
2012-12-07 10:31:19 -08:00
Jiang Xin 167e2f9115 Merge branch git://github.com/ralfth/git-po-de
* 'rt/de-l10n-updates-for-1.8.1' of git://github.com/ralfth/git-po-de:
  l10n: de.po: translate 22 new messages
  l10n: de.po: translate 825 new messages

Signed-off-by: Jiang Xin <worldhello.net@gmail.com>
2012-12-07 17:30:02 +08:00
Ralf Thielow df264e4e52 l10n: de.po: translate 22 new messages
Translate 22 new messages came from git.pot
updates in 9306b5b (l10n: Update git.pot (3 new,
6 removed messages)), fe52cd6 (l10n: Update git.pot
(14 new, 3 removed messages)) and f9472e3
(l10n: Update git.pot (5 new, 1 removed messages)).

Signed-off-by: Ralf Thielow <ralf.thielow@gmail.com>
Reviewed-by: Michael J Gruber <git@drmicha.warpmail.net>
2012-12-06 07:32:39 +01:00
Ralf Thielow 6d0e699ddb l10n: de.po: translate 825 new messages
Translate 825 new messages came from git.pot update in
cc76011 ("l10n: Update git.pot (825 new, 24 removed messages)").

Signed-off-by: Ralf Thielow <ralf.thielow@gmail.com>
Reviewed-by: Thomas Rast <trast@student.ethz.ch>
Helped-by: Michael J Gruber <git@drmicha.warpmail.net>
2012-12-06 07:31:52 +01:00
Junio C Hamano fb4c62235f Merge branch 'mm/status-push-pull-advise'
* mm/status-push-pull-advise:
  document that statusHints affects git checkout
2012-12-04 13:34:10 -08:00
Erik Faye-Lund f7a4cea25e mingw: get rid of getpass implementation
There's no remaining call-sites, and as pointed out in the
previous commit message, it's not quite ideal. So let's just
lose it.

Signed-off-by: Erik Faye-Lund <kusmabite@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2012-12-04 08:03:42 -08:00
Erik Faye-Lund afb43561b8 mingw: reuse tty-version of git_terminal_prompt
The getpass-implementation we use on Windows isn't at all ideal;
it works in raw-mode (as opposed to cooked mode), and as a result
does not deal correcly with deletion, arrow-keys etc.

Instead, use cooked mode to read a line at the time, allowing the
C run-time to process the input properly.

Since we set files to be opened in binary-mode by default on
Windows, introduce a FORCE_TEXT macro that expands to the "t"
modifier that forces the terminal to be opened in text-mode so we
do not have to deal with CRLF issues.

Signed-off-by: Erik Faye-Lund <kusmabite@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2012-12-04 08:03:08 -08:00
Erik Faye-Lund 67fe735653 compat/terminal: separate input and output handles
On Windows, the terminal cannot be opened in read-write mode, so
we need distinct pairs for reading and writing. Since this works
fine on other platforms as well, always open them in pairs.

Signed-off-by: Erik Faye-Lund <kusmabite@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2012-12-04 08:02:55 -08:00