Commit graph

29318 commits

Author SHA1 Message Date
Michael Haggerty 60f26f6348 t/Makefile: retain cache t/.prove across prove runs
prove(1) can write a summary of its test results and timings into a
cache file, t/.prove, then use this information during later runs for
various purposes.  But deleting t/.prove after every test run defeats
this purpose.  So do not delete t/.prove as part of "make
DEFAILT_TEST_TARGET=prove test".  (Continue to delete the file on
"make clean".)

Signed-off-by: Michael Haggerty <mhagger@alum.mit.edu>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2012-05-20 14:19:18 -07:00
Nguyễn Thái Ngọc Duy c9018b0305 pack-objects: refactor write_object() into helper functions
The function first decides if we want to copy data taken from existing
pack verbatim or we want to encode the data ourselves for the packfile
we are creating and then carries out the decision.  Separate the latter
phase into two helper functions, one for the case the data is reused,
the other for the case the data is produced anew.

A little twist is that it can later turn out that we cannot reuse the
data after we initially decide to do so; in such a case, the "reuse"
helper makes a call to "generate" helper.  It is easier to follow than
the current fallback code that uses "goto" inside a single large
function.

Signed-off-by: Nguyễn Thái Ngọc Duy <pclouds@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2012-05-18 14:22:15 -07:00
Nguyễn Thái Ngọc Duy 754980d023 pack-objects, streaming: turn "xx >= big_file_threshold" to ".. > .."
This is because all other places do "xx > big_file_threshold"

Signed-off-by: Nguyễn Thái Ngọc Duy <pclouds@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2012-05-18 14:21:19 -07:00
Johannes Sixt 9ef5b2bd16 Fix t3411.3 to actually rebase something
The test intends to rebase a branchy history onto a later commit, but it
forgot to reset HEAD back to an earlier commit before it set up the side
branches. In the end, every "rebased" commit was only a fast-forward and
the 'rebase -p' did not change the commit graph at all. Insert the missing
checkout that moves to an earlier commit.

Signed-off-by: Johannes Sixt <j6t@kdbg.org>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2012-05-18 12:26:49 -07:00
Jon Seymour d0740ce0ba rev-parse doc: --git-dir does not always show a relative path
The description was misleading because it lead the reader to believe
that --git-dir would always show a relative path when, in fact, the
actual behaviour does not guarantee this.

Rather, it was intended that the advice be given that if a relative
path is shown, then the path is relative to the current working
directory and not some other directory (for example, the root of the
working tree).

Signed-off-by: Jon Seymour <jon.seymour@gmail.com>
Acked-by: Jonathan Nieder <jrnieder@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2012-05-18 12:23:01 -07:00
René Scharfe bf38245be8 archive-tar: keep const in checksum calculation
For correctness, don't needlessly drop the const qualifier when casting.

Signed-off-by: Rene Scharfe <rene.scharfe@lsrfire.ath.cx>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2012-05-18 11:26:18 -07:00
René Scharfe c51a351a6b archive: simplify refname handling
There is no need to build a copy of the relevant part of the string just
to make sure we have a NUL-terminated string.  We can simply pass the
length of the interesting part to dwim_ref() instead.

Signed-off-by: Rene Scharfe <rene.scharfe@lsrfire.ath.cx>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2012-05-18 11:26:10 -07:00
Junio C Hamano 9de9681549 Merge git://github.com/git-l10n/git-po
By Jiang Xin (3) and others
via Jiang Xin (3) and Ralf Thielow (1)
* git://github.com/git-l10n/git-po:
  l10n: de.po: translate 3 new messages
  l10n: zh_CN.po: translate 3 new messages
  l10n: pt_PT.po translate new messages
  l10n: Update git.pot (8 new, 4 removed messages)
  l10n: Update git.pot (3 new, 2 removed messages)
2012-05-17 15:35:35 -07:00
Junio C Hamano c0b5c62d12 Merge branch 'nd/i18n-parseopt'
Text from "git cmd --help" are getting prepared for i18n.

By Nguyễn Thái Ngọc Duy
* nd/i18n-parseopt:
  i18n: apply: mark parseopt strings for translation
  i18n: parseopt: lookup help and argument translations when showing usage
