Commit graph

39910 commits

Author SHA1 Message Date
Johannes Schindelin efaba7cc77 fsck: optionally ignore specific fsck issues completely
An fsck issue in a legacy repository might be so common that one would
like not to bother the user with mentioning it at all. With this change,
that is possible by setting the respective message type to "ignore".

This change "abuses" the missingEmail=warn test to verify that "ignore"
is also accepted and works correctly. And while at it, it makes sure
that multiple options work, too (they are passed to unpack-objects or
index-pack as a comma-separated list via the --strict=... command-line
option).

Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2015-06-23 14:27:36 -07:00
Johannes Schindelin f50c440730 fsck: disallow demoting grave fsck errors to warnings
Some kinds of errors are intrinsically unrecoverable (e.g. errors while
uncompressing objects). It does not make sense to allow demoting them to
mere warnings.

Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2015-06-23 14:27:36 -07:00
Johannes Schindelin 70a4ae73d8 fsck: add a simple test for receive.fsck.<msg-id>
Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2015-06-23 14:27:36 -07:00
Johannes Schindelin 7d7d5b0568 fsck: make fsck_tag() warn-friendly
When fsck_tag() identifies a problem with the commit, it should try
to make it possible to continue checking the commit object, in case the
user wants to demote the detected errors to mere warnings.

Just like fsck_commit(), there are certain problems that could hide other
issues with the same tag object. For example, if the 'type' line is not
encountered in the correct position, the 'tag' line – if there is any –
would not be handled at all.

Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2015-06-23 14:27:35 -07:00
Johannes Schindelin c9ad147f83 fsck: handle multiple authors in commits specially
This problem has been detected in the wild, and is the primary reason
to introduce an option to demote certain fsck errors to warnings. Let's
offer to ignore this particular problem specifically.

Technically, we could handle such repositories by setting
receive.fsck.<msg-id> to missingCommitter=warn, but that could hide
missing tree objects in the same commit because we cannot continue
verifying any commit object after encountering a missing committer line,
while we can continue in the case of multiple author lines.

Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2015-06-23 14:27:35 -07:00
Johannes Schindelin b3584761eb fsck: make fsck_commit() warn-friendly
When fsck_commit() identifies a problem with the commit, it should try
to make it possible to continue checking the commit object, in case the
user wants to demote the detected errors to mere warnings.

Note that some problems are too problematic to simply ignore. For
example, when the header lines are mixed up, we punt after encountering
an incorrect line. Therefore, demoting certain warnings to errors can
hide other problems. Example: demoting the missingauthor error to
a warning would hide a problematic committer line.

Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2015-06-23 14:27:35 -07:00
Johannes Schindelin e6826e335a fsck: make fsck_ident() warn-friendly
When fsck_ident() identifies a problem with the ident, it should still
advance the pointer to the next line so that fsck can continue in the
case of a mere warning.

Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2015-06-23 14:27:35 -07:00
Johannes Schindelin 71ab8fa840 fsck: report the ID of the error/warning
Some repositories written by legacy code have objects with non-fatal
fsck issues. To allow the user to ignore those issues, let's print
out the ID (e.g. when encountering "missingEmail", the user might
want to call `git config --add receive.fsck.missingEmail=warn`).

Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2015-06-23 14:27:35 -07:00
Johannes Schindelin 5d477a334a fsck (receive-pack): allow demoting errors to warnings
For example, missing emails in commit and tag objects can be demoted to
mere warnings with

	git config receive.fsck.missingemail=warn

The value is actually a comma-separated list.

In case that the same key is listed in multiple receive.fsck.<msg-id>
lines in the config, the latter configuration wins (this can happen for
example when both $HOME/.gitconfig and .git/config contain message type
settings).

As git receive-pack does not actually perform the checks, it hands off
the setting to index-pack or unpack-objects in the form of an optional
argument to the --strict option.

Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2015-06-23 14:27:34 -07:00
Johannes Schindelin 0282f4dced fsck: offer a function to demote fsck errors to warnings
There are legacy repositories out there whose older commits and tags
have issues that prevent pushing them when 'receive.fsckObjects' is set.
One real-life example is a commit object that has been hand-crafted to
list two authors.

Often, it is not possible to fix those issues without disrupting the
work with said repositories, yet it is still desirable to perform checks
by setting `receive.fsckObjects = true`. This commit is the first step
to allow demoting specific fsck issues to mere warnings.

