Commit Graph

28644 Commits

Author SHA1 Message Date
Junio C Hamano
2c54517c1c Merge branch 'vr/branch-doc'
By Vincent van Ravesteijn
* vr/branch-doc:
  Documentation/git-branch: add default for --contains
  Documentation/git-branch: fix a typo
  Documentation/git-branch: cleanups
2012-03-08 13:04:44 -08:00
Thomas Rast
561ae06735 perf: export some important test-lib variables
The only bug right now is that $GIT_TEST_CMP is needed for test_cmp to
work.

However, we also export the three most important paths for tests:

  TEST_DIRECTORY
  TRASH_DIRECTORY
  GIT_BUILD_DIR

Since they are available within test_expect_success, a future test
writer may expect them to also be defined in test_perf.

Signed-off-by: Thomas Rast <trast@student.ethz.ch>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2012-03-08 12:07:50 -08:00
Thomas Rast
1cbc32403b perf: load test-lib-functions from the correct directory
Loading it in the subshells still referred to $TEST_DIRECTORY/..,
which was only correct in preliminary versions of perf-lib.sh

Signed-off-by: Thomas Rast <trast@student.ethz.ch>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2012-03-08 11:38:09 -08:00
Thynson
6672dc8e69 l10n: Improve zh_CN translation for msg "not something we can merge"
Signed-off-by: Thynson <lanxingcan@gmail.com>
2012-03-09 00:22:56 +08:00
Thynson
1aabac6580 l10n: Improve zh_CN trans for msg that cannot fast-forward
Signed-off-by: Thynson <lanxingcan@gmail.com>
2012-03-09 00:22:49 +08:00
Jiang Xin
14c8bced15 l10n: Update zh_CN translation for 1.7.10-rc0
Translate 1 new message from Git 1.7.10-rc0.

Signed-off-by: Jiang Xin <worldhello.net@gmail.com>
2012-03-08 20:55:37 +08:00
Peter Krefting
6874b9edb1 Update Swedish translation (732t0f0u).
This update includes a replay of some review fixes from the initial
translation run in 2010, which I cannot find having committed anywhere.

Add myself to the po/TEAMS file as well.

Signed-off-by: Peter Krefting <peter@softwolves.pp.se>
2012-03-08 10:56:37 +01:00
Peter Krefting
0eb8fa3a05 po/sv.po: add Swedish translation
Signed-off-by: Peter Krefting <peter@softwolves.pp.se>
Signed-off-by: Ævar Arnfjörð Bjarmason <avarab@gmail.com>
(cherry picked from commit 54ce07007c7988268d43619c580e81fbca09d37b)
2012-03-08 09:28:35 +01:00
Jiang Xin
2b911f8185 l10n: Update git.pot (1 new message)
Update file 'po/git.pot' to v1.7.10-rc0:

* Add 1 new l10n string in the new generated "git.pot" file at line:
  191

Signed-off-by: Jiang Xin <worldhello.net@gmail.com>
2012-03-08 10:20:20 +08:00
Jiang Xin
13ef396635 Merge v1.7.10-rc0 for git l10n update 2012-03-08 10:17:21 +08:00
Jared Hance
6fe53908f9 apply: do not leak patches and fragments
In the while loop inside apply_patch, patch and fragments are
dynamically allocated with a calloc. However, only unused patches
are actually freed and the rest are left to leak. Since a list is
actively built up consisting of the used patches, they can simply be
iterated and freed at the end of the function.

In addition, the text in fragments were not freed, primarily because
they mostly point into a patch text that is freed as a whole. But
there are some cases where new piece of memory is allocated and
pointed by a fragment (namely, when handling a binary patch).

Introduce a free_patch bitfield to mark each fragment if its text
needs to be freed, and free patches, fragments and fragment text
that need to be freed when we are done with the input.

Signed-off-by: Jared Hance <jaredhance@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2012-03-07 14:56:08 -08:00
Junio C Hamano
56a33c8f1b Git 1.7.10-rc0
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2012-03-07 12:51:55 -08:00
Junio C Hamano
1e4d0875ac Merge branch 'jc/pickaxe-ignore-case'
By Junio C Hamano (2) and Ramsay Jones (1)
* jc/pickaxe-ignore-case:
  ctype.c: Fix a sparse warning
  pickaxe: allow -i to search in patch case-insensitively
  grep: use static trans-case table