2012-05-17 15:22:30 -07:00
Junio C Hamano 2e464dd5b2 Merge branch 'rs/xdiff-lose-emit-func'
Simplifies the interface between the implementation of "blame" and
underlying xdiff engine, and removes a lot of unused or unnecessary code
from the latter.

By René Scharfe (6) and Ramsay Jones (1)
* rs/xdiff-lose-emit-func:
  builtin/blame.c: Fix a "Using plain integer as NULL pointer" warning
  xdiff: remove unused functions
  xdiff: remove emit_func() and xdi_diff_hunks()
  blame: factor out helper for calling xdi_diff()
  blame: use hunk_func(), part 2
  blame: use hunk_func(), part 1
  xdiff: add hunk_func()
2012-05-17 15:22:13 -07:00
Junio C Hamano 8be441ea1f Merge branch 'fc/git-complete-helper'
By Felipe Contreras
* fc/git-complete-helper:
  completion: add new __git_complete helper
2012-05-17 15:21:55 -07:00
Junio C Hamano 9b994b1c4e Merge branch 'ld/git-p4-tags-and-labels'
By Luke Diamand
* ld/git-p4-tags-and-labels:
  git p4: fix bug when enabling tag import/export via config variables
  git p4: fix bug when verbose enabled with tag export
  git p4: add test for tag import/export enabled via config
2012-05-17 15:21:46 -07:00
Jon Seymour 2b26b65f9a git-svn: clarify the referent of dcommit's optional argument
The documentation of the dcommit subcommand is reworded to clarify that
the optional argument refers to a git branch, not an SVN branch.

The discussion of the optional argument is put into its own paragraph
as is the guidance about using 'dcommit' in preference to 'set-tree'.

The section on REBASE vs. PULL/MERGE is reworded to incorporate the
advice to prefer 'git rebase' previously in the description of 'dcommit'.

Signed-off-by: Jon Seymour <jon.seymour@gmail.com>
Acked-by: Eric Wong <normalperson@yhbt.net>
2012-05-17 09:35:18 +00:00
Avishay Lavie b64e1f5815 git-svn: support rebase --preserve-merges
When git svn rebase is performed after an unpushed merge, the
rebase operation follows both parents and replays both the user's
local commits and those from the merged branch. This is usually
not the intended behavior.
This patch adds support for the --preserve-merges/-p flag which
allows for a better workflow by re-applying merge commits as merges.

[ew: fixed a minor syntax error]

Signed-off-by: Avishay Lavie <avishay.lavie@gmail.com>
Signed-off-by: Eric Wong <normalperson@yhbt.net>
2012-05-16 19:21:43 -07:00
Bobby Powers 176a33542e diff --no-index: don't leak buffers in queue_diff
queue_diff uses two strbufs, and at the end of the function
strbuf_reset was called.  This only reset the length of the buffer -
any allocated memory was leaked.  Using strbuf_release fixes this.

Signed-off-by: Bobby Powers <bobbypowers@gmail.com>
Reviewed-by: René Scharfe <rene.scharfe@lsrfire.ath.cx>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2012-05-16 11:18:06 -07:00
Bobby Powers f3999e0327 diff --no-index: reset temporary buffer lengths on directory iteration
Commit 875b91b (diff --no-index: use strbuf for temporary pathnames,
2012-04-25) introduced a regression when using diff --no-index with
directories.  When iterating through a directory, the switch to strbuf
from heap-allocated char arrays caused paths to form like 'dir/file1',
'dir/file1file2', rather than 'dir/file1', 'dir/file2' as expected.

Avoid this by resetting the paths variables to their original length
before each iteration.

Signed-off-by: Bobby Powers <bobbypowers@gmail.com>
Reviewed-by: René Scharfe <rene.scharfe@lsrfire.ath.cx>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2012-05-16 11:17:45 -07:00
Junio C Hamano 10587ce6df git-sh-setup: define workaround wrappers before they are used
Recently we tweaked this scriptlet to let mingw port redefine "pwd" to
always return Windows-style path, but the code to do so came after the
first use of "pwd" to set up $GIT_DIR shell variable.

