Commit graph

30046 commits

Author SHA1 Message Date
Jeff King a22e6f8547 receive-pack: send pack-processing stderr over sideband
Receive-pack invokes either unpack-objects or index-pack to
handle the incoming pack. However, we do not redirect the
stderr of the sub-processes at all, so it is never seen by
the client. From the initial thread adding sideband support,
which is here:

  http://thread.gmane.org/gmane.comp.version-control.git/139471

it is clear that some messages are specifically kept off the
sideband (with the assumption that they are of interest only
to an administrator, not the client). The stderr of the
subprocesses is mentioned in the thread, but it's unclear if
they are included in that group, or were simply forgotten.

However, there are a few good reasons to show them to the
client:

  1. In many cases, they are directly about the incoming
     packfile (e.g., fsck warnings with --strict, corruption
     in the packfile, etc). Without these messages, the
     client just gets "unpacker error" with no extra useful
     diagnosis.

  2. No matter what the cause, we are probably better off
     showing the errors to the client. If the client and the
     server admin are not the same entity, it is probably
     much easier for the client to cut-and-paste the errors
     they see than for the admin to try to dig them out of a
     log and correlate them with a particular session.

  3. Users of the ssh transport typically already see these
     stderr messages, as the remote's stderr is copied
     literally by ssh. This brings other transports (http,
     and push-over-git if you are crazy enough to enable it)
     more in line with ssh. As a bonus for ssh users,
     because the messages are now fed through the sideband
     and printed by the local git, they will have "remote:"
     prepended and be properly interleaved with any local
     output to stderr.

Signed-off-by: Jeff King <peff@peff.net>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2012-09-21 09:49:47 -07:00
Jeff King 59bfdfb82a receive-pack: redirect unpack-objects stdout to /dev/null
The unpack-objects command should not generally produce any
output on stdout. However, if it's given extra input after
the packfile, it will spew the remainder to stdout. When
called by receive-pack, this means we will break protocol,
since our stdout is connected to the remote send-pack.

Signed-off-by: Jeff King <peff@peff.net>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2012-09-21 09:44:11 -07:00
Junio C Hamano 8ef2794ba8 Merge branch 'nd/maint-diffstat-summary' into maint
* nd/maint-diffstat-summary:
  Revert diffstat back to English
2012-09-20 15:55:31 -07:00
Junio C Hamano 467ad25471 Merge branch 'jw/doc-commit-title' into maint
* jw/doc-commit-title:
  Documentation: describe subject more precisely
2012-09-20 15:55:22 -07:00
Junio C Hamano cc84144d48 Merge branch 'dg/run-command-child-cleanup' into maint
* dg/run-command-child-cleanup:
  run-command.c: fix broken list iteration in clear_child_for_cleanup
2012-09-20 15:55:12 -07:00
Junio C Hamano 96c2abea02 Merge branch 'jc/mailinfo-RE' into maint
* jc/mailinfo-RE:
  mailinfo: strip "RE: " prefix
2012-09-20 15:55:03 -07:00
Junio C Hamano ee70fb8e4a Merge branch 'sn/ls-remote-get-url-doc' into maint
* sn/ls-remote-get-url-doc:
  ls-remote: document the '--get-url' option
2012-09-20 15:54:57 -07:00
Junio C Hamano 9fcacaab02 Merge branch 'nd/log-n-doc' into maint
* nd/log-n-doc:
  doc: move rev-list option -<n> from git-log.txt to rev-list-options.txt
2012-09-20 15:54:43 -07:00
Junio C Hamano f9c2d2b14e Merge branch 'nd/maint-remote-remove' into maint
* nd/maint-remote-remove:
  remote: prefer subcommand name 'remove' to 'rm'
2012-09-20 15:53:31 -07:00
Stephen Boyd f2fef7b55a Documentation: Document signature showing options
The pretty formats for GPG signatures were introduced but never
documented. Use the documentation from the commit that introduced them.
Do the same for the --show-signature option added to git log and
friends.

Signed-off-by: Stephen Boyd <bebarino@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2012-09-20 10:28:51 -07:00
Felipe Contreras 25ae7cfd19 completion: fix shell expansion of items
As reported by Jeroen Meijer[1]; the current code doesn't deal properly
with items (tags, branches, etc.) that have ${} in them because they get
expaned by bash while using compgen.

A simple solution is to quote the items so they get expanded properly
(\$\{\}).

In order to achieve that I took bash-completion's quote() function,
which is rather simple, and renamed it to __git_quote() as per Jeff
King's suggestion.

Solves the original problem for me.

[1] http://article.gmane.org/gmane.comp.version-control.git/201596