The `fsck_set_msg_types()` function added by this commit parses a list
of settings in the form:

	missingemail=warn,badname=warn,...

Unfortunately, the FSCK_WARN/FSCK_ERROR flag is only really heeded by
git fsck so far, but other call paths (e.g. git index-pack --strict)
error out *always* no matter what type was specified. Therefore, we need
to take extra care to set all message types to FSCK_ERROR by default in
those cases.

Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2015-06-23 14:26:46 -07:00
Johannes Schindelin f417eed8cd fsck: provide a function to parse fsck message IDs
These functions will be used in the next commits to allow the user to
ask fsck to handle specific problems differently, e.g. demoting certain
errors to warnings. The upcoming `fsck_set_msg_types()` function has to
handle partial strings because we would like to be able to parse, say,
'missingemail=warn,missingtaggerentry=warn' command line parameters
(which will be passed by receive-pack to index-pack and unpack-objects).

To make the parsing robust, we generate strings from the enum keys, and
using these keys, we match up strings without dashes case-insensitively
to the corresponding enum values.

Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2015-06-22 12:53:25 -07:00
Johannes Schindelin c99ba492f1 fsck: introduce identifiers for fsck messages
Instead of specifying whether a message by the fsck machinery constitutes
an error or a warning, let's specify an identifier relating to the
concrete problem that was encountered. This is necessary for upcoming
support to be able to demote certain errors to warnings.

In the process, simplify the requirements on the calling code: instead of
having to handle full-blown varargs in every callback, we now send a
string buffer ready to be used by the callback.

We could use a simple enum for the message IDs here, but we want to
guarantee that the enum values are associated with the appropriate
message types (i.e. error or warning?). Besides, we want to introduce a
parser in the next commit that maps the string representation to the
enum value, hence we use the slightly ugly preprocessor construct that
is extensible for use with said parser.

Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2015-06-22 10:24:27 -07:00
Johannes Schindelin 22410549fc fsck: introduce fsck options
Just like the diff machinery, we are about to introduce more settings,
therefore it makes sense to carry them around as a (pointer to a) struct
containing all of them.

Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2015-06-22 10:23:32 -07:00
Matthieu Moy 5b1d901c01 git-multimail: update to release 1.1.0
The changes are described in CHANGES.

Contributions-by: Matthieu Moy <Matthieu.Moy@imag.fr>
Contributions-by: Richard Hansen <rhansen@rhansen.org>
Contributions-by: Michael Haggerty <mhagger@alum.mit.edu>
Contributions-by: Elijah Newren <newren@gmail.com>
Contributions-by: Luke Mewburn <luke@mewburn.net>
Contributions-by: Dave Boutcher <daveboutcher@gmail.com>
Contributions-by: Azat Khuzhin <a3at.mail@gmail.com>
Contributions-by: Sebastian Schuberth <sschuberth@gmail.com>
Contributions-by: Mikko Johannes Koivunalho <mikko.koivunalho@iki.fi>
Contributions-by: Elijah Newren <newren@palantir.com>
Contributions-by: Benoît Ryder <benoit@ryder.fr>
Signed-off-by: Matthieu Moy <Matthieu.Moy@imag.fr>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2015-06-18 10:03:52 -07:00
Junio C Hamano 16da57c7c6 Eighth batch for 2.5
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2015-06-16 14:39:31 -07:00
Junio C Hamano 5c040f5af5 Sync with 2.4.4
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2015-06-16 14:39:01 -07:00
Junio C Hamano f09bd215cd Git 2.4.4
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2015-06-16 14:38:01 -07:00
Junio C Hamano 37d6f933df Merge branch 'jk/clone-dissociate' into maint
Code clean-up.

* jk/clone-dissociate:
  clone: reorder --dissociate and --reference options
  clone: use OPT_STRING_LIST for --reference
2015-06-16 14:33:52 -07:00
Junio C Hamano 0d9388dc30 Merge branch 'sb/submodule-doc-intro' into maint
* sb/submodule-doc-intro:
  submodule doc: reorder introductory paragraphs
2015-06-16 14:33:52 -07:00
Junio C Hamano 6de4c80839 Merge branch 'sb/glossary-submodule' into maint
* sb/glossary-submodule:
  glossary: add "remote", "submodule", "superproject"
