Граф коммитов

29139 Коммитов

Автор SHA1 Сообщение Дата
Junio C Hamano ec04a275b4 Merge branch 'mh/ref-api'
Fixes a performance regression in the earlier series.
2012-05-25 12:04:36 -07:00
Junio C Hamano fca9e0013e Merge branch 'rs/maint-grep-F'
"git grep -e '$pattern'", unlike the case where the patterns are read from
a file, did not treat individual lines in the given pattern argument as
separate regular expressions as it should.
2012-05-25 12:04:19 -07:00
Junio C Hamano 4f64464023 Sync with 1.7.10.3 2012-05-25 11:36:25 -07:00
Junio C Hamano 26e5c5d093 Git 1.7.10.3
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2012-05-25 11:28:43 -07:00
Junio C Hamano 69e82602b9 Merge branch 'hv/submodule-alt-odb' into maint
When a submodule repository uses alternate object store mechanism, some
commands that were started from the superproject did not notice it and
failed with "No such object" errors.  The subcommands of "git submodule"
command that recursed into the submodule in a separate process were OK;
only the ones that cheated and peeked directly into the submodule's
repository from the primary process were affected.

By Heiko Voigt
* hv/submodule-alt-odb:
  teach add_submodule_odb() to look for alternates
2012-05-25 11:26:38 -07:00
Junio C Hamano 98eb3fc6cb Merge branch 'bp/diff-no-index-strbuf-fix' into maint
The directory path used in "git diff --no-index", when it recurses
down, was broken with a recent update after v1.7.10.1 release.

By Bobby Powers
* bp/diff-no-index-strbuf-fix:
  diff --no-index: don't leak buffers in queue_diff
  diff --no-index: reset temporary buffer lengths on directory iteration
2012-05-25 11:25:36 -07:00
Linus Torvalds a3347b988a fmt-merge-message: add empty line between tag and signature verification
When adding the information from a tag, put an empty line between the
message of the tag and the commented-out signature verification
information.

At least for the kernel workflow, I often end up re-formatting the message
that people send me in the tag data. In that situation, putting the tag
message and the tag signature verification back-to-back then means that
normal editor "reflow parapgraph" command will get confused and think that
the signature is a continuation of the last message paragraph.

So I always end up having to first add an empty line, and then go back and
reflow the last paragraph. Let's just do it in git directly.

The extra vertical space also makes the verification visually stand out
more from the user-supplied message, so it looks a bit more readable to me
too, but that may be just an odd personal preference.

Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2012-05-25 11:24:08 -07:00
Jonathan Nieder ec84e069af config doc: remove confusion about relative GIT_DIR from FILES section
From the FILES section of the git-config(1) manual:

	$GIT_DIR/config::
		Repository specific configuration file. (The filename is
		of course relative to the repository root, not the working
		directory.)

That's confusing because $GIT_DIR really is relative to the working
directory.

	$ GIT_DIR=.git GIT_EDITOR='pwd; echo editing'
	$ export GIT_DIR GIT_EDITOR
	$ git config --edit --local
	/home/jrn/src/git/Documentation
	editing .git/config

It turns out that the comment is a remnant from older days when the
heading said ".git/config" (which is indeed relative to the top of the
worktree).

It was only when the heading was changed to refer more precisely to
<git dir>/config (see v1.5.3.2~18, AsciiDoc tweak to avoid leading
dot, 2007-09-14) that the parenthesis stopped making sense.  Remove
it.

Signed-off-by: Jonathan Nieder <jrnieder@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2012-05-25 11:22:02 -07:00
Junio C Hamano 5bc2dc29d4 Sync with maint
By Jeff King (1) and Junio C Hamano (1)
* maint:
  Update draft release notes to 1.7.10.3
  osxkeychain: pull make config from top-level directory
2012-05-24 17:37:40 -07:00
Junio C Hamano c4649188e9 Update draft release notes to 1.7.10.3
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2012-05-24 17:37:29 -07:00
Junio C Hamano a8bd582d30 Merge branch 'jk/maint-status-porcelain-z-b' into maint
"git status --porcelain" ignored "--branch" option by mistake.  The output
for "git status --branch -z" was also incorrect and did not terminate the
record for the current branch name with NUL as asked.

By Jeff King
* jk/maint-status-porcelain-z-b:
  status: respect "-b" for porcelain format
  status: fix null termination with "-b"
  status: refactor null_termination option
  commit: refactor option parsing
2012-05-24 17:32:30 -07:00
Michael Haggerty 654ad400c2 Avoid sorting if references are added to ref_cache in order
The old code allowed many references to be efficiently added to a
single directory, because it just appended the references to the
containing directory unsorted without doing any searching (and
therefore without requiring any intermediate sorting).  But the old
code was inefficient when a large number of subdirectories were added
to a directory, because the directory always had to be searched to see
if the new subdirectory already existed, and this search required the
directory to be sorted first.  The same was repeated for every new
subdirectory, so the time scaled like O(N^2), where N is the number of
subdirectories within a single directory.

In practice, references are often added to the ref_cache in
lexicographic order, for example when reading the packed-refs file.
So build some intelligence into add_entry_to_dir() to optimize for the
case of references and/or subdirectories being added in lexicographic
order: if the existing entries were already sorted, and the new entry
comes after the last existing entry, then adjust ref_dir::sorted to
reflect the fact that the ref_dir is still sorted.

Thanks to Peff for pointing out the performance regression that
inspired this change.