Signed-off-by: Felipe Contreras <felipe.contreras@gmail.com>
Acked-by: Jeff King <peff@peff.net>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2012-09-20 09:52:36 -07:00
Junio C Hamano 304b7d99a7 Git 1.7.12.1
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2012-09-18 14:34:31 -07:00
Junio C Hamano 39e2e02060 Merge branch 'er/doc-fast-import-done' into maint
* er/doc-fast-import-done:
  fast-import: document the --done option
2012-09-18 14:33:52 -07:00
Junio C Hamano 8ffc331352 Merge branch 'jk/config-warn-on-inaccessible-paths' into maint
The attribute system may be asked for a path that itself or its
leading directories no longer exists in the working tree, and it is
fine if we cannot open .gitattribute file in such a case.  Failure
to open per-directory .gitattributes with error status other than
ENOENT and ENOTDIR should be diagnosed.

* jk/config-warn-on-inaccessible-paths:
  attr: failure to open a .gitattributes file is OK with ENOTDIR
  warn_on_inaccessible(): a helper to warn on inaccessible paths
  attr: warn on inaccessible attribute files
  gitignore: report access errors of exclude files
  config: warn on inaccessible files
2012-09-18 14:24:06 -07:00
Philip Oakley 01f7d7f19f Doc: Improve shallow depth wording
Avoid confusion in compound sentence about the start of the commit set
and the depth measure. Use two sentences.

Signed-off-by: Philip Oakley <philipoakley@iee.org>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2012-09-18 13:35:56 -07:00
Andreas Schwab 8093ae8854 Documentation/git-filter-branch: Move note about effect of removing commits
The note that explains that changes introduced by removed commits are
preserved should be placed directly after the paragraph that describes
such commits removal.  Otherwise the reference to "the commits" appears
out of context.

Also the big example that follows "Consider this history" is about
rewriting part of the history DAG.  Move the paragraph that
describes the operation close to it.

Signed-off-by: Andreas Schwab <schwab@linux-m68k.org>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2012-09-18 12:51:58 -07:00
Ramkumar Ramachandra 5805853f22 t/perf: add "trash directory" to .gitignore
Signed-off-by: Ramkumar Ramachandra <artagnon@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2012-09-17 14:27:55 -07:00
Adam Spiers d9fcff2f49 Add missing -z to git check-attr usage text for consistency with man page
Signed-off-by: Adam Spiers <git@adamspiers.org>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2012-09-17 13:45:32 -07:00
Mischa POSLAWSKY 6108b04b70 git-jump: ignore (custom) prefix in diff mode
Matching the default file prefix b/ does not yield any results if config
option diff.noprefix or diff.mnemonicprefix is enabled.

Signed-off-by: Mischa POSLAWSKY <git@shiar.nl>
Acked-by: Jeff King <peff@peff.net>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2012-09-17 12:31:57 -07:00
Wesley J. Landaker 2ce4fee878 Documentation: indent-with-non-tab uses "equivalent tabs" not 8
Update the documentation of the core.whitespace option
"indent-with-non-tab" to correctly reflect that it catches the use of
spaces instead of the equivalent tabs, rather than a fixed number.

Signed-off-by: Wesley J. Landaker <wjl@icecavern.net>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2012-09-17 10:23:21 -07:00
Yacine Belkadi 7dd9ab0c8b completion: add --no-edit to git-commit
Signed-off-by: Yacine Belkadi <yacine.belkadi.1@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2012-09-16 22:05:07 -07:00
Junio C Hamano d4d39bc32d Draft release notes to 1.7.12.1
We are almost there...

Signed-off-by: Junio C Hamano <gitster@pobox.com>
2012-09-14 21:37:51 -07:00
Junio C Hamano c13a5aca5d Merge branch 'sb/send-email-reconfirm-fix' into maint
* sb/send-email-reconfirm-fix:
  send-email: initial_to and initial_reply_to are both optional
2012-09-14 21:32:07 -07:00
Junio C Hamano 448e3700a0 Merge branch 'jc/send-email-reconfirm' into maint
* jc/send-email-reconfirm:
  send-email: validate & reconfirm interactive responses
2012-09-14 21:32:01 -07:00
Junio C Hamano 78ed88d80a Merge branch 'mz/cherry-pick-cmdline-order' into maint
* mz/cherry-pick-cmdline-order:
  cherry-pick/revert: respect order of revisions to pick
  demonstrate broken 'git cherry-pick three one two'
  teach log --no-walk=unsorted, which avoids sorting
