Commit graph

42667 commits

Author SHA1 Message Date
Junio C Hamano cca92531e3 Merge branch 'jk/rebase-interative-eval-fix' into maint
Portability enhancement for "rebase -i" to help platforms whose
shell does not like "for i in <empty>" (which is not POSIX-kosher).

* jk/rebase-interative-eval-fix:
  rebase--interactive: avoid empty list in shell for-loop
2016-05-26 13:17:24 -07:00
Junio C Hamano e29300d69f Merge branch 'js/windows-dotgit' into maint
On Windows, .git and optionally any files whose name starts with a
dot are now marked as hidden, with a core.hideDotFiles knob to
customize this behaviour.

* js/windows-dotgit:
  mingw: remove unnecessary definition
  mingw: introduce the 'core.hideDotFiles' setting
2016-05-26 13:17:23 -07:00
Junio C Hamano 968004c39c Merge branch 'kf/gpg-sig-verification-doc' into maint
Documentation for "git merge --verify-signatures" has been updated
to clarify that the signature of only the commit at the tip is
verified.  Also the phrasing used for signature and key validity is
adjusted to align with that used by OpenPGP.

* kf/gpg-sig-verification-doc:
  Documentation: clarify signature verification
2016-05-26 13:17:22 -07:00
Junio C Hamano d07211b5fa Merge branch 'lp/typofixes' into maint
Typofixes.

* lp/typofixes:
  typofix: assorted typofixes in comments, documentation and messages
2016-05-26 13:17:21 -07:00
Junio C Hamano 1f62b9256d Merge branch 'sb/z-is-gnutar-ism' into maint
Test fix.

* sb/z-is-gnutar-ism:
  t6041: do not compress backup tar file
  t3513: do not compress backup tar file
2016-05-26 13:17:21 -07:00
Junio C Hamano b262b8f889 Merge branch 'va/i18n-misc-updates' into maint
Mark several messages for translation.

* va/i18n-misc-updates:
  i18n: unpack-trees: avoid substituting only a verb in sentences
  i18n: builtin/pull.c: split strings marked for translation
  i18n: builtin/pull.c: mark placeholders for translation
  i18n: git-parse-remote.sh: mark strings for translation
  i18n: branch: move comment for translators
  i18n: branch: unmark string for translation
  i18n: builtin/rm.c: remove a comma ',' from string
  i18n: unpack-trees: mark strings for translation
  i18n: builtin/branch.c: mark option for translation
  i18n: index-pack: use plural string instead of normal one
2016-05-26 13:17:20 -07:00
Junio C Hamano 57b76d3379 Merge branch 'bn/config-doc-tt-varnames' into maint
Doc formatting fixes.

* bn/config-doc-tt-varnames:
  config: consistently format $variables in monospaced font
  config: describe 'pathname' value type
2016-05-26 13:17:19 -07:00
Junio C Hamano 4e327bb4c2 Merge branch 'nd/remote-plural-ours-plus-theirs' into maint
Message fix.

* nd/remote-plural-ours-plus-theirs:
  remote.c: specify correct plural form in "commit diverge" message
2016-05-26 13:17:18 -07:00
Junio C Hamano e8c7b8cf68 Merge branch 'ak/t4151-ls-files-could-be-empty' into maint
Test fix.

* ak/t4151-ls-files-could-be-empty:
  t4151: make sure argument to 'test -z' is given
2016-05-26 13:17:17 -07:00
Junio C Hamano 6de6aba9f2 Merge branch 'jc/test-seq' into maint
Test fix.

* jc/test-seq:
  test-lib-functions.sh: rewrite test_seq without Perl
  test-lib-functions.sh: remove misleading comment on test_seq
2016-05-26 13:17:16 -07:00
Junio C Hamano 86a1d147e8 Merge branch 'tb/t5601-sed-fix' into maint
Test fix.

* tb/t5601-sed-fix:
  t5601: Remove trailing space in sed expression
2016-05-26 13:17:15 -07:00
Junio C Hamano 6db5205148 Merge branch 'va/i18n-remote-comment-to-align' into maint
Message fix.

* va/i18n-remote-comment-to-align:
  i18n: remote: add comment for translators
2016-05-26 13:17:14 -07:00
Junio C Hamano 31efe2a8a8 Merge branch 'va/mailinfo-doc-typofix' into maint
Typofix.