Signed-off-by: Michael Haggerty <mhagger@alum.mit.edu>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2012-05-24 12:16:06 -07:00
Jeff King 17a9ac7d6b osxkeychain: pull make config from top-level directory
The default compiler and cflags were mostly "works for me"
when I built the original version. We need to be much less
careful here than usual, because we know we are building
only on OS X.  But it's only polite to at least respect the
CFLAGS and CC definitions that the user may have provided
earlier.

While we're at it, let's update our definitions and rules to
be more like the top-level Makefile; default our CFLAGS to
include -O2, and make sure we use CFLAGS and LDFLAGS when
linking.

Signed-off-by: Jeff King <peff@peff.net>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2012-05-24 10:35:40 -07:00
Junio C Hamano bd578b507f Update draft release notes to 1.7.11
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2012-05-23 13:54:23 -07:00
Junio C Hamano b83cfa5949 Merge branch 'rs/archive-tree-in-tip-simplify'
By René Scharfe
* rs/archive-tree-in-tip-simplify:
  archive-tar: keep const in checksum calculation
  archive: simplify refname handling
2012-05-23 13:35:22 -07:00
Junio C Hamano 8d19426f98 Merge branch 'js/rev-parse-doc-fix'
By Jon Seymour
* js/rev-parse-doc-fix:
  rev-parse doc: --git-dir does not always show a relative path
2012-05-23 13:35:19 -07:00
Junio C Hamano 12219414dd Merge branch 'js/rebase-i-p-test-fix'
By Johannes Sixt
* js/rebase-i-p-test-fix:
  Fix t3411.3 to actually rebase something
2012-05-23 13:35:16 -07:00
Junio C Hamano c0f31b83a6 Merge branch 'bp/diff-no-index-strbuf-fix'
Fix regressions to "git diff --no-index" when it recurses down.

By Bobby Powers
* bp/diff-no-index-strbuf-fix:
  diff --no-index: don't leak buffers in queue_diff
  diff --no-index: reset temporary buffer lengths on directory iteration
2012-05-23 13:35:12 -07:00
Junio C Hamano 4809ff858b Merge branch 'hv/submodule-alt-odb'
When peeking into object stores of submodules, the code forgot that they
might borrow objects from alternate object stores on their own.

By Heiko Voigt
* hv/submodule-alt-odb:
  teach add_submodule_odb() to look for alternates
2012-05-23 13:35:06 -07:00
René Scharfe ec83061156 grep: stop leaking line strings with -f
When reading patterns from a file, we pass the lines as allocated string
buffers to append_grep_pat() and never free them.  That's not a problem
because they are needed until the program ends anyway.

However, now that the function duplicates the pattern string, we can
reuse the strbuf after calling that function.  This simplifies the code
a bit and plugs a minor memory leak.

Signed-off-by: Rene Scharfe <rene.scharfe@lsrfire.ath.cx>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2012-05-21 15:02:08 -07:00
Ralf Thielow aa3bb87176 remote: fix typo
The mapping that describe what ref fetched from the remote is used to
update what ref locally is called "refspec", not "respec".

Signed-off-by: Ralf Thielow <ralf.thielow@googlemail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2012-05-20 18:48:10 -07:00
Junio C Hamano adc7052bb6 Merge branch 'maint'
By Jens Lehmann (1) and Johannes Sixt (1)
* maint:
  Consistently use "superproject" instead of "supermodule"
  t3404: begin "exchange commits with -p" test with correct preconditions
2012-05-20 15:45:35 -07:00
René Scharfe 526a858a99 grep: support newline separated pattern list
Currently, patterns that contain newline characters don't match anything
when given to git grep.  Regular grep(1) interprets patterns as lists of
newline separated search strings instead.

Implement this functionality by creating and inserting extra grep_pat
structures for patterns consisting of multiple lines when appending to
the pattern lists.  For simplicity, all pattern strings are duplicated.
The original pattern is truncated in place to make it contain only the
first line.

Requested-by: Torne (Richard Coles) <torne@google.com>
Signed-off-by: Rene Scharfe <rene.scharfe@lsrfire.ath.cx>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2012-05-20 15:25:46 -07:00
René Scharfe 2b3873ff34 grep: factor out do_append_grep_pat()
Add do_append_grep_pat() as a shared function for adding patterns to
the header pattern list and the general pattern list.

Signed-off-by: Rene Scharfe <rene.scharfe@lsrfire.ath.cx>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2012-05-20 15:12:25 -07:00
René Scharfe fc45675110 grep: factor out create_grep_pat()
Add create_grep_pat(), a shared helper for all grep pattern allocation
and initialization needs.

Signed-off-by: Rene Scharfe <rene.scharfe@lsrfire.ath.cx>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2012-05-20 15:12:22 -07:00
Jens Lehmann cb8ad289c6 Consistently use "superproject" instead of "supermodule"
We fairly consistently say "superproject" and never "supermodule" these
days. But there are seven occurrences of "supermodule" left in the current
work tree. Three appear in Release Notes for 1.5.3 and 1.7.7, three in
test names and one in a C-code comment.

Replace all occurrences of "supermodule" outside of the Release Notes
(which shouldn't be changed after the fact) with "superproject" for
consistency.

Signed-off-by: Jens Lehmann <Jens.Lehmann@web.de>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2012-05-20 14:58:38 -07:00
Johannes Sixt 27ccd8d1a3 t3404: begin "exchange commits with -p" test with correct preconditions
The test case shows a bug in 'rebase -p', but even if the bug were fixed
the test would fail because it did not ensure that the preconditions match
the postconditions that were checked. Insert the suitable 'git checkout'.

Signed-off-by: Johannes Sixt <j6t@kdbg.org>
Acked-by: Jonathan Nieder <jrnieder@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2012-05-20 14:54:07 -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
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