2012-03-07 12:12:59 -08:00
Karsten Blees
d34e70d6b8 fix deletion of .git/objects sub-directories in git-prune/repack
Both git-prune and git-repack (and thus, git-gc) try to rmdir while
holding a DIR* handle on the directory.  This can leave dangling
empty directories in the .git/objects on platforms where directory
cannot be removed while they are open.

First call closedir() and then rmdir(); that is more logical ordering.

Reported-by: John Chen <john0312@gmail.com>
Reported-by: Stefan Naewe <stefan.naewe@gmail.com>
Signed-off-by: Karsten Blees <blees@dcon.de>
Improved-and-Acked-by: Johannes Sixt <j6t@kdbg.org>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2012-03-07 10:24:33 -08:00
Nguyễn Thái Ngọc Duy
da591a7f4b update-server-info: respect core.bigfilethreshold
This command indirectly calls check_sha1_signature() (add_info_ref ->
deref_tag -> parse_object -> ..) , which may put whole blob in memory
if the blob's size is under core.bigfilethreshold. As config is not
read, the threshold is always 512MB. Respect user settings here.

Signed-off-by: Nguyễn Thái Ngọc Duy <pclouds@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2012-03-07 09:07:39 -08:00
Nguyễn Thái Ngọc Duy
6f7f3beb2d fsck: use streaming API for writing lost-found blobs
Signed-off-by: Nguyễn Thái Ngọc Duy <pclouds@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2012-03-07 09:07:39 -08:00
Nguyễn Thái Ngọc Duy
74775a09b1 show: use streaming API for showing blobs
Signed-off-by: Nguyễn Thái Ngọc Duy <pclouds@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2012-03-07 09:07:38 -08:00
Nguyễn Thái Ngọc Duy
090ea12671 parse_object: avoid putting whole blob in core
Traditionally, all the callers of check_sha1_signature() first
called read_sha1_file() to prepare the whole object data in core,
and called this function.  The function is used to revalidate what
we read from the object database actually matches the object name we
used to ask for the data from the object database.

Update the API to allow callers to pass NULL as the object data, and
have the function read and hash the object data using streaming API
to recompute the object name, without having to hold everything in
core at the same time.  This is most useful in parse_object() that
parses a blob object, because this caller does not have to keep the
actual blob data around in memory after a "struct blob" is returned.

Signed-off-by: Nguyễn Thái Ngọc Duy <pclouds@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2012-03-07 09:07:38 -08:00
Nguyễn Thái Ngọc Duy
00c8fd493a cat-file: use streaming API to print blobs
Signed-off-by: Nguyễn Thái Ngọc Duy <pclouds@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2012-03-07 09:07:38 -08:00
Nguyễn Thái Ngọc Duy
d41489a642 Add more large blob test cases
New test cases list commands that should work when memory is
limited. All memory allocation functions (*) learn to reject any
allocation larger than $GIT_ALLOC_LIMIT if set.

(*) Not exactly all. Some places do not use x* functions, but
malloc/calloc directly, notably diff-delta. These code path should
never be run on large blobs.

Signed-off-by: Nguyễn Thái Ngọc Duy <pclouds@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2012-03-07 09:07:37 -08:00
Junio C Hamano
47a02ff2ca streaming: make streaming-write-entry to be more reusable
The static function in entry.c takes a cache entry and streams its blob
contents to a file in the working tree.  Refactor the logic to a new API
function stream_blob_to_fd() that takes an object name and an open file
descriptor, so that it can be reused by other callers.

Signed-off-by: Nguyễn Thái Ngọc Duy <pclouds@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2012-03-07 09:07:37 -08:00
Junio C Hamano
713194ce54 Merge branch 'jh/threadable-symlink-check'
By Jared Hance
* jh/threadable-symlink-check:
  Add threaded versions of functions in symlinks.c.
2012-03-06 14:53:07 -08:00
Junio C Hamano
239d6eddcd Merge branch 'jc/maint-diff-patch-header'
By Junio C Hamano
* jc/maint-diff-patch-header:
  diff -p: squelch "diff --git" header for stat-dirty paths
  t4011: illustrate "diff-index -p" on stat-dirty paths
  t4011: modernise style
2012-03-06 14:53:07 -08:00
Junio C Hamano
f4464a3b7c Merge branch 'th/mergetools-deltawalker'
By Tim Henigan
* th/mergetools-deltawalker:
  mergetools: add a plug-in to support DeltaWalker
