1
0
Fork 0
mirror of https://github.com/git/git.git synced 2024-11-02 15:28:21 +01:00
Commit graph

27737 commits

Author SHA1 Message Date
Junio C Hamano
2bbf77dde2 Merge branch 'sp/smart-http-failure-to-push'
* sp/smart-http-failure-to-push:
  remote-curl: Fix push status report when all branches fail
2012-01-29 13:18:54 -08:00
Junio C Hamano
731218c18f Merge branch 'jc/maint-log-first-parent-pathspec'
* jc/maint-log-first-parent-pathspec:
  Making pathspec limited log play nicer with --first-parent
2012-01-29 13:18:54 -08:00
Junio C Hamano
a734e7ef6c Merge branch 'mh/ref-clone-without-extra-refs'
* mh/ref-clone-without-extra-refs:
  write_remote_refs(): create packed (rather than extra) refs
  add_packed_ref(): new function in the refs API.
  ref_array: keep track of whether references are sorted
  pack_refs(): remove redundant check
2012-01-29 13:18:53 -08:00
Junio C Hamano
26ad2168a1 Merge branch 'jl/test-pause'
* jl/test-pause:
  test-lib: add the test_pause convenience function
2012-01-29 13:18:53 -08:00
Junio C Hamano
bff64a9cda Merge branch 'tr/maint-mailinfo'
* tr/maint-mailinfo:
  mailinfo: with -b, keep space after [foo]
  am: learn passing -b to mailinfo

Conflicts:
	git-am.sh
2012-01-29 13:18:53 -08:00
Junio C Hamano
1082fb22b2 Merge branch 'pw/p4-view-updates'
* pw/p4-view-updates:
  git-p4: add tests demonstrating spec overlay ambiguities
  git-p4: adjust test to adhere to stricter useClientSpec
  git-p4: clarify comment
  git-p4: fix verbose comment typo
  git-p4: only a single ... wildcard is supported
2012-01-29 13:18:52 -08:00
Junio C Hamano
02a20d1038 Merge branch 'nd/maint-refname-in-hierarchy-check'
* nd/maint-refname-in-hierarchy-check:
  Fix incorrect ref namespace check
2012-01-29 13:18:51 -08:00
Junio C Hamano
77cdf0f802 Merge branch 'jn/gitweb-unspecified-action'
* jn/gitweb-unspecified-action:
  gitweb: Fix actionless dispatch for non-existent objects
2012-01-29 13:18:50 -08:00
Junio C Hamano
7b718fbf17 Merge branch 'cb/push-quiet'
* cb/push-quiet:
  t5541: avoid TAP test miscounting
  fix push --quiet: add 'quiet' capability to receive-pack
  server_supports(): parse feature list more carefully
2012-01-29 13:18:50 -08:00
Junio C Hamano
7859f533e2 Merge branch 'nd/clone-single-branch'
* nd/clone-single-branch:
  clone: add --single-branch to fetch only one branch
2012-01-29 13:18:50 -08:00
Junio C Hamano
86faaf90b3 Merge branch 'cb/git-daemon-tests'
* cb/git-daemon-tests:
  git-daemon tests: wait until daemon is ready
  git-daemon: produce output when ready
  git-daemon: add tests
2012-01-29 13:18:50 -08:00
Junio C Hamano
6e1c9bb0e0 Merge branch 'cb/maint-kill-subprocess-upon-signal'
* cb/maint-kill-subprocess-upon-signal:
  dashed externals: kill children on exit
  run-command: optionally kill children on exit