2015-06-16 14:33:51 -07:00
Junio C Hamano 6588f82ff6 Merge branch 'ah/usage-strings' into maint
A few usage string updates.

* ah/usage-strings:
  blame, log: format usage strings similarly to those in documentation
2015-06-16 14:33:50 -07:00
Junio C Hamano afd647c55f Merge branch 'mc/commit-doc-grammofix' into maint
Doc grammar fix.

* mc/commit-doc-grammofix:
  Documentation/git-commit: grammofix
2015-06-16 14:33:49 -07:00
Junio C Hamano dfb67594e9 Merge branch 'rs/janitorial' into maint
Code clean-up.

* rs/janitorial:
  dir: remove unused variable sb
  clean: remove unused variable buf
  use file_exists() to check if a file exists in the worktree
2015-06-16 14:33:47 -07:00
Junio C Hamano 2cd8ebdd3d Merge branch 'sb/test-bitmap-free-at-end' into maint
An earlier leakfix to bitmap testing code was incomplete.

* sb/test-bitmap-free-at-end:
  test_bitmap_walk: free bitmap with bitmap_free
2015-06-16 14:33:47 -07:00
Junio C Hamano 6b2c0ead06 Merge branch 'dt/clean-pathspec-filter-then-lstat' into maint
"git clean pathspec..." tried to lstat(2) and complain even for
paths outside the given pathspec.

* dt/clean-pathspec-filter-then-lstat:
  clean: only lstat files in pathspec
2015-06-16 14:33:46 -07:00
Junio C Hamano b76b4cd4f1 Merge branch 'jk/http-backend-deadlock' into maint
Communication between the HTTP server and http_backend process can
lead to a dead-lock when relaying a large ref negotiation request.
Diagnose the situation better, and mitigate it by reading such a
request first into core (to a reasonable limit).

* jk/http-backend-deadlock:
  http-backend: spool ref negotiation requests to buffer
  t5551: factor out tag creation
  http-backend: fix die recursion with custom handler
2015-06-16 14:33:45 -07:00
Junio C Hamano 070d276cc1 Merge branch 'jh/filter-empty-contents' into maint
The clean/smudge interface did not work well when filtering an
empty contents (failed and then passed the empty input through).
It can be argued that a filter that produces anything but empty for
an empty input is nonsense, but if the user wants to do strange
things, then why not?

* jh/filter-empty-contents:
  sha1_file: pass empty buffer to index empty file
2015-06-16 14:33:44 -07:00
Junio C Hamano 659d4c8fb2 Merge branch 'jk/stash-options' into maint
Make "git stash something --help" error out, so that users can
safely say "git stash drop --help".

* jk/stash-options:
  stash: recognize "--help" for subcommands
  stash: complain about unknown flags
2015-06-16 14:33:43 -07:00
Junio C Hamano 4be33f7222 Merge branch 'mm/log-format-raw-doc' into maint
Clarify that "log --raw" and "log --format=raw" are unrelated
concepts.

* mm/log-format-raw-doc:
  Documentation/log: clarify sha1 non-abbreviation in log --raw
  Documentation/log: clarify what --raw means
2015-06-16 14:33:43 -07:00
Junio C Hamano 335f1a7eb2 Merge branch 'ep/do-not-feed-a-pointer-to-array-size' into maint
Catch a programmer mistake to feed a pointer not an array to
ARRAY_SIZE() macro, by using a couple of GCC extensions.

* ep/do-not-feed-a-pointer-to-array-size:
  git-compat-util.h: implement a different ARRAY_SIZE macro for for safely deriving the size of array
2015-06-16 14:33:41 -07:00
Junio C Hamano c3b1c1e9b2 Merge branch 'nd/slim-index-pack-memory-usage'
An earlier optimization broke index-pack for a large object
transfer; this fixes it before the breakage hits any released
version.

* nd/slim-index-pack-memory-usage:
  index-pack: fix truncation of off_t in comparison
2015-06-16 14:27:08 -07:00
Junio C Hamano 486b51bc81 Merge branch 'sb/pack-protocol-mention-smart-http'
Doc updates.

* sb/pack-protocol-mention-smart-http:
  Documentation/technical/pack-protocol: mention http as possible protocol
2015-06-16 14:27:08 -07:00
Junio C Hamano 0d5d7db435 Merge branch 'jk/make-fix-dependencies'
Build clean-up.

