1
0
mirror of https://github.com/git/git.git synced 2024-10-21 08:08:16 +02:00
Commit Graph

26505 Commits

Author SHA1 Message Date
Junio C Hamano
e2d0a2e440 Merge branch 'jk/maint-fetch-submodule-check-fix' into maint
* jk/maint-fetch-submodule-check-fix:
  fetch: avoid quadratic loop checking for updated submodules
2011-10-15 20:46:38 -07:00
Junio C Hamano
8f858299b5 Merge branch 'tr/mergetool-valgrind' into maint
* tr/mergetool-valgrind:
  Symlink mergetools scriptlets into valgrind wrappers
2011-10-15 20:46:37 -07:00
Junio C Hamano
7c4f050ae1 Merge branch 'nm/grep-object-sha1-lock' into maint
* nm/grep-object-sha1-lock:
  grep: Fix race condition in delta_base_cache

Conflicts:
	builtin/grep.c
2011-10-15 20:46:37 -07:00
Junio C Hamano
fc26f57b84 Merge branch 'jc/diff-index-unpack' into maint
* jc/diff-index-unpack:
  diff-index: pass pathspec down to unpack-trees machinery
  unpack-trees: allow pruning with pathspec
  traverse_trees(): allow pruning with pathspec
2011-10-15 20:46:36 -07:00
Junio C Hamano
57ded055c4 Merge branch 'mm/rebase-i-exec-edit' into maint
* mm/rebase-i-exec-edit:
  rebase -i: notice and warn if "exec $cmd" modifies the index or the working tree
  rebase -i: clean error message for --continue after failed exec
2011-10-15 20:46:36 -07:00
René Scharfe
ac2604cf5f t1304: fall back to $USER if $LOGNAME is not defined
For some reason $LOGNAME is not set anymore for me after an upgrade from
Ubuntu 11.04 to 11.10.  Use $USER in such a case.

Signed-off-by: Rene Scharfe <rene.scharfe@lsrfire.ath.cx>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2011-10-14 11:41:28 -07:00
Junio C Hamano
703f05ad58 Git 1.7.7
Signed-off-by: Junio C Hamano <gitster@pobox.com>
v1.7.7
2011-09-30 14:20:57 -07:00
Gerrit Pape
8d714b11df templates/hooks--*: remove sample hooks without any functionality
Remove the sample post-commit and post-receive hooks.  The sample
post-commit doesn't contain any sample functionality and the comments do
not provide more information than already found in the documentation.
The sample post-receive hooks doesn't provide any sample functionality
either and refers in the comments to a contrib hook that might be
installed in different locations on different systems, which isn't that
helpful.

Signed-off-by: Gerrit Pape <pape@smarden.org>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2011-09-27 10:00:35 -07:00
Gerrit Pape
f6f17885ba contrib/hooks: adapt comment about Debian install location for contrib hooks
Placing the contrib hooks into /usr/share/doc/ wasn't a good idea in the
first place.  According to the Debian policy they should be located in
/usr/share/git-core/, so let's put them there.

Thanks to Bill Allombert for reporting this through
 http://bugs.debian.org/640949

Signed-off-by: Gerrit Pape <pape@smarden.org>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2011-09-26 16:39:34 -07:00
Junio C Hamano
614583fa23 Merge branch 'jc/namespace-doc-with-old-asciidoc'
* jc/namespace-doc-with-old-asciidoc:
  Documentation/gitnamespaces.txt: cater to older asciidoc
2011-09-26 10:50:08 -07:00
Junio C Hamano
85e9c7e1d4 Git 1.7.7-rc3
Signed-off-by: Junio C Hamano <gitster@pobox.com>
v1.7.7-rc3
2011-09-23 15:35:57 -07:00
Junio C Hamano
b7619006eb Merge 1.7.6.4 in
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2011-09-23 15:31:08 -07:00
Junio C Hamano
d45b7f40b3 merge-recursive: Do not look at working tree during a virtual ancestor merge
Fix another instance of a recursive merge incorrectly paying attention to
the working tree file during a virtual ancestor merge, that resulted in
spurious and useless "addinfo_cache failed" error message.

Signed-off-by: Junio C Hamano <gitster@pobox.com>
2011-09-23 15:21:01 -07:00
Junio C Hamano
6320526415 Git 1.7.6.4
Signed-off-by: Junio C Hamano <gitster@pobox.com>
v1.7.6.4
2011-09-23 14:43:05 -07:00
Junio C Hamano
a0b1cb60ab Merge branch 'cb/maint-ls-files-error-report' into maint
* cb/maint-ls-files-error-report:
  t3005: do not assume a particular order of stdout and stderr of git-ls-files
  ls-files: fix pathspec display on error
