Commit graph

24112 commits

Author SHA1 Message Date
Thiago Farina 834d9eb6b7 builtin/rm.c: Use ALLOC_GROW instead of alloc_nr and xrealloc.
Signed-off-by: Thiago Farina <tfransosi@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2010-12-19 10:44:06 -08:00
Thiago Farina fcbc0d8e82 builtin/branch.c: Use ALLOC_GROW instead of alloc_nr and xrealloc.
Signed-off-by: Thiago Farina <tfransosi@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2010-12-19 10:43:53 -08:00
Junio C Hamano 1b9743462d Update draft release notes to 1.7.4
We are getting closer to -rc0 ;-)

Signed-off-by: Junio C Hamano <gitster@pobox.com>
2010-12-16 21:43:08 -08:00
Junio C Hamano 38a5932be8 Merge branch 'maint'
* maint:
  difftool: provide basename to external tools
  git-difftool.txt: correct the description of $BASE and describe $MERGED
2010-12-16 16:36:03 -08:00
Michael J Gruber 4a689afb03 difftool: provide basename to external tools
Currently, only configured diff helpers get the basename of the file
being compared. Tools specified with "git difftool -x" only get the
names of temporary files for the different versions.

Export BASE so that an external tool can read the name from the
environment. Rather than using a third argument, this avoids breaking
existing scripts which may somewhat carelessly be using "$@" rather than
"$1" "$2".

Signed-off-by: Michael J Gruber <git@drmicha.warpmail.net>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2010-12-16 13:01:36 -08:00
Michael J Gruber 51baceeec4 git-difftool.txt: correct the description of $BASE and describe $MERGED
Signed-off-by: Michael J Gruber <git@drmicha.warpmail.net>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2010-12-16 13:01:31 -08:00
Junio C Hamano cf7a64b54a Merge branch 'kb/diff-C-M-synonym'
* kb/diff-C-M-synonym:
  diff: use "find" instead of "detect" as prefix for long forms of -M and -C
  diff: add --detect-copies-harder as a synonym for --find-copies-harder
2010-12-16 12:58:59 -08:00
Junio C Hamano 914584266c Merge branch 'jn/fast-import-blob-access'
* jn/fast-import-blob-access:
  t9300: avoid short reads from dd
  t9300: remove unnecessary use of /dev/stdin
  fast-import: Allow cat-blob requests at arbitrary points in stream
  fast-import: let importers retrieve blobs
  fast-import: clarify documentation of "feature" command
  fast-import: stricter parsing of integer options

Conflicts:
	fast-import.c
2010-12-16 12:58:38 -08:00
Junio C Hamano 4bb4d30095 Merge branch 'jl/fetch-submodule-recursive'
* jl/fetch-submodule-recursive:
  fetch_populated_submodules(): document dynamic allocation
  Submodules: Add the "fetchRecurseSubmodules" config option
  Add the 'fetch.recurseSubmodules' config setting
  fetch/pull: Add the --recurse-submodules option

Conflicts:
	builtin/fetch.c
2010-12-16 12:57:15 -08:00
Junio C Hamano b5c6aac01b Merge branch 'rj/msvc-fix'
* rj/msvc-fix:
  msvc: Fix macro redefinition warnings
  msvc: Fix build by adding missing INTMAX_MAX define
  msvc: git-daemon.exe: Fix linker "unresolved externals" error
  msvc: Fix compilation errors in compat/win32/sys/poll.c
2010-12-16 12:55:36 -08:00
Junio C Hamano 620b89cd98 Merge branch 'nd/extended-sha1-relpath'
* nd/extended-sha1-relpath:
  get_sha1: teach ":$n:<path>" the same relative path logic
  get_sha1: support relative path ":path" syntax
  Make prefix_path() return char* without const

Conflicts:
	sha1_name.c
2010-12-16 12:51:05 -08:00
Junio C Hamano f68b780b25 Merge branch 'aa/status-hilite-branch'
* aa/status-hilite-branch:
  default color.status.branch to "same as header"
  status: show branchname with a configurable color