2012-01-29 13:18:50 -08:00
Junio C Hamano
828ea97de4 Git 1.7.9
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2012-01-27 11:31:02 -08:00
Junio C Hamano
634a5f265a INSTALL: warn about recent Fedora breakage
Recent releases of Redhat/Fedora are reported to ship Perl binary package
with some core modules stripped away (see http://lwn.net/Articles/477234/)
against the upstream Perl5 people's wishes. The Time::HiRes module used by
gitweb one of them.

Signed-off-by: Junio C Hamano <gitster@pobox.com>
2012-01-26 21:51:29 -08:00
Felipe Contreras
f15026b514 git-completion: workaround zsh COMPREPLY bug
zsh adds a backslash (foo\ ) for each item in the COMPREPLY array if IFS
doesn't contain spaces. This issue has been reported[1], but there is no
solution yet.

This wasn't a problem due to another bug[2], which was fixed in zsh
version 4.3.12. After this change, 'git checkout ma<tab>' would resolve
to 'git checkout master\ '.

Aditionally, the introduction of __gitcomp_nl in commit a31e626
(completion: optimize refs completion) in git also made the problem
apparent, as Matthieu Moy reported.

The simplest and most generic solution is to hide all the changes we do
to IFS, so that "foo \nbar " is recognized by zsh as "foo bar". This
works on versions of git before and after the introduction of
__gitcomp_nl (a31e626), and versions of zsh before and after 4.3.12.

Once zsh is fixed, we should conditionally disable this workaround to
have the same benefits as bash users.

[1] http://www.zsh.org/mla/workers/2012/msg00053.html
[2] http://zsh.git.sourceforge.net/git/gitweb.cgi?p=zsh/zsh;a=commitdiff;h=2e25dfb8fd38dbef0a306282ffab1d343ce3ad8d

Signed-off-by: Felipe Contreras <felipe.contreras@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2012-01-26 14:03:51 -08:00
Jeff King
733137496a docs: minor grammar fixes for v1.7.9 release notes
Signed-off-by: Jeff King <peff@peff.net>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2012-01-26 11:09:08 -08:00
Michael Haggerty
69204d0ab1 Fix typo in 1.7.9 release notes
Signed-off-by: Michael Haggerty <mhagger@alum.mit.edu>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2012-01-23 10:11:13 -08:00
Shawn O. Pearce
5238cbf656 remote-curl: Fix push status report when all branches fail
The protocol between transport-helper.c and remote-curl requires
remote-curl to always print a blank line after the push command
has run. If the blank line is ommitted, transport-helper kills its
container process (the git push the user started) with exit(128)
and no message indicating a problem, assuming the helper already
printed reasonable error text to the console.

However if the remote rejects all branches with "ng" commands in the
report-status reply, send-pack terminates with non-zero status, and
in turn remote-curl exited with non-zero status before outputting
the blank line after the helper status printed by send-pack. No
error messages reach the user.

This caused users to see the following from git push over HTTP
when the remote side's update hook rejected the branch:

  $ git push http://... master
  Counting objects: 4, done.
  Delta compression using up to 6 threads.
  Compressing objects: 100% (2/2), done.
  Writing objects: 100% (3/3), 301 bytes, done.
  Total 3 (delta 0), reused 0 (delta 0)
  $

Always print a blank line after the send-pack process terminates,
ensuring the helper status report (if it was output) will be
correctly parsed by the calling transport-helper.c. This ensures
the helper doesn't abort before the status report can be shown to
the user.

Signed-off-by: Shawn O. Pearce <spearce@spearce.org>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2012-01-20 10:14:32 -08:00
Junio C Hamano
36ed1913e1 Making pathspec limited log play nicer with --first-parent
In a topic branch workflow, you often want to find the latest commit that
merged a side branch that touched a particular area of the system, so that
a new topic branch to work on that area can be forked from that commit.
For example, I wanted to find an appropriate fork-point to queue Luke's
changes related to git-p4 in contrib/fast-import/.

"git log --first-parent" traverses the first-parent chain, and "-m --stat"
shows the list of paths touched by commits including merge commits.  We
could ask the question this way:

    # What is the latest commit that touched that path?
    $ git log --first-parent --oneline -m --stat master |
      sed -e '/^ contrib\/fast-import\/git-p4 /q' | tail

The above finds that 8cbfc11 (Merge branch 'pw/p4-view-updates',
2012-01-06) was such a commit.

But a more natural way to spell this question is this:

    $ git log --first-parent --oneline -m --stat -1 master -- \
      contrib/fast-import/git-p4

Unfortunately, this does not work. It finds ecb7cf9 (git-p4: rewrite view
handling, 2012-01-02). This commit is a part of the merged topic branch
and is _not_ on the first-parent path from the 'master':

    $ git show-branch 8cbfc11 ecb7cf9
    ! [8cbfc11] Merge branch 'pw/p4-view-updates'
     ! [ecb7cf9] git-p4: rewrite view handling
    --
    -  [8cbfc11] Merge branch 'pw/p4-view-updates'
    +  [8cbfc11^2] git-p4: view spec documentation
    ++ [ecb7cf9] git-p4: rewrite view handling

The problem is caused by the merge simplification logic when it inspects
the merge commit 8cbfc11. In this case, the history leading to the tip of
'master' did not touch git-p4 since 'pw/p4-view-updates' topic forked, and
the result of the merge is simply a copy from the tip of the topic branch
in the view limited by the given pathspec.  The merge simplification logic
discards the history on the mainline side of the merge, and pretends as if
the sole parent of the merge is its second parent, i.e. the tip of the
topic. While this simplification is correct in the general case, it is at
least surprising if not outright wrong when the user explicitly asked to
show the first-parent history.

Here is an attempt to fix this issue, by not allowing us to compare the
merge result with anything but the first parent when --first-parent is in
effect, to avoid the history traversal veering off to the side branch.

Signed-off-by: Junio C Hamano <gitster@pobox.com>
2012-01-19 16:18:27 -08:00
Junio C Hamano
bddcefc638 Git 1.7.9-rc2
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2012-01-18 15:53:35 -08:00
Junio C Hamano
6e06367ab0 Merge branch 'maint'
* maint:
  Git 1.7.8.4
  Git 1.7.7.6
  diff-index: enable recursive pathspec matching in unpack_trees

Conflicts:
	GIT-VERSION-GEN
2012-01-18 15:52:08 -08:00
Junio C Hamano
c572f491e5 Git 1.7.8.4
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2012-01-18 15:51:00 -08:00
Junio C Hamano
d899cf559b Merge branch 'maint-1.7.7' into maint
* maint-1.7.7:
  Git 1.7.7.6
  diff-index: enable recursive pathspec matching in unpack_trees

Conflicts:
	GIT-VERSION-GEN
2012-01-18 15:48:46 -08:00
Junio C Hamano
0065343548 Git 1.7.7.6
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2012-01-18 15:46:31 -08:00
Nguyen Thai Ngoc Duy
5c8eeb83db diff-index: enable recursive pathspec matching in unpack_trees
The pathspec structure has a few bits of data to drive various operation
modes after we unified the pathspec matching logic in various codepaths.
For example, max_depth field is there so that "git grep" can limit the
output for files found in limited depth of tree traversal. Also in order
to show just the surface level differences in "git diff-tree", recursive
field stops us from descending into deeper level of the tree structure
when it is set to false, and this also affects pathspec matching when
we have wildcards in the pathspec.

The diff-index has always wanted the recursive behaviour, and wanted to
match pathspecs without any depth limit. But we forgot to do so when we
updated tree_entry_interesting() logic to unify the pathspec matching
logic.

Signed-off-by: Nguyễn Thái Ngọc Duy <pclouds@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2012-01-18 15:44:02 -08:00
Junio C Hamano
32c94f97b0 Merge branch 'jc/pull-signed-tag-doc'
* jc/pull-signed-tag-doc:
  pulling signed tag: add howto document
2012-01-18 15:18:02 -08:00
Junio C Hamano
11b17afc93 pulling signed tag: add howto document
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2012-01-18 15:17:27 -08:00
Junio C Hamano
1a2278084f Merge branch 'jk/credentials'
* jk/credentials:
  credential-cache: ignore "connection refused" errors
  unix-socket: do not let close() or chdir() clobber errno during cleanup
  credential-cache: report more daemon connection errors
  unix-socket: handle long socket pathnames
2012-01-18 15:16:53 -08:00
Junio C Hamano
c74f97a624 Merge branch 'nd/pathspec-recursion-cleanup'
* nd/pathspec-recursion-cleanup:
  diff-index: enable recursive pathspec matching in unpack_trees
  Document limited recursion pathspec matching with wildcards
2012-01-18 15:16:43 -08:00
Junio C Hamano
8ef7933880 Merge branch 'mh/maint-show-ref-doc'
* mh/maint-show-ref-doc:
  git-show-ref doc: typeset regexp in fixed width font
  git-show-ref: fix escaping in asciidoc source
2012-01-18 15:16:23 -08:00
Junio C Hamano
05c65cb116 Merge branch 'tr/maint-word-diff-incomplete-line'
* tr/maint-word-diff-incomplete-line:
  word-diff: ignore '\ No newline at eof' marker
2012-01-18 15:16:19 -08:00
Jens Lehmann
c4d2539af7 test-lib: add the test_pause convenience function
Since 781f76b15 (test-lib: redirect stdin of tests) you can't simply put a
"bash &&" into a test for debugging purposes anymore. Instead you'll have
to use "bash <&6 >&3 2>&4".

As that invocation is not that easy to remember add the test_pause
convenience function. It invokes "$SHELL_PATH" to provide a sane shell
for the user.

This function also checks if the -v flag is given and will error out if
that is not the case instead of letting the test hang until ^D is pressed.

Signed-off-by: Jens Lehmann <Jens.Lehmann@web.de>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2012-01-17 15:15:35 -08:00
Michael Haggerty
39ef7fae9a write_remote_refs(): create packed (rather than extra) refs
write_remote_refs() creates new packed refs from references obtained
from the remote repository, which is "out of thin air" as far as the
local repository is concerned.  Previously it did this by creating
"extra" refs, then calling pack_refs() to bake them into the
packed-refs file.  Instead, create packed refs (in the packed
reference cache) directly, then call pack_refs().

Aside from being more logical, this is another step towards removing
extra refs entirely.

Signed-off-by: Michael Haggerty <mhagger@alum.mit.edu>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2012-01-17 11:55:04 -08:00
Michael Haggerty
30249ee68f add_packed_ref(): new function in the refs API.
Add a new function add_packed_ref() that adds a reference directly to
the in-memory packed reference cache.  This will be useful for
creating local references while cloning.

Signed-off-by: Michael Haggerty <mhagger@alum.mit.edu>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2012-01-17 11:55:04 -08:00
Michael Haggerty
e6ed3ca651 ref_array: keep track of whether references are sorted
Keep track of how many entries at the beginning of a ref_array are already
sorted.  In sort_ref_array(), return early if the the array is already
sorted (i.e., if no new references has been appended to the end of the
list since the last call to sort_ref_array()).

Sort ref_arrays only when needed, namely in search_ref_array() and in
do_for_each_ref().  However, never call sort_ref_array() on the
extra_refs, because extra_refs can contain multiple entries with the same
name and because sort_ref_array() not only sorts, but de-dups its
contents.

This change is currently not useful, because entries are not added to
ref_arrays after they are created.  But in a moment they will be...

Implementation note: we could store a binary "sorted" value instead of
an integer, but storing the number of sorted entries leaves the way
open for a couple of possible future optimizations:

* In sort_ref_array(), sort *only* the unsorted entries, then merge
  them with the sorted entries.  This should be faster if most of the
  entries are already sorted.

* Teach search_ref_array() to do a binary search of any sorted
  entries, and if unsuccessful do a linear search of any unsorted
  entries.  This would avoid the need to sort the list every time that
  search_ref_array() is called, and (given some intelligence about how
  often to sort) could significantly improve the speed in certain
  hypothetical usage patterns.

Signed-off-by: Michael Haggerty <mhagger@alum.mit.edu>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2012-01-17 11:53:21 -08:00
Michael Haggerty
e45a59955e pack_refs(): remove redundant check
handle_one_ref() only adds refs to the cbdata.ref_to_prune list if
(cbdata.flags & PACK_REFS_PRUNE) is set.  So any references in this
list at the end of pack_refs() can be pruned unconditionally.

Signed-off-by: Michael Haggerty <mhagger@alum.mit.edu>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2012-01-17 11:41:41 -08:00
Jeff King
35a71f1402 credential-cache: ignore "connection refused" errors
The credential-cache helper will try to connect to its
daemon over a unix socket. Originally, a failure to do so
was silently ignored, and we would either give up (if
performing a "get" or "erase" operation), or spawn a new
daemon (for a "store" operation).

But since 8ec6c8d, we try to report more errors. We detect a
missing daemon by checking for ENOENT on our connection
attempt.  If the daemon is missing, we continue as before
(giving up or spawning a new daemon). For any other error,
we die and report the problem.

However, checking for ENOENT is not sufficient for a missing
daemon. We might also get ECONNREFUSED if a dead daemon
process left a stale socket. This generally shouldn't
happen, as the daemon cleans up after itself, but the daemon
may not always be given a chance to do so (e.g., power loss,
"kill -9").

The resulting state is annoying not just because the helper
outputs an extra useless message, but because it actually
blocks the helper from spawning a new daemon to replace the
stale socket.

Fix it by checking for ECONNREFUSED.

Signed-off-by: Jeff King <peff@peff.net>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2012-01-16 22:15:19 -08:00
Junio C Hamano
b63103e908 Merge branch 'jn/maint-gitweb-grep-fix'
* jn/maint-gitweb-grep-fix:
  gitweb: Harden "grep" search against filenames with ':'
  gitweb: Fix file links in "grep" search
2012-01-16 16:45:56 -08:00
Thomas Rast
ee2d1cb402 mailinfo: with -b, keep space after [foo]
The logic for the -b mode, where [PATCH] is dropped but [foo] is not,
silently ate all spaces after the ].