* va/mailinfo-doc-typofix:
  Documentation/git-mailinfo: fix typo
2016-05-26 13:17:14 -07:00
Junio C Hamano adbcfe6547 Merge branch 'maint-2.7' into maint
* maint-2.7:
  archive-tar: convert snprintf to xsnprintf
2016-05-26 13:16:51 -07:00
Junio C Hamano 50b4a7807f Merge branch 'jk/war-on-sprintf' into maint-2.7
* jk/war-on-sprintf:
  archive-tar: convert snprintf to xsnprintf
2016-05-26 10:45:37 -07:00
Jeff King 9e6c1e91a3 archive-tar: convert snprintf to xsnprintf
Commit f2f0267 (archive-tar: use xsnprintf for trivial
formatting, 2015-09-24) converted cases of "sprintf" to
"xsnprintf", but accidentally left one as just "snprintf".
This meant that we could silently truncate the resulting
buffer instead of flagging an error.

In practice, this is impossible to achieve, as we are
formatting a ustar checksum, which can be at most 7
characters. But the point of xsnprintf is to document and
check for "should be impossible" conditions; this site was
just accidentally mis-converted during f2f0267.

Noticed-by: Paul Green <Paul.Green@stratus.com>
Signed-off-by: Jeff King <peff@peff.net>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2016-05-26 10:44:26 -07:00
Junio C Hamano 0f8e831356 Git 2.8.3
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2016-05-18 15:32:41 -07:00
Junio C Hamano 66106691a1 Merge branch 'sb/misc-cleanups' into HEAD
* sb/misc-cleanups:
  submodule-config: don't shadow `cache`
  config.c: drop local variable
  credential-cache, send_request: close fd when done
  bundle: don't leak an fd in case of early return
  abbrev_sha1_in_line: don't leak memory
  notes: don't leak memory in git_config_get_notes_strategy
2016-05-18 14:40:15 -07:00
Junio C Hamano 989cbd4556 Merge branch 'ew/doc-split-pack-disables-bitmap' into HEAD
Doc update.

* ew/doc-split-pack-disables-bitmap:
  pack-objects: warn on split packs disabling bitmaps
2016-05-18 14:40:15 -07:00
Junio C Hamano 10b6646afc Merge branch 'sb/clean-test-fix' into HEAD
* sb/clean-test-fix:
  t7300: mark test with SANITY
2016-05-18 14:40:14 -07:00
Junio C Hamano 8d61f0f07d Merge branch 'rn/glossary-typofix' into HEAD
* rn/glossary-typofix:
  Documentation: fix typo 'In such these cases'
2016-05-18 14:40:14 -07:00
Junio C Hamano 977cb3e2c5 Merge branch 'ew/normal-to-e' into HEAD
* ew/normal-to-e:
  .mailmap: update to my shorter email address
2016-05-18 14:40:12 -07:00
Junio C Hamano 258b862edb Merge branch 'sb/config-exit-status-list' into HEAD
Doc update.

* sb/config-exit-status-list:
  config doc: improve exit code listing
2016-05-18 14:40:12 -07:00
Junio C Hamano 87c594471d Merge branch 'rt/string-list-lookup-cleanup' into HEAD
Code cleanup.

* rt/string-list-lookup-cleanup:
  string_list: use string-list API in unsorted_string_list_lookup()
2016-05-18 14:40:12 -07:00
Junio C Hamano 9ba3b14c64 Merge branch 'jk/fix-attribute-macro-in-2.5' into HEAD
Code fixup.

* jk/fix-attribute-macro-in-2.5:
  remote.c: spell __attribute__ correctly
2016-05-18 14:40:12 -07:00
Junio C Hamano 777dec64bd Merge branch 'sg/test-lib-simplify-expr-away' into HEAD
Code cleanup.

* sg/test-lib-simplify-expr-away:
  test-lib: simplify '--option=value' parsing
2016-05-18 14:40:11 -07:00
Junio C Hamano 14af79b93d Merge branch 'nd/remove-unused' into HEAD
Code cleanup.

* nd/remove-unused:
  wrapper.c: delete dead function git_mkstemps()
  dir.c: remove dead function fnmatch_icase()
2016-05-18 14:40:11 -07:00
Junio C Hamano 13af774e26 Merge branch 'sk/gitweb-highlight-encoding' into HEAD
Some multi-byte encoding can have a backslash byte as a later part
of one letter, which would confuse "highlight" filter used in
gitweb.