2011-09-23 14:30:49 -07:00
Allan Caffee
85b3c75f4f describe: Refresh the index when run with --dirty
When running git describe --dirty the index should be refreshed.  Previously
the cached index would cause describe to think that the index was dirty when,
in reality, it was just stale.

The issue was exposed by python setuptools which hardlinks files into another
directory when building a distribution.

Signed-off-by: Junio C Hamano <gitster@pobox.com>
2011-09-23 14:28:17 -07:00
Junio C Hamano
84b051462f Merge branch 'jc/maint-clone-alternates' into maint
* jc/maint-clone-alternates:
  clone: clone from a repository with relative alternates
  clone: allow more than one --reference
2011-09-23 14:27:33 -07:00
Junio C Hamano
406c1c4dd4 Merge branch 'nd/maint-clone-gitdir' into maint
* nd/maint-clone-gitdir:
  clone: allow to clone from .git file
  read_gitfile_gently(): rename misnamed function to read_gitfile()
2011-09-23 14:21:39 -07:00
Junio C Hamano
be5acb3b63 Merge branch 'mh/check-ref-format-print-normalize' into maint
* mh/check-ref-format-print-normalize:
  Forbid DEL characters in reference names
  check-ref-format --print: Normalize refnames that start with slashes
2011-09-23 14:20:51 -07:00
Junio C Hamano
503359f13a Merge branch 'mg/branch-set-upstream-previous' into maint
* mg/branch-set-upstream-previous:
  branch.c: use the parsed branch name
2011-09-23 14:16:22 -07:00
Junio C Hamano
40ffc49876 Merge branch 'gb/maint-am-patch-format-error-message' into maint
* gb/maint-am-patch-format-error-message:
  am: format is in $patch_format, not parse_patch
2011-09-23 14:11:18 -07:00
Junio C Hamano
5ec8217eb6 Merge branch 'maint'
* maint:
  git-mergetool: check return value from read
2011-09-19 20:46:48 -07:00
Jay Soffian
e622f41dcd git-mergetool: check return value from read
Mostly fixed already by 6b44577 (mergetool: check return value
from read, 2011-07-01). Catch two uses it missed.

Signed-off-by: Jay Soffian <jaysoffian@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2011-09-19 17:41:49 -07:00
Junio C Hamano
9b502a371e Merge branch 'ph/format-patch-no-color'
* ph/format-patch-no-color:
  t4014: clean up format.thread config after each test
2011-09-19 13:15:41 -07:00
Jeff King
e810715528 t4014: clean up format.thread config after each test
The threading tests turn on format.thread, but never clean
up after themselves, meaning that later tests will also have
format.thread set.

This is more annoying than most leftover config, too,
because not only does it impact the results of other tests,
but it does so non-deterministically. Threading requires the
generation of message-ids, which incorporate the current
time, meaning a slow-running test script may generate
different results from run to run.

Signed-off-by: Jeff King <peff@peff.net>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2011-09-19 13:14:32 -07:00
Junio C Hamano
167a5800cb Git 1.7.7-rc2
Signed-off-by: Junio C Hamano <gitster@pobox.com>
v1.7.7-rc2
2011-09-18 15:41:34 -07:00
Junio C Hamano
c103e9529c Merge branch 'ci/forbid-unwanted-current-branch-update'
* ci/forbid-unwanted-current-branch-update:
  branch --set-upstream: regression fix
2011-09-16 21:48:10 -07:00
Junio C Hamano
fa79937675 branch --set-upstream: regression fix
The "git branch" command, while not in listing mode, calls create_branch()
even when the target branch already exists, and it does so even when it is
not interested in updating the value of the branch (i.e. the name of the
commit object that sits at the tip of the existing branch). This happens
when the command is run with "--set-upstream" option.

The earlier safety-measure to prevent "git branch -f $branch $commit" from
updating the currently checked out branch did not take it into account,
and we no longer can update the tracking information of the current branch.

Minimally fix this regression by telling the validation code if it is
called to really update the value of a potentially existing branch, or if
the caller merely is interested in updating auxiliary aspects of a branch.

Reported-and-Tested-by: Jay Soffian
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2011-09-16 21:47:47 -07:00
Frédéric Heitzmann
26e4266f2f Disambiguate duplicate t9160* tests
1e5814f created t9160-git-svn-mergeinfo-push.sh on 11/9/7
40a1530 created t9160-git-svn-preserve-empty-dirs.sh on 11/7/20
The former test script is renumbered to t9161.