2010-12-16 12:50:03 -08:00
Junio C Hamano b932c3c1c1 Merge branch 'ak/describe-exact'
* ak/describe-exact:
  describe: Delay looking up commits until searching for an inexact match
  describe: Store commit_names in a hash table by commit SHA1
  describe: Do not use a flex array in struct commit_name
  describe: Use for_each_rawref
2010-12-16 12:49:59 -08:00
Junio C Hamano 20cb8e2025 Merge branch 'nd/maint-relative'
* nd/maint-relative:
  get_cwd_relative(): do not misinterpret root path
2010-12-16 12:49:48 -08:00
Junio C Hamano b720c75afd Merge branch 'jn/maint-svn-fe'
* jn/maint-svn-fe:
  t9010 fails when no svn is available
  vcs-svn: fix intermittent repo_tree corruption
  treap: make treap_insert return inserted node
  t9010 (svn-fe): Eliminate dependency on svn perl bindings
2010-12-16 12:49:35 -08:00
Junio C Hamano f1f76776fa Merge branch 'jc/maint-svn-info-test-fix'
* jc/maint-svn-info-test-fix:
  t9119: do not compare "Text Last Updated" line from "svn info"
2010-12-16 12:49:28 -08:00
Junio C Hamano 7eaf4af426 Merge branch 'jn/submodule-b-current'
* jn/submodule-b-current:
  git submodule: Remove now obsolete tests before cloning a repo
  git submodule -b ... of current HEAD fails
2010-12-16 12:49:22 -08:00
Junio C Hamano c835288be4 Merge branch 'jn/maint-fast-import-object-reuse'
* jn/maint-fast-import-object-reuse:
  fast-import: insert new object entries at start of hash bucket
2010-12-16 12:49:16 -08:00
Junio C Hamano f73c3e9704 Merge branch 'jn/fast-import-ondemand-checkpoint'
* jn/fast-import-ondemand-checkpoint:
  fast-import: treat SIGUSR1 as a request to access objects early
2010-12-16 12:49:11 -08:00
Junio C Hamano 15368e1836 Sync with 1.7.3.4
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2010-12-15 16:27:40 -08:00
Junio C Hamano fa1c8542cb Git 1.7.3.4
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2010-12-15 11:47:40 -08:00
Junio C Hamano b91779f17e Git 1.7.2.5
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2010-12-15 11:45:36 -08:00
Junio C Hamano 9db41eba42 Git 1.7.1.4
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2010-12-15 11:40:40 -08:00
Junio C Hamano cb198b3b67 Git 1.7.0.9
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2010-12-15 11:38:19 -08:00
Junio C Hamano abf411e28d Git 1.6.6.3
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2010-12-15 11:32:57 -08:00
Junio C Hamano ec82874ad4 Git 1.6.5.9
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2010-12-15 11:27:41 -08:00
Junio C Hamano 88fcc52e44 Git 1.6.4.5
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2010-12-15 11:19:11 -08:00
Jakub Narebski 3017ed62f4 gitweb: Introduce esc_attr to escape attributes of HTML elements
It is needed only to escape attributes of handcrafted HTML elements,
and not those generated using CGI.pm subroutines / methods for HTML
generation.

While at it, add esc_url and esc_html where needed, and prefer to use
CGI.pm HTML generating methods than handcrafted HTML code.  Most of
those are probably unnecessary (could be exploited only by person with
write access to gitweb config, or at least access to the repository).

This fixes CVE-2010-3906

Reported-by: Emanuele Gentili <e.gentili@tigersecurity.it>
Helped-by: John 'Warthog9' Hawley <warthog9@kernel.org>
Helped-by: Jonathan Nieder <jrnieder@gmail.com>
Signed-off-by: Jakub Narebski <jnareb@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2010-12-15 11:16:31 -08:00
Junio C Hamano 74f6e0505b Merge git://git.kernel.org/pub/scm/gitk/gitk
* git://git.kernel.org/pub/scm/gitk/gitk:
  gitk: Add Brazilian Portuguese (pt-BR) translation
  gitk: Make text selectable on Mac
  gitk: Prevent the text pane from becoming editable
  gitk: Add the equivalent of diff --color-words
  gitk: Update Swedish translation (290t)
  gitk: Show notes by default (like git log does)