Fix this by keeping the next isspace() character, if there is any.
Being more thorough is pointless, as the later cleanup_space() call
will normalize any sequence of whitespace to a single ' '.

Signed-off-by: Thomas Rast <trast@student.ethz.ch>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2012-01-16 16:06:57 -08:00
Thomas Rast
f7e5ea171b am: learn passing -b to mailinfo
git-am could pass -k to mailinfo, but not -b.  Introduce an option
that does so.  We change the meaning of the 'keep' state file, but are
careful not to cause a problem unless you downgrade in the middle of
an 'am' run.

This uncovers a bug in mailinfo -b, hence the failing test.

Signed-off-by: Thomas Rast <trast@student.ethz.ch>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2012-01-16 16:04:52 -08:00
Nguyen Thai Ngoc Duy
4838237cb7 diff-index: enable recursive pathspec matching in unpack_trees
The pathspec structure has a few bits of data to drive various operation
modes after we unified the pathspec matching logic in various codepaths.
For example, max_depth field is there so that "git grep" can limit the
output for files found in limited depth of tree traversal. Also in order
to show just the surface level differences in "git diff-tree", recursive
field stops us from descending into deeper level of the tree structure
when it is set to false, and this also affects pathspec matching when
we have wildcards in the pathspec.

The diff-index has always wanted the recursive behaviour, and wanted to
match pathspecs without any depth limit. But we forgot to do so when we
updated tree_entry_interesting() logic to unify the pathspec matching
logic.