2012-03-06 14:53:07 -08:00
Junio C Hamano
4b4ec3fc64 Merge branch 'cn/pull-rebase-message'
By Carlos Martín Nieto
* cn/pull-rebase-message:
  Make git-{pull,rebase} message without tracking information friendlier
2012-03-06 14:53:06 -08:00
Junio C Hamano
2917e22496 Merge branch 'sl/modern-t0000'
By Stefano Lattarini
* sl/modern-t0000:
  t0000: modernise style
2012-03-06 14:53:06 -08:00
Junio C Hamano
dce89cb6a5 Merge branch 'nl/http-proxy-auth'
By Nelson Benitez Leon
* nl/http-proxy-auth:
  http: support proxies that require authentication
2012-03-06 14:53:06 -08:00
Junio C Hamano
4ebed61ae4 Merge branch 'tr/maint-bundle-boundary'
By Thomas Rast
* tr/maint-bundle-boundary:
  bundle: keep around names passed to add_pending_object()
  t5510: ensure we stay in the toplevel test dir
  t5510: refactor bundle->pack conversion
2012-03-06 14:53:06 -08:00
Junio C Hamano
af050219e4 Merge branch 'zj/diff-stat-dyncol'
By Zbigniew Jędrzejewski-Szmek (8) and Junio C Hamano (1)
* zj/diff-stat-dyncol:
  : This breaks tests. Perhaps it is not worth using the decimal-width stuff
  : for this series, at least initially.
  diff --stat: add config option to limit graph width
  diff --stat: enable limiting of the graph part
  diff --stat: add a test for output with COLUMNS=40
  diff --stat: use a maximum of 5/8 for the filename part
  merge --stat: use the full terminal width
  log --stat: use the full terminal width
  show --stat: use the full terminal width
  diff --stat: use the full terminal width
  diff --stat: tests for long filenames and big change counts
2012-03-06 14:53:06 -08:00
Junio C Hamano
556c5e030f Merge branch 'maint'
By Thomas Rast
* maint:
  t5704: fix nonportable sed/grep usages
  Document the --histogram diff option
2012-03-06 14:53:02 -08:00
Jakub Narebski
e65ceb61cd gitweb: Fix fixed string (non-regexp) project search
Use $search_regexp, where regex metacharacters are quoted, for
searching projects list, rather than $searchtext, which contains
original search term.

Reported-by: Ramsay Jones <ramsay@ramsay1.demon.co.uk>
Signed-off-by: Jakub Narebski <jnareb@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2012-03-06 14:48:24 -08:00
Thomas Rast
0dbe6592cc t5704: fix nonportable sed/grep usages
OS X's sed and grep would complain with (respectively)

  sed: 1: "/^-/{p;q}": extra characters at the end of q command
  grep: Regular expression too big

For sed, use an explicit ; to terminate the q command.

For grep, spell the "40 hex digits" explicitly in the regex, which
should be safe as other tests already use this and we haven't got
breakage reports on OS X about them.

Signed-off-by: Thomas Rast <trast@inf.ethz.ch>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2012-03-06 12:32:24 -08:00
Junio C Hamano
80a3f53424 Merge branch 'maint-1.7.8' into maint
By Thomas Rast
* maint-1.7.8:
  Document the --histogram diff option
2012-03-06 12:05:09 -08:00
Junio C Hamano
e521850bfd Merge branch 'maint-1.7.7' into maint-1.7.8
By Thomas Rast
* maint-1.7.7:
  Document the --histogram diff option
2012-03-06 12:04:48 -08:00
Thomas Rast
d909e0761c Document the --histogram diff option
Signed-off-by: Thomas Rast <trast@student.ethz.ch>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2012-03-06 11:53:29 -08:00
Thomas Rast
85551232b5 perf: compare diff algorithms
8c912ee (teach --histogram to diff, 2011-07-12) claimed histogram diff
was faster than both Myers and patience.

We have since incorporated a performance testing framework, so add a
test that compares the various diff tasks performed in a real 'log -p'
workload.  This does indeed show that histogram diff slightly beats
Myers, while patience is much slower than the others.

Signed-off-by: Thomas Rast <trast@student.ethz.ch>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2012-03-06 11:48:11 -08:00
Vincent van Ravesteijn
f36ed6db69 Documentation/git-branch: add default for --contains
Indicate that the commit parameter of --contains defaults to HEAD.

Signed-off-by: Vincent van Ravesteijn <vfr@lyx.org>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2012-03-06 11:43:23 -08:00
Vincent van Ravesteijn
ebab989420 Documentation/git-branch: fix a typo
Fix a typo by replacing 'tag' with 'branch'.