* jk/make-fix-dependencies:
  Makefile: silence perl/PM.stamp recipe
  Makefile: avoid timestamp updates to GIT-BUILD-OPTIONS
  Makefile: drop dependency between git-instaweb and gitweb
2015-06-16 14:27:07 -07:00
Junio C Hamano 103b6f9c2b Merge branch 'jk/die-on-bogus-worktree-late'
The setup code used to die when core.bare and core.worktree are set
inconsistently, even for commands that do not need working tree.

* jk/die-on-bogus-worktree-late:
  setup_git_directory: delay core.bare/core.worktree errors
2015-06-16 14:27:06 -07:00
Junio C Hamano c7ca4424ea Merge branch 'sg/merge-summary-config'
Doc updates.

* sg/merge-summary-config:
  Documentation: include 'merge.branchdesc' for merge and config as well
2015-06-16 14:27:05 -07:00
Junio C Hamano 412e63f0fd Merge branch 'ah/send-email-sendmail-alias'
"git send-email" learned the alias file format used by the sendmail
program (in an abbreviated form).

* ah/send-email-sendmail-alias:
  t9001: write $HOME/, not ~/, to help shells without tilde expansion
  send-email: add sendmail email aliases format
2015-06-16 14:27:04 -07:00
Junio C Hamano 2c185f0476 l10n-2.4-maint-de-updates
-----BEGIN PGP SIGNATURE-----
 Version: GnuPG v1
 
 iQIcBAABAgAGBQJVfYcVAAoJEMek6Rt1RHooiUUP/jCnWBGo05jYu0eUrQ0HQqzE
 HBZymXG0kdZseVOi80mltaf0TK4dJaK/pEs0Cyq3WfnRovCbfq50MjjwcUqsDgVA
 K7tIDUHY1n+LZ8RtrX0kJKuDRvAuyXc3ent7q8ilCMFBpUw13XpuuZ+uRBN1xllp
 RZAj61aZ7vfqlzH2pIRmCaV+5tIHhct1hZu+ZeozYMxcpOEOCpwKbmMzgjwnc+Ia
 JCMviE7GFf0FXn4pVns6VHYZAD7/FteiFLrtucL+MdT3tzuYXpqi7OoIpLwG8JHm
 HcfLljBzujfp+RcX56/uA1cLIjZS96MWD/QooBTV5R2tEoTY2dtXkUuz2ymU7MZr
 bycWkxtunLsyC36aFF+2G7jKtzEeUk4mkTi1wcw3KhRcPhmxfZCmQjPOAV0ZEqxu
 8n+AFe8dEpwRXqbamZVu/3EKDWUTc87Ey1EVBG+S0JaBAClZgeyHrrpZQ9PmuQqD
 LdRMhZiRc3yCLH2FvwTfV3Nldal5WQp7tCQHEANy+YErjUxhp3VZzPt9hMVQkVqW
 FIxgpbHs1/znW5+DELltJ/tNonee8MuKW5eUkIqq6eDf3yb9lTpt8TitWN3IRE6i
 7AyfSldTjn+I4C+Najh0hQuJYaqi19sl650f997dCWmDXbuOMoSwMydstdvLXI7n
 y//xYLvHrm7/r/i/9612
 =YY1A
 -----END PGP SIGNATURE-----

Merge tag 'l10n-2.4-maint-de-updates' of git://github.com/git-l10n/git-po into maint

l10n-2.4-maint-de-updates

* tag 'l10n-2.4-maint-de-updates' of git://github.com/git-l10n/git-po:
  l10n: de.po: translation fix for fall-back to 3way merge
  l10n: de.po: punctuation fixes
  l10n: de.po: grammar fix
  l10n: de.po: change error message from "sagen" to "Meinten Sie"
2015-06-14 14:24:49 -07:00
Michael J Gruber a9845c5f50 l10n: de.po: translation fix for fall-back to 3way merge
The English version is correct, but misleading: It is not the 3way merge
that is being patched also, but that is being fallen back to also.

The German version translates the former meaning. Make it translate the
latter.

Signed-off-by: Michael J Gruber <git@drmicha.warpmail.net>
Signed-off-by: Ralf Thielow <ralf.thielow@gmail.com>
2015-06-12 20:40:04 +02:00
Michael J Gruber 47a1657ab9 l10n: de.po: punctuation fixes
This respects the ellipsis style used in de.po.