Signed-off-by: Frédéric Heitzmann <frederic.heitzmann@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2011-09-16 14:06:19 -07:00
Junio C Hamano
4c1be38b4a Documentation/gitnamespaces.txt: cater to older asciidoc
Older asciidoc (e.g. 8.2.5 on Centos 5.5) is unhappy if a manpage does not
have a SYNOPSIS section. Show a sample (and a possibly bogus) command line
of running two commands that pay attention to this environment variable
with a customized value.

Signed-off-by: Junio C Hamano <gitster@pobox.com>
Reviewed-by: Jamey Sharp <jamey@minilop.net>
2011-09-16 09:20:23 -07:00
Junio C Hamano
559357b508 Merge branch 'ph/format-patch-no-color'
* ph/format-patch-no-color:
  format-patch: ignore ui.color
2011-09-14 21:43:57 -07:00
Bryan Jacobs
1e5814f3de git-svn: teach git-svn to populate svn:mergeinfo
Allow git-svn to populate the svn:mergeinfo property automatically in
a narrow range of circumstances. Specifically, when dcommitting a
revision with multiple parents, all but (potentially) the first of
which have been committed to SVN in the same repository as the target
of the dcommit.

In this case, the merge info is the union of that given by each of the
parents, plus all changes introduced to the first parent by the other
parents.

In all other cases where a revision to be committed has multiple
parents, cause "git svn dcommit" to raise an error rather than
completing the commit and potentially losing history information in
the upstream SVN repository.

This behavior is disabled by default, and can be enabled by setting
the svn.pushmergeinfo config option.

[ew: minor style changes and manpage merge fix]