* sk/gitweb-highlight-encoding:
  gitweb: apply fallback encoding before highlight
2016-05-18 14:40:10 -07:00
Junio C Hamano 09687585d1 Merge branch 'ls/travis-submitting-patches' into HEAD
* ls/travis-submitting-patches:
  Documentation: add setup instructions for Travis CI
2016-05-18 14:40:09 -07:00
Junio C Hamano 1cfb225aba Merge branch 'js/close-packs-before-gc' into HEAD
* js/close-packs-before-gc:
  t5510: run auto-gc in the foreground
2016-05-18 14:40:09 -07:00
Junio C Hamano 803fd70cee Merge branch 'ls/p4-lfs' into HEAD
Recent update to Git LFS broke "git p4" by changing the output from
its "lfs pointer" subcommand.

* ls/p4-lfs:
  git-p4: fix Git LFS pointer parsing
  travis-ci: express Linux/OS X dependency versions more clearly
  travis-ci: update Git-LFS and P4 to the latest version
2016-05-18 14:40:08 -07:00
Junio C Hamano 7ab6da3c40 Merge branch 'ls/p4-lfs-test-fix-2.7.0' into HEAD
Fix a broken test.

* ls/p4-lfs-test-fix-2.7.0:
  t9824: fix wrong reference value
  t9824: fix broken &&-chain in a subshell
2016-05-18 14:40:08 -07:00
Junio C Hamano f735a50ffd Merge branch 'nf/mergetool-prompt' into HEAD
UI consistency improvements.

* nf/mergetool-prompt:
  difftool/mergetool: make the form of yes/no questions consistent
2016-05-18 14:40:07 -07:00
Junio C Hamano 1f7b196e21 Merge branch 'jd/send-email-to-whom' into HEAD
A question by "git send-email" to ask the identity of the sender
has been updated.

* jd/send-email-to-whom:
  send-email: fix grammo in the prompt that asks e-mail recipients
2016-05-18 14:40:07 -07:00
Junio C Hamano f12fffd347 Merge branch 'js/win32-mmap' into HEAD
mmap emulation on Windows has been optimized and work better without
consuming paging store when not needed.

* js/win32-mmap:
  mmap(win32): avoid expensive fstat() call
  mmap(win32): avoid copy-on-write when it is unnecessary
  win32mmap: set errno appropriately
2016-05-18 14:40:06 -07:00
Junio C Hamano c555e529ac Merge branch 'jk/push-client-deadlock-fix' into HEAD
Some Windows SDK lacks pthread_sigmask() implementation and fails
to compile the recently updated "git push" codepath that uses it.

* jk/push-client-deadlock-fix:
  Windows: only add a no-op pthread_sigmask() when needed
  Windows: add pthread_sigmask() that does nothing
  t5504: drop sigpipe=ok from push tests
  fetch-pack: isolate sigpipe in demuxer thread
  send-pack: isolate sigpipe in demuxer thread
  run-command: teach async threads to ignore SIGPIPE
  send-pack: close demux pipe before finishing async process
2016-05-18 14:40:06 -07:00
Junio C Hamano 920f2ea33b Merge branch 'sb/mv-submodule-fix' into HEAD
"git mv old new" did not adjust the path for a submodule that lives
as a subdirectory inside old/ directory correctly.

* sb/mv-submodule-fix:
  mv: allow moving nested submodules
2016-05-18 14:40:05 -07:00
Junio C Hamano e9ef83a299 Merge branch 'da/user-useconfigonly' into HEAD
The "user.useConfigOnly" configuration variable makes it an error
if users do not explicitly set user.name and user.email.  However,
its check was not done early enough and allowed another error to
trigger, reporting that the default value we guessed from the
system setting was unusable.  This was a suboptimal end-user
experience as we want the users to set user.name/user.email without
relying on the auto-detection at all.

* da/user-useconfigonly:
  ident: give "please tell me" message upon useConfigOnly error
  ident: check for useConfigOnly before auto-detection of name/email
2016-05-18 14:40:05 -07:00
Junio C Hamano 787a490cee Merge branch 'ld/p4-test-py3' into HEAD
The test scripts for "git p4" (but not "git p4" implementation
itself) has been updated so that they would work even on a system
where the installed version of Python is python 3.