Move the block to define these workaround wrappers, so that everything
everything that executes when the scriptlet is dot-sourced uses the
replacements.

Noticed-by: Ramsay Jones
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2012-05-16 10:44:04 -07:00
Jiang Xin 154ca11d4b Merge branch 'maint' into master
By Ralf Thielow(1) and Jiang Xin(1)
* maint:
  l10n: de.po: translate 3 new messages
  l10n: zh_CN.po: translate 3 new messages
2012-05-16 07:32:20 +08:00
Ralf Thielow 042e9f94a7 l10n: de.po: translate 3 new messages
Translate 3 new messages for upcoming git 1.7.10.3.

Signed-off-by: Ralf Thielow <ralf.thielow@googlemail.com>
2012-05-15 19:09:02 +02:00
Jiang Xin eff6d3a9e3 l10n: zh_CN.po: translate 3 new messages
Translate 3 new messages for upcoming git 1.7.10.3.

Signed-off-by: Jiang Xin <worldhello.net@gmail.com>
2012-05-15 12:07:00 +08:00
Jiang Xin 59e62277fc Merge branch 'master' of git://github.com/marcomsousa/git-l10n-pt_PT
By Marco Sousa
* marcomsousa/git-l10n-pt_PT/master:
  l10n: pt_PT.po translate new messages
2012-05-15 07:11:58 +08:00
Marco Sousa 388698ce61 l10n: pt_PT.po translate new messages
Translate new and old messages came from git.pot.

Signed-off-by: Marco Sousa <marcomsousa@gmail.com>
Signed-off-by: Jiang Xin <worldhello.net@gmail.com>
2012-05-15 07:10:28 +08:00
Jiang Xin 933297211e l10n: Update git.pot (8 new, 4 removed messages)
Generate po/git.pot from v1.7.10.2-520-g6a4a48:

 * 8 new l10n messages at lines:

   977, 982, 1404, 1409, 1414, 1419, 1424, 1429.

 * 4 removed l10n messages from lines:

   977, 1399, 1404, 1409.

Signed-off-by: Jiang Xin <worldhello.net@gmail.com>
2012-05-15 06:43:03 +08:00
Jiang Xin d81c7d1f84 Merge branch 'maint'
* maint:
  l10n: Update git.pot (3 new, 2 removed messages)
2012-05-15 06:40:08 +08:00
Jiang Xin b741611c06 l10n: Update git.pot (3 new, 2 removed messages)
Generate po/git.pot from v1.7.10.2-35-g0b9f4:

 * 3 new l10n messages at lines: 2743, 2751, 2759.

 * 2 removed l10n messages from lines: 1879, 2757.

Signed-off-by: Jiang Xin <worldhello.net@gmail.com>
2012-05-15 06:36:36 +08:00
Junio C Hamano 6a4a482229 Update draft release notes for 12th batch
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2012-05-14 12:20:46 -07:00
Heiko Voigt 5e73633dbf teach add_submodule_odb() to look for alternates
Since we allow to link other object databases when loading a submodules
database we should also load possible alternates.

Signed-off-by: Heiko Voigt <hvoigt@hvoigt.net>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2012-05-14 11:56:42 -07:00
Junio C Hamano fca9249b86 Merge branch 'fc/simplify-complete-revlist-file'
By Felipe Contreras
* fc/simplify-complete-revlist-file:
  completion: simplify __git_complete_revlist_file
2012-05-14 11:50:57 -07:00
Junio C Hamano cc13431a49 Merge branch 'nd/threaded-index-pack'
Enables threading in index-pack to resolve base data in parallel.

By Nguyễn Thái Ngọc Duy (3) and Ramsay Jones (1)
* nd/threaded-index-pack:
  index-pack: disable threading if NO_PREAD is defined
  index-pack: support multithreaded delta resolving
  index-pack: restructure pack processing into three main functions
  compat/win32/pthread.h: Add an pthread_key_delete() implementation