2012-09-14 21:24:18 -07:00
Junio C Hamano c336bc104c Sync with 1.7.11.7 2012-09-14 21:20:40 -07:00
Junio C Hamano bafc478f16 Git 1.7.11.7
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2012-09-14 20:57:23 -07:00
Junio C Hamano 19ece726e1 Merge branch 'jk/maint-quiet-is-synonym-to-s-in-log' into maint-1.7.11
* jk/maint-quiet-is-synonym-to-s-in-log:
  log: fix --quiet synonym for -s
2012-09-14 20:48:31 -07:00
Junio C Hamano ddbca33ca7 Merge branch 'jc/maint-ident-missing-human-name' into maint-1.7.11
* jc/maint-ident-missing-human-name:
  split_ident_line(): make best effort when parsing author/committer line
2012-09-14 20:48:22 -07:00
Junio C Hamano dabdc0178e Merge branch 'rj/test-regex' into maint-1.7.11
* rj/test-regex:
  test-regex: Add a test to check for a bug in the regex routines
2012-09-14 20:46:39 -07:00
Junio C Hamano f463cc5306 Merge branch 'da/gitk-reload-tag-contents' into maint-1.7.11
* da/gitk-reload-tag-contents:
  gitk: Rename 'tagcontents' to 'cached_tagcontent'
  gitk: Teach "Reread references" to reload tags
  gitk: Avoid Meta1-F5
2012-09-14 20:45:55 -07:00
Junio C Hamano 6711759617 Merge branch 'jc/maint-checkout-fileglob-doc' into maint-1.7.11
* jc/maint-checkout-fileglob-doc:
  gitcli: contrast wildcard given to shell and to git
  gitcli: formatting fix
  Document file-glob for "git checkout -- '*.c'"
2012-09-14 20:45:03 -07:00
Nguyễn Thái Ngọc Duy 218adaaaa0 Revert diffstat back to English
This reverts the i18n part of 7f81463 (Use correct grammar in diffstat
summary line - 2012-02-01) but still keeps the grammar correctness for
English. It also reverts b354f11 (Fix tests under GETTEXT_POISON on
diffstat - 2012-08-27). The result is diffstat always in English
for all commands.

This helps stop users from accidentally sending localized
format-patch'd patches.

Signed-off-by: Nguyễn Thái Ngọc Duy <pclouds@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2012-09-14 09:52:16 -07:00
Junio C Hamano 8e950dab86 attr: failure to open a .gitattributes file is OK with ENOTDIR
Often we consult an in-tree .gitattributes file that exists per
directory.  Majority of directories do not usually have such a file,
and it is perfectly fine if we cannot open it because there is no
such file, but we do want to know when there is an I/O or permission
error.  Earlier, we made the codepath warn when we fail to open it
for reasons other than ENOENT for that reason.

We however sometimes have to attempt to open the .gitattributes file
from a directory that does not exist in the commit that is currently
checked out.  "git pack-objects" wants to know if a path is marked
with "-delta" attributes, and "git archive" wants to know about
export-ignore and export-subst attributes.  Both commands may and do
need to ask the attributes system about paths in an arbitrary
commit.  "git diff", after removing an entire directory, may want to
know textconv on paths that used to be in that directory.

Make sure we also ignore a failure to open per-directory attributes
file due to ENOTDIR.

Signed-off-by: Junio C Hamano <gitster@pobox.com>
2012-09-13 22:15:10 -07:00
Jeremy White 52ffe995b9 Documentation: describe subject more precisely
The discussion of email subject throughout the documentation is
misleading; it indicates that the first line will always become
the subject.  In fact, the subject is generally all lines up until
the first full blank line.

This patch refines that, and makes more use of the concept of a
commit title, with the title being all text up to the first blank line.

Signed-off-by: Jeremy White <jwhite@codeweavers.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2012-09-13 21:30:21 -07:00
Junio C Hamano e70d1632bd Further merging in preparation for 1.7.12.1
Describe the following in the draft release notes:

 . jc/apply-binary-p0
 . jc/dotdot-is-parent-directory
 . jc/maint-doc-checkout-b-always-takes-branch-name
 . jk/maint-http-half-auth-push
 . kk/maint-for-each-ref-multi-sort

Yet to be merged before 1.7.12.1 are:

 . jk/config-warn-on-inaccessible-paths
 . jk/maint-quiet-is-synonym-to-s-in-log
 . mz/cherry-pick-cmdline-order

Signed-off-by: Junio C Hamano <gitster@pobox.com>
2012-09-12 14:12:48 -07:00
Junio C Hamano 3503e9ab32 Merge branch 'maint-1.7.11' into maint 2012-09-12 14:08:05 -07:00
Junio C Hamano 1403db49b8 Merge branch 'jc/apply-binary-p0' into maint-1.7.11
"git apply -p0" did not parse pathnames on "diff --git" line
correctly.  This caused patches that had pathnames in no other
places to be mistakenly rejected (most notably, binary patch that
does not rename nor change mode).  Textual patches, renames or mode
changes have preimage and postimage pathnames in different places in
a form that can be parsed unambiguously and did not suffer from this
problem.

