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

26526 Commits

Author SHA1 Message Date
Junio C Hamano
9eb765d5f4 Merge branch 'bc/unstash-clean-crufts'
* bc/unstash-clean-crufts:
  git-stash: remove untracked/ignored directories when stashed
  t/t3905: add missing '&&' linkage
  git-stash.sh: fix typo in error message
  t/t3905: use the name 'actual' for test output, swap arguments to test_cmp
2011-10-05 12:36:17 -07:00
Junio C Hamano
7af4d3468f Merge branch 'fk/make-auto-header-dependencies'
* fk/make-auto-header-dependencies:
  Makefile: Use computed header dependencies if the compiler supports it
2011-10-05 12:36:16 -07:00
Junio C Hamano
75abfa62fb Merge branch 'ms/patch-id-with-overlong-line'
* ms/patch-id-with-overlong-line:
  patch-id.c: use strbuf instead of a fixed buffer
2011-10-05 12:35:55 -07:00
Junio C Hamano
9e3e789e70 Merge branch 'jc/maint-bundle-too-quiet'
* jc/maint-bundle-too-quiet:
  Teach progress eye-candy to fetch_refs_from_bundle()
2011-10-05 12:35:55 -07:00
Junio C Hamano
9c14001650 Merge branch 'jk/filter-branch-require-clean-work-tree'
* jk/filter-branch-require-clean-work-tree:
  filter-branch: use require_clean_work_tree
2011-10-05 12:35:55 -07:00
Junio C Hamano
c672f01c04 Merge branch 'jc/want-commit'
* jc/want-commit:
  Allow git merge ":/<pattern>"
2011-10-05 12:35:55 -07:00
Junio C Hamano
e2b1405b94 Merge branch 'jc/maint-fsck-fwrite-size-check'
* jc/maint-fsck-fwrite-size-check:
  fsck: do not abort upon finding an empty blob
2011-10-05 12:35:54 -07:00
Junio C Hamano
8f4c996fc3 Merge branch 'bk/ancestry-path'
* bk/ancestry-path:
  t6019: avoid refname collision on case-insensitive systems
  revision: do not include sibling history in --ancestry-path output
  revision: keep track of the end-user input from the command line
  rev-list: Demonstrate breakage with --ancestry-path --all
2011-10-05 12:35:54 -07:00
Junio C Hamano
6be70d6bb9 Merge branch 'jk/maint-fetch-submodule-check-fix'
* jk/maint-fetch-submodule-check-fix:
  fetch: avoid quadratic loop checking for updated submodules
2011-10-05 12:35:54 -07:00
Junio C Hamano
c4800a3b77 Merge branch 'tr/mergetool-valgrind'
* tr/mergetool-valgrind:
  Symlink mergetools scriptlets into valgrind wrappers
2011-10-05 12:35:53 -07:00
Junio C Hamano
00723b0291 Merge branch 'nm/grep-object-sha1-lock'
* nm/grep-object-sha1-lock:
  grep: Fix race condition in delta_base_cache

Conflicts:
	builtin/grep.c
2011-10-05 12:35:53 -07:00
Junio C Hamano
1b840a5662 Merge branch 'jc/diff-index-unpack'
* 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-05 12:35:53 -07:00
Junio C Hamano
2c46103931 Merge branch 'mm/rebase-i-exec-edit'
* 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-05 12:35:52 -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
Michael Schubert
b9ab810b18 patch-id.c: use strbuf instead of a fixed buffer
get_one_patchid() uses a rather dumb heuristic to determine if the
passed buffer is part of the next commit. Whenever the first 40 bytes
are a valid hexadecimal sha1 representation, get_one_patchid() returns
next_sha1.

Once the current line is longer than the fixed buffer, this will break
(provided the additional bytes make a valid hexadecimal sha1). As a result
patch-id returns incorrect results. Instead, use strbuf and read one line
at a time.

Helped-by: Jeff King <peff@peff.net>
Signed-off-by: Michael Schubert <mschub@elegosoft.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2011-09-22 09:35:07 -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
be042aff24 Teach progress eye-candy to fetch_refs_from_bundle()
With the usual "git" transport, a large-ish transfer with "git fetch" and
"git pull" give progress eye-candy to avoid boring users.  However, not
when they are reading from a bundle. I.e.

    $ git pull ../git-bundle.bndl master

This teaches bundle.c:unbundle() to give "-v" option to index-pack and
tell it to give progress bar when transport decides it is necessary.

The operation in the other direction, "git bundle create", could also
learn to honor --quiet but that is a separate issue.

Signed-off-by: Junio C Hamano <gitster@pobox.com>
2011-09-19 11:07:21 -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
Jeff King
5347a50fec filter-branch: use require_clean_work_tree
Filter-branch already requires that we have a clean work
tree before starting. However, it failed to refresh the
index before checking, which means it could be wrong in the
case of stat-dirtiness.

Instead of simply adding a call to refresh the index, let's
switch to using the require_clean_work_tree function
provided by git-sh-setup. It does exactly what we want, and
with fewer lines of code and more specific output messages.

Signed-off-by: Jeff King <peff@peff.net>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2011-09-15 16:58:55 -07:00
Junio C Hamano
6099835c19 Allow git merge ":/<pattern>"
It probably is not such a good idea to use ":/<pattern>" to specify which
commit to merge, as ":/<pattern>" can often hit unexpected commits, but
somebody tried it and got a nonsense error message:

	fatal: ':/Foo bar' does not point to a commit

So here is a for-the-sake-of-consistency update that is fairly useless
that allows users to carefully try not shooting in the foot.

Signed-off-by: Junio C Hamano <gitster@pobox.com>
2011-09-15 16:52:43 -07:00
Thomas Rast
c05b988a69 t6019: avoid refname collision on case-insensitive systems
The criss-cross tests kept failing for me because of collisions of 'a'
with 'A' etc.  Prefix the lowercase refnames with an extra letter to
disambiguate.

Signed-off-by: Thomas Rast <trast@student.ethz.ch>
Acked-by: Brad King <brad.king@kitware.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2011-09-15 08:53:11 -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