2012-05-14 11:50:40 -07:00
Junio C Hamano 3f8acaae8a Sync with maint 2012-05-14 11:50:20 -07:00
Junio C Hamano 8fbe0db4fc Merge branch 'master' of git://github.com/git-l10n/git-po
By Ralf Thielow (6) and others
via Jiang Xin (3) and Ralf Thielow (1)
* 'master' of git://github.com/git-l10n/git-po:
  l10n: zh_CN.po: translate 1 new message
  l10n: de.po: translate one new message
  l10n: de.po: unify translation of "ahead" and "behind"
  l10n: de.po: collection of improvements
  l10n: de.po: translate "remote" as "extern"
  l10n: de.po: translate "track" as "beobachten"
  l10n: add new members to German translation team
  l10n: de.po: collection of suggestions
  l10n: de.po: translate "bad" as "ungültig" ("invalid")
  l10n: de.po: hopefully uncontroversial fixes
  l10n: de.po: translate "bare" as "bloß"
  l10n: Update git.pot (275 new, 15 removed messages)
  l10n: Update git.pot (1 new messages)
2012-05-14 11:49:18 -07:00
Junio C Hamano 0b9f4b63a0 Merge branch 'maint' of git://github.com/git-l10n/git-po into maint
By Ralf Thielow (6) and others
via Jiang Xin
* 'maint' of git://github.com/git-l10n/git-po:
  l10n: zh_CN.po: translate 1 new message
  l10n: de.po: translate one new message
  l10n: de.po: unify translation of "ahead" and "behind"
  l10n: de.po: collection of improvements
  l10n: de.po: translate "remote" as "extern"
  l10n: de.po: translate "track" as "beobachten"
  l10n: add new members to German translation team
  l10n: de.po: collection of suggestions
  l10n: de.po: translate "bad" as "ungültig" ("invalid")
  l10n: de.po: hopefully uncontroversial fixes
  l10n: de.po: translate "bare" as "bloß"
  l10n: Update git.pot (1 new messages)
2012-05-14 11:47:49 -07:00
Junio C Hamano 5bed9f6a61 Start preparing for 1.7.10.3
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2012-05-14 11:47:20 -07:00
Junio C Hamano adc3a81ce2 Merge branch 'jk/maint-reflog-walk-count-vs-time' into maint
Gives a better DWIM behaviour for --pretty=format:%gd, "stash list", and
"log -g", depending on how the starting point ("master" vs "master@{0}" vs
"master@{now}") and date formatting options (e.g. "--date=iso") are given
on the command line.

By Jeff King (4) and Junio C Hamano (1)
* jk/maint-reflog-walk-count-vs-time:
  reflog-walk: tell explicit --date=default from not having --date at all
  reflog-walk: always make HEAD@{0} show indexed selectors
  reflog-walk: clean up "flag" field of commit_reflog struct
  log: respect date_mode_explicit with --format:%gd
  t1411: add more selector index/date tests
2012-05-14 11:46:16 -07:00
Junio C Hamano badabc06f3 Merge branch 'jk/doc-asciidoc-inline-literal' into maint
By Jeff King
* jk/doc-asciidoc-inline-literal:
  docs: stop using asciidoc no-inline-literal
2012-05-14 11:43:04 -07:00
Junio C Hamano 3734dbc4ab Merge branch 'ef/checkout-empty' into maint
Running "git checkout" on an unborn branch used to corrupt HEAD
(regression in 1.7.10); this makes it error out.

By Erik Faye-Lund
* ef/checkout-empty:
  checkout: do not corrupt HEAD on empty repo
2012-05-14 11:42:50 -07:00
Junio C Hamano ea8c6761e3 Merge branch 'jk/maint-tformat-with-z' into maint
By Jan Krüger (1) and Junio C Hamano (1)
* jk/maint-tformat-with-z:
  log-tree: the previous one is still not quite right
  log-tree: use custom line terminator in line termination mode
2012-05-14 11:42:34 -07:00
Junio C Hamano a912913e86 Merge branch 'js/checkout-detach-count' into maint
When checking out another commit from an already detached state, we used
to report all commits that are not reachable from any of the refs as
lossage, but some of them might be reachable from the new HEAD, and there
is no need to warn about them.

By Johannes Sixt
* js/checkout-detach-count:
  checkout (detached): truncate list of orphaned commits at the new HEAD
  t2020-checkout-detach: check for the number of orphaned commits