Signed-off-by: Vincent van Ravesteijn <vfr@lyx.org>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2012-03-06 11:43:22 -08:00
Vincent van Ravesteijn
3ea2232d8d Documentation/git-branch: cleanups
Most of the exact option strings to be typed by end users are
already set in typewriter font by using `--option`, but a few places
used '--option' to call for italics or with no quoting.  Uniformly
use `--option`.

Also add a full-stop after a sentence that missed one.

Signed-off-by: Vincent van Ravesteijn <vfr@lyx.org>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2012-03-06 11:40:54 -08:00
Junio C Hamano
2980b0de1b Sync with 1.7.9.3 2012-03-05 14:29:50 -08:00
Junio C Hamano
69f4e08f53 Git 1.7.9.3
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2012-03-05 14:29:07 -08:00
Junio C Hamano
bb8cbe7861 Merge branch 'jc/doc-merge-options' into maint
* jc/doc-merge-options:
  Documentation/merge-options.txt: group "ff" related options together
2012-03-05 14:28:14 -08:00
Junio C Hamano
0e20414f10 Merge branch 'cn/maint-rev-list-doc' into maint
* cn/maint-rev-list-doc:
  Documentation: use {asterisk} in rev-list-options.txt when needed
2012-03-05 14:27:36 -08:00
Junio C Hamano
a8747a1098 fsck doc: a minor typofix
Reword the misspelled "squelch" noticed by Hermann Gaustere to say
"omit", which would sit better anyway.

Signed-off-by: Junio C Hamano <gitster@pobox.com>
2012-03-05 11:32:19 -08:00
Thomas Rast
a8ea1b7a55 fast-import: zero all of 'struct tag' to silence valgrind
When running t9300, valgrind (correctly) complains about an
uninitialized value in write_crash_report:

  ==2971== Use of uninitialised value of size 8
  ==2971==    at 0x4164F4: sha1_to_hex (hex.c:70)
  ==2971==    by 0x4073E4: die_nicely (fast-import.c:468)
  ==2971==    by 0x43284C: die (usage.c:86)
  ==2971==    by 0x40420D: main (fast-import.c:2731)
  ==2971==  Uninitialised value was created by a heap allocation
  ==2971==    at 0x4C29B3D: malloc (vg_replace_malloc.c:263)
  ==2971==    by 0x433645: xmalloc (wrapper.c:35)
  ==2971==    by 0x405DF5: pool_alloc (fast-import.c:619)
  ==2971==    by 0x407755: pool_calloc.constprop.14 (fast-import.c:634)
  ==2971==    by 0x403F33: main (fast-import.c:3324)

Fix this by zeroing all of the 'struct tag'.  We would only need to
zero out the 'sha1' field, but this way seems more future-proof.

Signed-off-by: Thomas Rast <trast@student.ethz.ch>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2012-03-05 09:36:09 -08:00
Tim Henigan
284a126c3e mergetools: add a plug-in to support DeltaWalker
DeltaWalker is a non-free tool popular among some users.  Add a
plug-in to support it from difftool and mergetool.

Note that the $(pwd)/ in front of $MERGED should not be necessary.
However without it, DeltaWalker crashes with a JRE exception.

Signed-off-by: Tim Henigan <tim.henigan@gmail.com>
Helped-by: David Aguilar <davvid@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2012-03-05 09:31:47 -08:00
Junio C Hamano
4a92a17214 Update draft release notes to 1.7.10
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2012-03-04 23:38:02 -08:00
Junio C Hamano
b8b52907e3 Merge branch 'jk/symbolic-ref-short'
* jk/symbolic-ref-short:
  symbolic-ref --short: abbreviate the output unambiguously
2012-03-04 23:35:23 -08:00
Junio C Hamano
6759f95d63 Merge branch 'jn/gitweb-hilite-regions'
* jn/gitweb-hilite-regions:
  gitweb: Highlight matched part of shortened project description
  gitweb: Highlight matched part of project description when searching projects
  gitweb: Highlight matched part of project name when searching projects
  gitweb: Introduce esc_html_match_hl and esc_html_hl_regions
2012-03-04 23:35:18 -08:00
Junio C Hamano
250f0a074a Merge branch 'jc/am-3-nonstandard-popt'
* jc/am-3-nonstandard-popt:
  test: "am -3" can accept non-standard -p<num>
  am -3: allow nonstandard -p<num> option
2012-03-04 23:35:12 -08:00