Signed-off-by: Nguyễn Thái Ngọc Duy <pclouds@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2012-01-16 14:17:18 -08:00
Nguyễn Thái Ngọc Duy
8c69c1f92e Document limited recursion pathspec matching with wildcards
It's actually unlimited recursion if wildcards are active regardless
--max-depth

Signed-off-by: Nguyễn Thái Ngọc Duy <pclouds@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2012-01-14 18:39:04 -08:00
Michael Haggerty
87b340b967 git-show-ref doc: typeset regexp in fixed width font
Signed-off-by: Michael Haggerty <mhagger@alum.mit.edu>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2012-01-13 09:50:45 -08:00
Michael Haggerty
6ab260809b git-show-ref: fix escaping in asciidoc source
Two "^" characters were incorrectly being interpreted as markup for
superscripting.  Fix them by writing them as attribute references
"{caret}".

Although a single "^" character in a paragraph cannot be
misinterpreted in this way, also write other "^" characters as
"{caret}" in the interest of good hygiene (unless they are in literal
paragraphs, of course, in which context attribute references are not
recognized).

Spell "{}" consistently, namely *not* quoted as "\{\}".  Since the
braces are empty, they cannot be interpreted as an attribute
reference, and either spelling is OK.  So arbitrarily choose one
variation and use it consistently.