* jc/apply-binary-p0:
  apply: compute patch->def_name correctly under -p0
2012-09-12 14:00:53 -07:00
Junio C Hamano eaff724bbc Merge branch 'jc/dotdot-is-parent-directory' into maint-1.7.11
"git log .." errored out saying it is both rev range and a path when
there is no disambiguating "--" is on the command line.  Update the
command line parser to interpret ".." as a path in such a case.

* jc/dotdot-is-parent-directory:
  specifying ranges: we did not mean to make ".." an empty set
2012-09-12 14:00:34 -07:00
Junio C Hamano 1b8bc86b5e Merge branch 'jc/maint-doc-checkout-b-always-takes-branch-name' into maint-1.7.11
The synopsis said "checkout [-B branch]" to make it clear the
branch name is a parameter to the option, but the heading for the
option description was "-B::", not "-B branch::", making the
documentation misleading.

* jc/maint-doc-checkout-b-always-takes-branch-name:
  doc: "git checkout -b/-B/--orphan" always takes a branch name
2012-09-12 13:59:58 -07:00
Junio C Hamano 7d9483c299 Merge branch 'jk/maint-http-half-auth-push' into maint-1.7.11
Pushing to smart HTTP server with recent Git fails without having
the username in the URL to force authentication, if the server is
configured to allow GET anonymously, while requiring authentication
for POST.

* jk/maint-http-half-auth-push:
  http: prompt for credentials on failed POST
  http: factor out http error code handling
  t: test http access to "half-auth" repositories
  t: test basic smart-http authentication
  t/lib-httpd: recognize */smart/* repos as smart-http
  t/lib-httpd: only route auth/dumb to dumb repos
  t5550: factor out http auth setup
  t5550: put auth-required repo in auth/dumb
2012-09-12 13:58:23 -07:00
Junio C Hamano 92c830dd35 Merge branch 'kk/maint-for-each-ref-multi-sort' into maint-1.7.11
"git for-each-ref" did not honor multiple "--sort=<key>" arguments
correctly.

* kk/maint-for-each-ref-multi-sort:
  for-each-ref: Fix sort with multiple keys
  t6300: test sort with multiple keys
2012-09-12 13:57:43 -07:00
Junio C Hamano cbd6b089e8 Further merging down for 1.7.12.1
We will wait for a handful of other fixes that have graduated to the
'master' for 1.8.0 to be tested in the wild and then tag 1.7.12.1:

 . mz/cherry-pick-cmdline-order
 . jk/maint-quiet-is-synonym-to-s-in-log
 . jk/maint-http-half-auth-push
 . jc/apply-binary-p0
 . jk/config-warn-on-inaccessible-paths
 . kk/maint-for-each-ref-multi-sort

Signed-off-by: Junio C Hamano <gitster@pobox.com>
2012-09-11 11:27:35 -07:00
Junio C Hamano 1c88a6d174 Sync with 1.7.11.6
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2012-09-11 11:23:54 -07:00
Junio C Hamano 3119084104 Merge branch 'js/use-sc-open-max' into maint
* js/use-sc-open-max:
  sha1_file.c: introduce get_max_fd_limit() helper
2012-09-11 11:23:06 -07:00
Junio C Hamano 23328344a9 Merge branch 'js/no-curl-easy-strerror-on-old-curl' into maint
* js/no-curl-easy-strerror-on-old-curl:
  http.c: don't use curl_easy_strerror prior to curl-7.12.0
2012-09-11 11:22:58 -07:00
Junio C Hamano e09e4024a0 Git 1.7.11.6
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2012-09-11 11:18:48 -07:00
Junio C Hamano 23242a6f9e Merge branch 'jc/maint-mergetool-style-fix' into maint-1.7.11
* jc/maint-mergetool-style-fix:
  mergetool: style fixes
2012-09-11 11:10:23 -07:00
Junio C Hamano ee7a83f631 Merge branch 'sz/submodule-force-update' into maint-1.7.11
* sz/submodule-force-update:
  Make 'git submodule update --force' always check out submodules.
2012-09-11 11:10:17 -07:00
Junio C Hamano ef92392b6c Merge branch 'ph/stash-rerere' into maint-1.7.11
* ph/stash-rerere:
  stash: invoke rerere in case of conflict
  test: git-stash conflict sets up rerere
2012-09-11 11:10:12 -07:00