* ld/p4-test-py3:
  git-p4 tests: time_in_seconds should use $PYTHON_PATH
  git-p4 tests: work with python3 as well as python2
  git-p4 tests: cd to / before running python
2016-05-18 14:40:04 -07:00
Keller Fuchs 05a5869a01 Documentation: clarify signature verification
Clarify that "merge --verify-signatures" checks the signature on the
tip commit of the history being merged.

Uniformise the vocabulary used wrt. key/signature validity with OpenPGP:
- a signature is valid if made by a key with a valid uid;
- in the default trust-model, a uid is valid if signed by a trusted key;
- a key is trusted if the (local) user set a trust level for it.

Helped-by: Junio C Hamano <gitster@pobox.com>
Signed-off-by: Keller Fuchs   <KellerFuchs@hashbang.sh>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2016-05-13 12:37:44 -07:00
Vasco Almeida 2e3926b948 i18n: unpack-trees: avoid substituting only a verb in sentences
Instead of reusing the same set of message templates for checkout
and other actions and substituting the verb with "%s", prepare
separate message templates for each known action. That would make
it easier for translation into languages where the same verb may
conjugate differently depending on the message we are giving.

See gettext documentation for details:
http://www.gnu.org/software/gettext/manual/html_node/Preparing-Strings.html

Helped-by: Junio C Hamano <gitster@pobox.com>
Signed-off-by: Vasco Almeida <vascomalmeida@sapo.pt>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2016-05-12 16:28:43 -07:00
Vasco Almeida dee2303b1a Documentation/git-mailinfo: fix typo
Signed-off-by: Vasco Almeida <vascomalmeida@sapo.pt>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2016-05-11 14:35:52 -07:00
Johannes Schindelin ed84387a6b Windows: only add a no-op pthread_sigmask() when needed
In f924b52 (Windows: add pthread_sigmask() that does nothing,
2016-05-01), we introduced a no-op for Windows. However, this breaks
building Git in Git for Windows' SDK because pthread_sigmask() is
already a no-op there, #define'd in the pthread_signal.h header in
/mingw64/x86_64-w64-mingw32/include/.

Let's wrap the definition of pthread_sigmask() in a guard that skips
it when compiling with MinGW-w64' headers.

Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2016-05-11 14:02:10 -07:00
Johannes Schindelin ebf31e70bb mingw: remove unnecessary definition
For some reason, the definition of the MINGW version of
`mark_as_git_dir()` slipped into this developer's patch series to
support building Git for Windows.

As the `mark_as_git_dir()` function is not needed at all anymore (it was
used originally to support the core.hideDotFiles = gitDirOnly setting,
but we now use a different method to support that case), let's just
remove it.

Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2016-05-11 13:55:05 -07:00
Johannes Schindelin f30afdabbf mingw: introduce the 'core.hideDotFiles' setting
On Unix (and Linux), files and directories whose names start with a dot
are usually not shown by default. This convention is used by Git: the
.git/ directory should be left alone by regular users, and only accessed
through Git itself.

On Windows, no such convention exists. Instead, there is an explicit flag
to mark files or directories as hidden.

In the early days, Git for Windows did not mark the .git/ directory (or
for that matter, any file or directory whose name starts with a dot)
hidden. This lead to quite a bit of confusion, and even loss of data.

Consequently, Git for Windows introduced the core.hideDotFiles setting,
with three possible values: true, false, and dotGitOnly, defaulting to
marking only the .git/ directory as hidden.

The rationale: users do not need to access .git/ directly, and indeed (as
was demonstrated) should not really see that directory, either. However,
not all dot files should be hidden by default, as e.g. Eclipse does not
show them (and the user would therefore be unable to see, say, a
.gitattributes file).

In over five years since the last attempt to bring this patch into core
Git, a slightly buggy version of this patch has served Git for Windows'
users well: no single report indicated problems with the hidden .git/
directory, and the stream of problems caused by the previously non-hidden
.git/ directory simply stopped. The bugs have been fixed during the
process of getting this patch upstream.

Note that there is a funny quirk we have to pay attention to when
creating hidden files: we use Win32's _wopen() function which
transmogrifies its arguments and hands off to Win32's CreateFile()
function. That latter function errors out with ERROR_ACCESS_DENIED (the
equivalent of EACCES) when the equivalent of the O_CREAT flag was passed
and the file attributes (including the hidden flag) do not match an
existing file's. And _wopen() accepts no parameter that would be
transmogrified into said hidden flag. Therefore, we simply try again
without O_CREAT.