Signed-off-by: Michael Haggerty <mhagger@alum.mit.edu>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2012-01-13 09:50:17 -08:00
Junio C Hamano
6db5c6e43d Git 1.7.9-rc1
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2012-01-12 23:43:28 -08:00
Junio C Hamano
478c44658e Merge branch 'jc/request-pull-show-head-4'
* jc/request-pull-show-head-4:
  request-pull: use the real fork point when preparing the message
2012-01-12 23:34:30 -08:00
Junio C Hamano
b51ffa80f6 Merge branch 'tr/maint-mailinfo'
* tr/maint-mailinfo:
  mailinfo documentation: accurately describe non -k case
2012-01-12 23:34:26 -08:00
Junio C Hamano
96e3360997 Merge branch 'ss/maint-msys-cvsexportcommit'
* ss/maint-msys-cvsexportcommit:
  git-cvsexportcommit: Fix calling Perl's rel2abs() on MSYS
  t9200: On MSYS, do not pass Windows-style paths to CVS
2012-01-12 23:34:21 -08:00
Junio C Hamano
bdb8cb5296 Merge branch 'jk/maint-upload-archive'
* jk/maint-upload-archive:
  archive: re-allow HEAD:Documentation on a remote invocation
2012-01-12 23:34:17 -08:00
Junio C Hamano
c4a01a3cbb Merge branch 'maint'
* maint:
  Update draft release notes to 1.7.8.4
  Update draft release notes to 1.7.7.6
  Update draft release notes to 1.7.6.6
  thin-pack: try harder to use preferred base objects as base
2012-01-12 23:33:39 -08:00