Signed-off-by: Michael J Gruber <git@drmicha.warpmail.net>
Signed-off-by: Ralf Thielow <ralf.thielow@gmail.com>
2015-06-12 20:40:04 +02:00
Michael J Gruber 872b1f26b8 l10n: de.po: grammar fix
Signed-off-by: Michael J Gruber <git@drmicha.warpmail.net>
Signed-off-by: Ralf Thielow <ralf.thielow@gmail.com>
2015-06-12 20:40:04 +02:00
Phillip Sz 39f9819931 l10n: de.po: change error message from "sagen" to "Meinten Sie"
We should not use "sagen" if someone has written something wrong.
Although it's "say" in English, we should not use it in German
and instead use our normal error message.

Signed-off-by: Phillip Sz <phillip.szelat@gmail.com>
Signed-off-by: Ralf Thielow <ralf.thielow@gmail.com>
2015-06-12 20:39:42 +02:00
Junio C Hamano a5fe66802f Second half of seventh batch
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2015-06-11 09:35:25 -07:00
Junio C Hamano e356158b4a Merge branch 'tb/complete-sequencing'
The bash completion script (in contrib/) learned a few options that
"git revert" takes.

* tb/complete-sequencing:
  completion: suggest sequencer commands for revert
2015-06-11 09:29:59 -07:00
Junio C Hamano 43262d8d65 Merge branch 'jk/squelch-missing-link-warning-for-unreachable'
Recent "git prune" traverses young unreachable objects to safekeep
old objects in the reachability chain from them, which sometimes
caused error messages that are unnecessarily alarming.

* jk/squelch-missing-link-warning-for-unreachable:
  suppress errors on missing UNINTERESTING links
  silence broken link warnings with revs->ignore_missing_links
  add quieter versions of parse_{tree,commit}
2015-06-11 09:29:59 -07:00
Junio C Hamano 0e04b248b5 Merge branch 'pt/pull-tests'
Add more test coverage to "git pull".

* pt/pull-tests:
  t5520: check reflog action in fast-forward merge
  t5521: test --dry-run does not make any changes
  t5520: test --rebase failure on unborn branch with index
  t5520: test --rebase with multiple branches
  t5520: test work tree fast-forward when fetch updates head
  t5520: test for failure if index has unresolved entries
  t5520: test no merge candidates cases
  t5520: prevent field splitting in content comparisons
2015-06-11 09:29:58 -07:00
Junio C Hamano c491e9e456 Merge branch 'sb/glossary-submodule'
* sb/glossary-submodule:
  glossary: add "remote", "submodule", "superproject"
2015-06-11 09:29:57 -07:00
Junio C Hamano 7df5c978d5 Merge branch 'sb/submodule-doc-intro'
* sb/submodule-doc-intro:
  submodule doc: reorder introductory paragraphs
2015-06-11 09:29:56 -07:00
Junio C Hamano dee47925c1 Merge branch 'jk/diagnose-config-mmap-failure'
The configuration reader/writer uses mmap(2) interface to access
the files; when we find a directory, it barfed with "Out of memory?".

* jk/diagnose-config-mmap-failure:
  xmmap(): drop "Out of memory?"
  config.c: rewrite ENODEV into EISDIR when mmap fails
  config.c: avoid xmmap error messages
  config.c: fix mmap leak when writing config
  read-cache.c: drop PROT_WRITE from mmap of index
2015-06-11 09:29:55 -07:00
Junio C Hamano 8f436d1374 Merge branch 'mt/p4-depotFile-at-version'
* mt/p4-depotFile-at-version:
  p4: retrieve the right revision of the file in UTF-16 codepath
2015-06-11 09:29:55 -07:00
Junio C Hamano 829f03e98c Merge branch 'mh/verify-lock-error-report'
Bring consistency to error reporting mechanism used in "refs" API.

* mh/verify-lock-error-report:
  ref_transaction_commit(): do not capitalize error messages
  verify_lock(): do not capitalize error messages
  verify_lock(): report errors via a strbuf
  verify_lock(): on errors, let the caller unlock the lock
  verify_lock(): return 0/-1 rather than struct ref_lock *
2015-06-11 09:29:54 -07:00