A slightly different method is required for our fopen()/freopen()
function as we cannot even *remove* the implicit O_CREAT flag.
Therefore, we briefly mark existing files as unhidden when opening them
via fopen()/freopen().

The ERROR_ACCESS_DENIED error can also be triggered by opening a file
that is marked as a system file (which is unlikely to be tracked in
Git), and by trying to create a file that has *just* been deleted and is
awaiting the last open handles to be released (which would be handled
better by the "Try again?" logic, a story for a different patch series,
though). In both cases, it does not matter much if we try again without
the O_CREAT flag, read: it does not hurt, either.

For details how ERROR_ACCESS_DENIED can be triggered, see
https://msdn.microsoft.com/en-us/library/windows/desktop/aa363858

Original-patch-by: Erik Faye-Lund <kusmabite@gmail.com>
Initial-Test-By: Pat Thoyts <patthoyts@users.sourceforge.net>
Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2016-05-11 13:54:53 -07:00
Jeff King 8e98b35f87 rebase--interactive: avoid empty list in shell for-loop
The $strategy_opts variable contains a space-separated list
of strategy options, each individually shell-quoted. To loop
over each, we "unwrap" them by doing an eval like:

  eval '
    for opt in '"$strategy_opts"'
    do
       ...
    done
  '

Note the quoting that means we expand $strategy_opts inline
in the code to be evaluated (which is the right thing
because we want the IFS-split and de-quoting). If the
variable is empty, however, we ask the shell to eval the
following code:

  for opt in
  do
     ...
  done

without anything between "in" and "do".  Most modern shells
are happy to treat that like a noop, but reportedly ksh88 on
AIX considers it a syntax error. So let's catch the case
that the variable is empty and skip the eval altogether
(since we know the loop would be a noop anyway).

Reported-by: Armin Kunaschik <megabreit@googlemail.com>
Signed-off-by: Jeff King <peff@peff.net>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2016-05-10 14:11:27 -07:00
Junio C Hamano 4df4313532 test-lib-functions.sh: rewrite test_seq without Perl
Rewrite the 'seq' imitation using only commands and features that
are typically found built into modern POSIX shells, instead of
relying on Perl to run a single-liner script.

Signed-off-by: Junio C Hamano <gitster@pobox.com>
2016-05-09 14:21:57 -07:00
Armin Kunaschik 2bb0518617 t4151: make sure argument to 'test -z' is given
88d50724 (am --skip: revert changes introduced by failed 3way merge,
2015-06-06), unlike all the other patches in the series, forgot to
quote the output from "$(git ls-files -u)" when using it as the
argument to "test -z", leading to a syntax error on platforms whose
test does not interpret "test -z" (no other arguments) as testing if
a string "-z" is the null string (which GNU test and test that is
built into bash and dash seem to do).

Note that $(git ls-files -u | wc -l) is deliberately left unquoted,
as some implementations of "wc -l" includes extra blank characters
in its output and cannot be compared as string, i.e. "test 0 = $(...)".

Signed-off-by: Armin Kunaschik <megabreit@googlemail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2016-05-09 13:45:22 -07:00
Junio C Hamano 55672a39b4 test-lib-functions.sh: remove misleading comment on test_seq
We never used the "letters" form since we came up with "test_seq" to
replace use of non-portable "seq" in our test script, which we
introduced it at d17cf5f3 (tests: Introduce test_seq, 2012-08-04).

We use this helper to either iterate for N times (i.e. the values on
the lines do not even matter), or just to get N distinct strings
(i.e. the values on the lines themselves do not really matter, but
we care that they are different from each other and reproducible).

Stop promising that we may allow using "letters"; this would open an
easier reimplementation that does not rely on $PERL, if somebody
later wants to.

Signed-off-by: Junio C Hamano <gitster@pobox.com>
2016-05-09 12:32:42 -07:00
Vasco Almeida 6c1fbe1e41 i18n: remote: add comment for translators
Add comment drawing translator attention in order to align "Push
URL:" and "Fetch URL:" fields translation of git remote show output.

Aligning both fields makes the output more appealing and easier to
grasp.

Signed-off-by: Vasco Almeida <vascomalmeida@sapo.pt>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2016-05-09 12:20:40 -07:00