2010-12-14 09:09:13 -08:00
Junio C Hamano e6b71b3289 Merge branch 'maint'
* maint:
  Prepare for 1.7.3.4
  use persistent memory for rejected paths
  do not overwrite files in leading path
  lstat_cache: optionally return match_len
  add function check_ok_to_remove()
  t7607: add leading-path tests
  t7607: use test-lib functions and check MERGE_HEAD
  Do not link with -lcrypto under NO_OPENSSL

Signed-off-by: Junio C Hamano <gitster@pobox.com>
2010-12-14 08:58:09 -08:00
Junio C Hamano ada6a4117e Prepare for 1.7.3.4
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2010-12-14 08:55:52 -08:00
Clemens Buchacher 3055d78f97 use persistent memory for rejected paths
An aborted merge prints the list of rejected paths as part of the
error message. Since commit f66caaf9 (do not overwrite files in
leading path), some of those paths do not have static buffers, so
we have to keep a copy. Use string_list's to accomplish this.

This changes the order of the list to the order in which the paths
are processed. Previously, it was reversed.

Signed-off-by: Clemens Buchacher <drizzd@aon.at>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2010-12-14 08:55:13 -08:00
Clemens Buchacher b1735b1ab7 do not overwrite files in leading path
If the work tree contains an untracked file x, and
unpack-trees wants to checkout a path x/*, the
file x is removed unconditionally.

Instead, apply the same checks that are normally
used for untracked files, and abort if the file
cannot be removed.

Signed-off-by: Clemens Buchacher <drizzd@aon.at>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2010-12-14 08:55:12 -08:00
Clemens Buchacher f7e3bd37fb lstat_cache: optionally return match_len
Return match_len so that the caller can know which leading path
component matched.

Signed-off-by: Clemens Buchacher <drizzd@aon.at>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2010-12-14 08:55:11 -08:00
Clemens Buchacher 6838d1ad6b add function check_ok_to_remove()
This wraps some inline code into the function check_ok_to_remove(),
which will later be used for leading path components as well.

Signed-off-by: Clemens Buchacher <drizzd@aon.at>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2010-12-14 08:55:10 -08:00
Clemens Buchacher 175659b4cc t7607: add leading-path tests
Signed-off-by: Clemens Buchacher <drizzd@aon.at>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2010-12-14 08:54:05 -08:00
Clemens Buchacher 18a1d8953b t7607: use test-lib functions and check MERGE_HEAD
Use the test_commit and test_path_is_missing
functions from the test library.

Also make sure that a merge which fails due to
pre-merge checks aborts properly and does not
leave MERGE_HEAD behind.

The "will not overwrite removed file" test is an
exception to this. It notices the untracked file
at a stage where the merge is already well under
way. Therefore we cannot abort the merge without
major restructuring. See the following thread for
more details.

http://mid.gmane.org/7vskopwxej.fsf@gitster.siamese.dyndns.org

Signed-off-by: Clemens Buchacher <drizzd@aon.at>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2010-12-14 08:09:56 -08:00
Junio C Hamano 40d675f417 Merge branch 'jc/maint-no-openssl-build-fix' into maint
* jc/maint-no-openssl-build-fix:
  Do not link with -lcrypto under NO_OPENSSL
2010-12-14 07:50:20 -08:00
Junio C Hamano b69fb7866b Merge branch 'ja/maint-pull-rebase-doc' into maint
* ja/maint-pull-rebase-doc:
  git-pull.txt: Mention branch.autosetuprebase
2010-12-14 07:36:23 -08:00
Junio C Hamano 6b090e1710 Merge branch 'tc/http-urls-ends-with-slash' into maint
* tc/http-urls-ends-with-slash:
  http-fetch: rework url handling
  http-push: add trailing slash at arg-parse time, instead of later on
  http-push: check path length before using it
  http-push: Normalise directory names when pushing to some WebDAV servers
  http-backend: use end_url_with_slash()
  url: add str wrapper for end_url_with_slash()
  shift end_url_with_slash() from http.[ch] to url.[ch]
  t5550-http-fetch: add test for http-fetch
  t5550-http-fetch: add missing '&&'
2010-12-14 07:36:10 -08:00
Junio C Hamano 5b57076e58 Merge branch 'nd/maint-hide-checkout-index-from-error' into maint
* nd/maint-hide-checkout-index-from-error:
  entry.c: remove "checkout-index" from error messages
2010-12-14 07:36:00 -08:00
Junio C Hamano 006f424b2d Merge branch 'jk/maint-reflog-bottom' into maint
* jk/maint-reflog-bottom:
  reflogs: clear flags properly in corner case
2010-12-14 07:35:50 -08:00
Junio C Hamano 37ad7ca7db Merge branch 'mz/rebase-abort-reflog-fix' into maint
* mz/rebase-abort-reflog-fix:
  rebase --abort: do not update branch ref
2010-12-14 07:35:44 -08:00
Junio C Hamano e0cbf12bf7 Merge branch 'mz/maint-rebase-stat-config' into maint
* mz/maint-rebase-stat-config:
  rebase: only show stat if configured to true
2010-12-14 07:35:31 -08:00
Junio C Hamano 187b259dce Merge branch 'gc/http-with-non-ascii-username-url' into maint
* gc/http-with-non-ascii-username-url:
  Fix username and password extraction from HTTP URLs
  t5550: test HTTP authentication and userinfo decoding

Conflicts:
	t/lib-httpd/apache.conf
2010-12-14 07:35:18 -08:00
Alexandre Erwin Ittner 6758ad9440 gitk: Add Brazilian Portuguese (pt-BR) translation
Translating a SCM is tricky due to amount of jargon, so, I tried to
keep the wording consistent with both the German and Italian git
translations and the pt-BR translation of other SCMs.

Signed-off-by: Alexandre Erwin Ittner <alexandre@ittner.com.br>
Signed-off-by: Paul Mackerras <paulus@samba.org>
2010-12-14 20:04:11 +11:00
Michael J Gruber 0137ef7dae t800?-blame.sh: retitle uniquely
Currently we have three test files matching t800?-blame.sh.

Rename the latter two to make it easier to spot where additions would
go.

Signed-off-by: Michael J Gruber <git@drmicha.warpmail.net>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2010-12-13 11:54:39 -08:00
Jeff King 28368e9f0b tests: flip executable bit on t9158
All tests are supposed to be executable.

Signed-off-by: Jeff King <peff@peff.net>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2010-12-13 11:38:11 -08:00
Jeff King d38732c28c tests: add some script lint checks
There are some common but minor errors we tend to make in
writing test scripts:

  1. Scripts are left non-executable. This is not usually
     noticed immediately because "make test" does not need
     the bit, but it is a matter of git policy to make them
     executable (and is a slight convenience when running
     individual scripts).

  2. Two scripts are allocated the same number. Usually this
     happens on separate branches, and the problem only
     comes about during a merge. But since there is no
     textual conflict, the merger would have to be very
     observant to notice.

     This is also a minor error, but can make GIT_SKIP_TESTS
     ambiguous.

This patch introduces a "test-lint" target which checks
both. It is not invoked by default. You can invoke it as
"make test-lint", or you can make it a prerequisite of
running the tests by specifying "TEST_LINT = test-lint" in
your config.mak or on the command line.

Signed-off-by: Jeff King <peff@peff.net>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2010-12-13 11:37:44 -08:00
Johannes Sixt 0d6504cc3c Avoid duplicate test number t7609
Signed-off-by: Johannes Sixt <j6t@kdbg.org>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2010-12-13 07:23:51 -08:00