2012-05-14 11:42:22 -07:00
Junio C Hamano c8cf3ec7ae Merge branch 'ef/maint-clone-progress-fix' into maint
Some time ago, "git clone" lost the progress output for its "checkout"
phase; when run without any "--quiet" option, it should give progress to
the lengthy operation.

By Erik Faye-Lund
* ef/maint-clone-progress-fix:
  clone: fix progress-regression
2012-05-14 11:41:40 -07:00
Heiko Voigt cb2df36980 link to gitmodules page at the beginning of git-submodule documentation
This way the user does not have to scroll down to the bottom to find
it.

Signed-off-by: Heiko Voigt <hvoigt@hvoigt.net>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2012-05-14 11:14:07 -07:00
Felipe Contreras 6b179adfe9 completion: add new __git_complete helper
This simplifies the completions, and would make it easier to define
aliases in the future.

Signed-off-by: Felipe Contreras <felipe.contreras@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2012-05-14 10:33:33 -07:00
Ramsay Jones 85c20c304f builtin/blame.c: Fix a "Using plain integer as NULL pointer" warning
Plain gcc may not but sparse catches and complains about this sort of
stuff.

Signed-off-by: Ramsay Jones <ramsay@ramsay1.demon.co.uk>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2012-05-14 10:19:42 -07:00
Carlos Martín Nieto 79135e4c22 pack-protocol: fix first-want separator in the examples
When sending the "want" list, the capabilities list is separated from
the obj-id by a SP instead of NUL as in the ref advertisement. The
text is correct, but the examples wrongly show the separator as
NUL. Fix the example so it uses SP.

Signed-off-by: Carlos Martín Nieto <cmn@elego.de>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2012-05-14 09:24:52 -07:00
Jiang Xin b652ada42a Merge branch 'maint'
* maint:
  l10n: zh_CN.po: translate 1 new message

Conflicts:
	po/zh_CN.po

Signed-off-by: Jiang Xin <worldhello.net@gmail.com>
2012-05-12 15:01:22 +08:00
Jiang Xin 2f64542f9c l10n: zh_CN.po: translate 1 new message
Translate new message '[new ref]' since git 1.7.10.1.

Signed-off-by: Jiang Xin <worldhello.net@gmail.com>
2012-05-12 14:56:06 +08:00
René Scharfe 2b189435f3 dir: simplify fill_directory()
Now that read_directory_recursive() (reached through read_directory())
respects the string length limit we provide, we don't need to create a
NUL-limited copy of the common prefix anymore.

Signed-off-by: Rene Scharfe <rene.scharfe@lsrfire.ath.cx>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2012-05-11 14:31:32 -07:00
René Scharfe 1528d247e5 dir: respect string length argument of read_directory_recursive()
A directory name is passed to read_directory_recursive() as a
length-limited string, through the parameters base and baselen.
Suprisingly, base must be a NUL-terminated string as well, as it is
passed to opendir(), ignoring baselen.

Fix this by postponing the call to opendir() until the length-limted
string is added to a strbuf, which provides a NUL in the right place.

Signed-off-by: Rene Scharfe <rene.scharfe@lsrfire.ath.cx>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2012-05-11 14:31:27 -07:00
Luke Diamand 06dcd152a8 git p4: fix bug when enabling tag import/export via config variables
Use Python's True, not true. Causes failure when enabling tag
import or export in "git p4" using a config option rather than
the command line.

Signed-off-by: Luke Diamand <luke@diamand.org>
Acked-by: Pete Wyckoff <pw@padd.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2012-05-11 14:21:39 -07:00
Luke Diamand 05a3cec501 git p4: fix bug when verbose enabled with tag export
Wrong variable name used when verbose enabled, causes failure.

Signed-off-by: Luke Diamand <luke@diamand.org>
Acked-by: Pete Wyckoff <pw@padd.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2012-05-11 14:21:38 -07:00
Luke Diamand e71f6a53e2 git p4: add test for tag import/export enabled via config
This adds a test for git p4 to check it can import/export tags
when enabled via a config variable rather than on the command
line.

Signed-off-by: Luke Diamand <luke@diamand.org>
Acked-by: Pete Wyckoff <pw@padd.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2012-05-11 14:21:38 -07:00