Acked-by: Eric Wong <normalperson@yhbt.net>
Signed-off-by: Bryan Jacobs <bjacobs@woti.com>
2011-09-13 08:12:13 +00:00
Jeff King
6859de45a9 fetch: avoid quadratic loop checking for updated submodules
Recent versions of git can be slow to fetch repositories with a
large number of refs (or when they already have a large
number of refs). For example, GitHub makes pull-requests
available as refs, which can lead to a large number of
available refs. This slowness goes away when submodule
recursion is turned off:

  $ git ls-remote git://github.com/rails/rails.git | wc -l
  3034

  [this takes ~10 seconds of CPU time to complete]
  git fetch --recurse-submodules=no \
    git://github.com/rails/rails.git "refs/*:refs/*"

  [this still isn't done after 10 _minutes_ of pegging the CPU]
  git fetch \
    git://github.com/rails/rails.git "refs/*:refs/*"

You can produce a quicker and simpler test case like this:

  doit() {
    head=`git rev-parse HEAD`
    for i in `seq 1 $1`; do
      echo $head refs/heads/ref$i
    done >.git/packed-refs
    echo "==> $1"
    rm -rf dest
    git init -q --bare dest &&
      (cd dest && time git.compile fetch -q .. refs/*:refs/*)
  }

  rm -rf repo
  git init -q repo && cd repo &&
  >file && git add file && git commit -q -m one

  doit 100
  doit 200
  doit 400
  doit 800
  doit 1600
  doit 3200

Which yields timings like:

  # refs  seconds of CPU
     100            0.06
     200            0.24
     400            0.95
     800            3.39
    1600           13.66
    3200           54.09

Notice that although the number of refs doubles in each
trial, the CPU time spent quadruples.

The problem is that the submodule recursion code works
something like:

  - for each ref we fetch
    - for each commit in git rev-list $new_sha1 --not --all
      - add modified submodules to list
  - fetch any newly referenced submodules

But that means if we fetch N refs, we start N revision
walks. Worse, because we use "--all", the number of refs we
must process that constitute "--all" keeps growing, too. And
you end up doing O(N^2) ref resolutions.

Instead, this patch structures the code like this:

  - for each sha1 we already have
    - add $old_sha1 to list $old
  - for each ref we fetch
    - add $new_sha1 to list $new
  - for each commit in git rev-list $new --not $old
    - add modified submodules to list
  - fetch any newly referenced submodules

This yields timings like:

  # refs  seconds of CPU
  100               0.00
  200               0.04
  400               0.04
  800               0.10
  1600              0.21
  3200              0.39

Note that the amount of effort doubles as the number of refs
doubles. Similarly, the fetch of rails.git takes about as
much time as it does with --recurse-submodules=no.

Signed-off-by: Jeff King <peff@peff.net>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2011-09-12 14:16:41 -07:00
Pang Yan Han
787570c7cd format-patch: ignore ui.color
commit c9bfb953 (want_color: automatically fallback to color.ui,
2011-08-17) introduced a regression where format-patch produces colorized
patches when color.ui is set to "always".

In f3aafa4 (Disable color detection during format-patch, 2006-07-09),
git_format_config was taught to intercept diff.color to avoid passing it
down to git_log_config and later, git_diff_ui_config.

Teach git_format_config to intercept color.ui in the same way.

Helped-by: Jeff King <peff@peff.net>
Signed-off-by: Pang Yan Han <pangyanhan@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2011-09-12 11:43:58 -07:00
Junio C Hamano
5738c9c21e Git 1.7.7-rc1
Signed-off-by: Junio C Hamano <gitster@pobox.com>
v1.7.7-rc1
2011-09-12 10:44:32 -07:00
Junio C Hamano
81a5bdd9c5 Sync with 1.7.6.3
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2011-09-12 10:43:17 -07:00
Junio C Hamano
e49450327e Merge branch 'jn/remote-helpers-doc'
* jn/remote-helpers-doc:
  (short) documentation for the testgit remote helper
  Documentation/git-remote-helpers: explain how import works with multiple refs
  Documentation/remote-helpers: explain capabilities first
2011-09-12 10:38:11 -07:00
Junio C Hamano
740a8fc224 Git 1.7.6.3
Signed-off-by: Junio C Hamano <gitster@pobox.com>
v1.7.6.3
2011-09-12 10:33:40 -07:00
Junio C Hamano
8702fee617 Merge branch 'jl/maint-fetch-submodule-check-fix' into maint
* jl/maint-fetch-submodule-check-fix:
  fetch: skip on-demand checking when no submodules are configured
2011-09-12 10:19:57 -07:00
Junio C Hamano
2f9e2e7587 Merge branch 'maint'
* maint:
  Prepare for 1.7.6.3 maintenance release
  SubmittingPathces: remove Cogito reference

Conflicts:
	RelNotes
2011-09-11 22:35:11 -07:00
Junio C Hamano
c2d53586dd Prepare for 1.7.6.3 maintenance release
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2011-09-11 22:33:27 -07:00
Junio C Hamano
e1fd529f2f Merge branch 'ms/reflog-show-is-default' into maint
* ms/reflog-show-is-default:
  reflog: actually default to subcommand 'show'
2011-09-11 22:33:24 -07:00
Junio C Hamano
2f19a52c64 Merge branch 'jk/reset-reflog-message-fix' into maint
* jk/reset-reflog-message-fix:
  reset: give better reflog messages
2011-09-11 22:33:20 -07:00
Junio C Hamano
5d4fcd9ac0 Merge branch 'vi/make-test-vector-less-specific' into maint
* vi/make-test-vector-less-specific:
  tests: cleanup binary test vector files
2011-09-11 22:33:16 -07:00
Junio C Hamano
fcfc2d5879 Merge branch 'jk/tag-contains-ab' (early part) into maint
* 'jk/tag-contains-ab' (early part):
  tag: speed up --contains calculation
2011-09-11 21:54:32 -07:00
Junio C Hamano
908bb1a9b7 Merge branch 'dz/connect-error-report' into maint
* dz/connect-error-report:
  Do not log unless all connect() attempts fail
2011-09-11 21:53:47 -07:00
Junio C Hamano
b3038a5adb Merge branch 'jc/maint-mergetool-read-fix' into maint
* jc/maint-mergetool-read-fix:
  mergetool: check return value from read
2011-09-11 21:53:39 -07:00
Junio C Hamano
eff7c32cfd Merge branch 'jk/maint-config-param' into maint
* jk/maint-config-param:
  config: use strbuf_split_str instead of a temporary strbuf
  strbuf: allow strbuf_split to work on non-strbufs
  config: avoid segfault when parsing command-line config
  config: die on error in command-line config
  fix "git -c" parsing of values with equals signs
  strbuf_split: add a max parameter
2011-09-11 21:53:13 -07:00
Junio C Hamano
7baf32a829 Merge branch 'jn/doc-dashdash' into maint
* jn/doc-dashdash:
  Documentation/i18n: quote double-dash for AsciiDoc
  Documentation: quote double-dash for AsciiDoc

Conflicts:
	Documentation/git-mergetool--lib.txt
2011-09-11 21:52:18 -07:00
Junio C Hamano
3fc44a10f6 Merge branch 'jk/maint-1.7.2-status-ignored' into maint
* jk/maint-1.7.2-status-ignored:
  git status --ignored: tests and docs
  status: fix bug with missing --ignore files

Conflicts:
	Documentation/git-status.txt
	t/t7508-status.sh
2011-09-11 21:51:10 -07:00