gitweb.git
l10n: Update git.pot (29 new messages)Jiang Xin Tue, 3 Jul 2012 02:31:59 +0000 (10:31 +0800)

l10n: Update git.pot (29 new messages)

Generate po/git.pot from v1.7.11.1-107-g72601, and there are 29 new l10n
messages.

Signed-off-by: Jiang Xin <worldhello.net@gmail.com>

Sync with i18n-po updates in maintJunio C Hamano Mon, 2 Jul 2012 22:37:54 +0000 (15:37 -0700)

Sync with i18n-po updates in maint

# By Peter Krefting
# Via Junio C Hamano (1) and Peter Krefting (1)
* maint:
Update Swedish translation (1066t0f0u)

Merge branch 'maint' of git://github.com/git-l10n/git... Junio C Hamano Mon, 2 Jul 2012 22:36:52 +0000 (15:36 -0700)

Merge branch 'maint' of git://github.com/git-l10n/git-po into maint

Update Swedish translation (1066t0f0u)

sha1_name.c: hide get_sha1_with_context_1() uglinessJunio C Hamano Mon, 2 Jul 2012 17:19:35 +0000 (10:19 -0700)

sha1_name.c: hide get_sha1_with_context_1() ugliness

There is no outside caller that cares about the "only-to-die" ugliness.

Signed-off-by: Junio C Hamano <gitster@pobox.com>

blame: compute abbreviation width that ensures uniquenessJunio C Hamano Mon, 2 Jul 2012 07:54:00 +0000 (00:54 -0700)

blame: compute abbreviation width that ensures uniqueness

Julia Lawall noticed that in linux-next repository the commit object
60d5c9f5 (shown with the default abbreviation width baked into "git
blame") in output from

$ git blame -L 3675,3675 60d5c9f5b -- \
drivers/staging/brcm80211/brcmfmac/wl_iw.c

is no longer unique in the repository, which results in "short SHA1
60d5c9f5 is ambiguous".

Compute the minimum abbreviation width that ensures uniqueness when
the user did not specify the --abbrev option to avoid this.

Signed-off-by: Junio C Hamano <gitster@pobox.com>

Update Swedish translation (1066t0f0u)Peter Krefting Sun, 1 Jul 2012 22:04:09 +0000 (23:04 +0100)

Update Swedish translation (1066t0f0u)

Signed-off-by: Peter Krefting <peter@softwolves.pp.se>

perl/Makefile: Fix a missing double-quoteJohannes Sixt Fri, 29 Jun 2012 08:07:44 +0000 (10:07 +0200)

perl/Makefile: Fix a missing double-quote

Signed-off-by: Johannes Sixt <j6t@kdbg.org>
Acked-by: Jonathan Nieder <jrnieder@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>

diff-index.c: "git diff" has no need to read blob from... Junio C Hamano Thu, 28 Jun 2012 03:14:47 +0000 (20:14 -0700)

diff-index.c: "git diff" has no need to read blob from the standard input

Only "diff --no-index -" does. Bolting the logic into the low-level
function diff_populate_filespec() was a layering violation from day
one. Move populate_from_stdin() function out of the generic diff.c
to its only user, diff-index.c.

Also make sure "-" from the command line stays a special token "read
from the standard input", even if we later decide to sanitize the
result from prefix_filename() function in a few obvious ways,
e.g. removing unnecessary "./" prefix, duplicated slashes "//" in
the middle, etc.

Signed-off-by: Junio C Hamano <gitster@pobox.com>

diff-index.c: unify handling of command line pathsJunio C Hamano Wed, 27 Jun 2012 19:05:52 +0000 (12:05 -0700)

diff-index.c: unify handling of command line paths

Regardless of where in the directory hierarchy you are, "-" on the
command line means the standard input. The old code knew too much
about how the low level machinery uses paths to read from the
working tree and did not bother to have the same check for "-" when
the command is run from the top-level.

Unify the codepaths for subdirectory case and toplevel case into one
and make it clearer.

Signed-off-by: Junio C Hamano <gitster@pobox.com>

diff-index.c: do not pretend paths are pathspecsJunio C Hamano Wed, 27 Jun 2012 18:51:15 +0000 (11:51 -0700)

diff-index.c: do not pretend paths are pathspecs

"git diff --no-index" takes exactly two paths, not pathspecs, and
has its own way queue_diff() to populate the diff_queue. Do not
call diff_tree_setup_paths(), pretending as it takes pathspecs.

Signed-off-by: Junio C Hamano <gitster@pobox.com>

Third batch for 1.7.12Junio C Hamano Thu, 28 Jun 2012 22:35:37 +0000 (15:35 -0700)

Third batch for 1.7.12

Signed-off-by: Junio C Hamano <gitster@pobox.com>

Merge branch 'fc/git-prompt-script'Junio C Hamano Thu, 28 Jun 2012 22:21:00 +0000 (15:21 -0700)

Merge branch 'fc/git-prompt-script'

Split a rather heavy-ish "git completion" script out to create a
separate "git prompting" script, to help lazy-autoloading of the
completion part while making prompting part always available.

Merge branch 'js/submodule-relative'Junio C Hamano Thu, 28 Jun 2012 22:20:55 +0000 (15:20 -0700)

Merge branch 'js/submodule-relative'

Teach "git submodule" deal with nested submodule structure where a
module is contained within a module whose origin is specified as a
relative URL to its superproject's origin.

Merge branch 'lk/more-helpful-status-hints'Junio C Hamano Thu, 28 Jun 2012 22:20:35 +0000 (15:20 -0700)

Merge branch 'lk/more-helpful-status-hints'

Give finer classification to various states of paths in conflicted
state and offer advice messages in the "git status" output.

Merge branch 'lk/rebase-i-x'Junio C Hamano Thu, 28 Jun 2012 22:20:23 +0000 (15:20 -0700)

Merge branch 'lk/rebase-i-x'

Teach "-x <cmd>" to "rebase -i" to insert "exec <cmd>" after each
commit in the resulting history.

Merge branch 'jc/rev-list-simplify-merges-first-parent'Junio C Hamano Thu, 28 Jun 2012 22:20:16 +0000 (15:20 -0700)

Merge branch 'jc/rev-list-simplify-merges-first-parent'

When "--simplify-merges/by-decoration" is given together with
"--first-parent" to "git log", the combination of these options
makes the simplification logic to use in-core commit objects that
haven't been examined for relevance, either producing incorrect
result or taking too long to produce any output. Teach the
simplification logic to ignore commits that the first-parent
traversal logic ignored when both are in effect to work around the
issue.

Merge branch 'hv/submodule-update-nuke-submodules'Junio C Hamano Thu, 28 Jun 2012 22:20:08 +0000 (15:20 -0700)

Merge branch 'hv/submodule-update-nuke-submodules'

"git add" allows adding a regular file to the path where a submodule
used to exist, but "git update-index" does not allow an equivalent
operation to Porcelain writers.

Merge branch 'nd/exclude-workaround-top-heavy'Junio C Hamano Thu, 28 Jun 2012 22:19:57 +0000 (15:19 -0700)

Merge branch 'nd/exclude-workaround-top-heavy'

Attempt to optimize matching with an exclude pattern with a deep
directory hierarchy by taking the part that specifies leading path
without wildcard literally.

Merge branch 'nd/stream-pack-objects'Junio C Hamano Thu, 28 Jun 2012 22:19:51 +0000 (15:19 -0700)

Merge branch 'nd/stream-pack-objects'

"pack-objects" learned to read large loose blobs using the streaming API,
without the need to hold everything in core at once.

Merge branch 'nd/stream-index-pack'Junio C Hamano Thu, 28 Jun 2012 22:19:42 +0000 (15:19 -0700)

Merge branch 'nd/stream-index-pack'

Use streaming API to read from the object store to avoid having to hold
a large blob object in-core while running index-pack.

Merge branch 'mm/verify-filename-fix'Junio C Hamano Thu, 28 Jun 2012 22:19:31 +0000 (15:19 -0700)

Merge branch 'mm/verify-filename-fix'

"git diff COPYING HEAD:COPYING" gave a nonsense error message that
claimed that the treeish HEAD did not have COPYING in it.

Merge branch 'jk/diff-no-index-pager'Junio C Hamano Thu, 28 Jun 2012 22:19:11 +0000 (15:19 -0700)

Merge branch 'jk/diff-no-index-pager'

"git diff --no-index" did not work with pagers correctly.

Allow help.htmlpath to be a URL prefixChris Webb Thu, 28 Jun 2012 06:58:03 +0000 (07:58 +0100)

Allow help.htmlpath to be a URL prefix

Setting this to a URL prefix instead of a path to a local directory allows
git-help --web to work even when HTML docs aren't locally installed, by
pointing the browser at a copy accessible on the web. For example,

[help]
format = html
htmlpath = http://git-scm.com/docs

will use the publicly available documentation on the git homepage.

Signed-off-by: Chris Webb <chris@arachsys.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>

Add config variable to set HTML path for git-help ... Chris Webb Thu, 28 Jun 2012 06:58:02 +0000 (07:58 +0100)

Add config variable to set HTML path for git-help --web

If set in git-config, help.htmlpath overrides system_path(GIT_HTML_PATH)
which was compiled in. This allows users to repoint system-wide git at
their own copy of the documentation without recompiling.

Signed-off-by: Chris Webb <chris@arachsys.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>

git p4 test: fix badp4dir testPete Wyckoff Wed, 27 Jun 2012 12:01:03 +0000 (08:01 -0400)

git p4 test: fix badp4dir test

The construct used to get the return code was flawed, in that
errors in the &&-chain before the semicolon were not caught. Use
the standard test_expect_code instead.

Set PATH in a subshell instead of relying on the bashism of
setting it just for a single command.

And fix the grep line so it doesn't worry about grep segfaults,
and doesn't fail for i18n issues.

Reported-by: Johannes Sixt <j.sixt@viscovery.net>
Signed-off-by: Pete Wyckoff <pw@padd.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>

git p4 test: split up big t9800 testPete Wyckoff Wed, 27 Jun 2012 12:01:02 +0000 (08:01 -0400)

git p4 test: split up big t9800 test

The original t9800 test code has a mix of assorted topics, some
of which are big enough to deserve their own homes.
Interdependencies between the topics make it confusing when
trying to study one in isolation. And it takes so long to run
that debugging an individual test is difficult.

Split out three big chunks of tests into their own files:

t9812-git-p4-wildcards.sh gets the 8 p4 wildcard tests

t9813-git-p4-preserve-users.sh gets the 4 --preserve-user tests

t9814-git-p4-rename.sh gets the 2 copy and rename tests

Test 9800 execution time drops from 29 sec to 9 sec. The
sequential time to run all tests is a slower due to the three
extra p4d startup/shutdown sequences, but the overall parallel
execution time is about the same, at 52 sec.

Signed-off-by: Pete Wyckoff <pw@padd.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>

git p4 test: cleanup_git should make a new $gitPete Wyckoff Wed, 27 Jun 2012 12:01:01 +0000 (08:01 -0400)

git p4 test: cleanup_git should make a new $git

For convenience, leave one in place at the end of each
test so that it is not necessary to build a new one. This
makes it consistent with $cli.

Signed-off-by: Pete Wyckoff <pw@padd.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>

git p4 test: copy source indeterminatePete Wyckoff Wed, 27 Jun 2012 12:01:00 +0000 (08:01 -0400)

git p4 test: copy source indeterminate

Msysgit testing showed that the source file found by copy
detection is indeterminate when there are multiple sources
to choose from. This appears to be valid. Adjust the test
so that it passes if it finds any of the potential copy sources.

Signed-off-by: Pete Wyckoff <pw@padd.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>

git p4 test: check for error message in failed testPete Wyckoff Wed, 27 Jun 2012 12:00:59 +0000 (08:00 -0400)

git p4 test: check for error message in failed test

Make sure the test fails for the expected reason.

Signed-off-by: Pete Wyckoff <pw@padd.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>

git p4 test: rename some "git-p4 command" stringsPete Wyckoff Wed, 27 Jun 2012 12:00:58 +0000 (08:00 -0400)

git p4 test: rename some "git-p4 command" strings

Use the actual command name; git-p4 is gone.

Signed-off-by: Pete Wyckoff <pw@padd.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>

git p4 test: never create default test repoPete Wyckoff Wed, 27 Jun 2012 12:00:57 +0000 (08:00 -0400)

git p4 test: never create default test repo

Signed-off-by: Pete Wyckoff <pw@padd.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>

git p4 test: simplify quoting involving TRASH_DIRECTORYPete Wyckoff Wed, 27 Jun 2012 12:00:56 +0000 (08:00 -0400)

git p4 test: simplify quoting involving TRASH_DIRECTORY

For temporary files that are created in the top-level TRASH_DIRECTORY,
trust that the tests do not chdir except in subshells, and avoid some
quoting.

Signed-off-by: Pete Wyckoff <pw@padd.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>

git p4 test: use real_path to resolve p4 client symlinksPete Wyckoff Wed, 27 Jun 2012 12:00:55 +0000 (08:00 -0400)

git p4 test: use real_path to resolve p4 client symlinks

The p4 program is finicky about making sure the recorded client Root
matches the current working directory. The way it discovers the latter
seems to be to inspect shell variable $PWD. This could involve symlinks,
that while leading to the same place as the client Root, look different,
and cause p4 to fail.

Resolve all client paths using "test-path-utils real_path $path". This
removes ".." and resolves all symlinks.

Discovered while running with --root=/dev/shm, which is a link to
/run/shm.

Signed-off-by: Pete Wyckoff <pw@padd.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>

git p4 test: wait longer for p4d to start and test... Pete Wyckoff Thu, 28 Jun 2012 02:48:07 +0000 (22:48 -0400)

git p4 test: wait longer for p4d to start and test its pid

Running tests at high parallelism on a slow machine, 5 sec is
not enough to wait for p4d to start. Change it to 5 minutes,
adding an environment variable P4D_START_PATIENCE to shrink
that if needed in automated test environments.

Also check if the pid of the p4d that we started is still
around. If not, quit waiting for it immediately.

Remove all the confusing && chaining and simplify the code.

Thanks-to: Junio C Hamano <gitster@pobox.com>
Signed-off-by: Pete Wyckoff <pw@padd.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>

fast-export: quote paths with spacesJay Soffian Wed, 27 Jun 2012 21:58:01 +0000 (17:58 -0400)

fast-export: quote paths with spaces

A path containing a space must be quoted when used as an
argument to either the copy or rename commands (because
unlike other commands, the path is not the final thing on
the line for those commands).

Commit 6280dfdc3b (fast-export: quote paths in output,
2011-08-05) previously attempted to fix fast-export's
quoting by passing all paths through quote_c_style().
However, that function does not consider the space to be a
character which requires quoting, so let's special-case the
space inside print_path(). This will cause space-containing
paths to also be quoted in other commands where such quoting
is not strictly necessary, but it does not hurt to do so.

The test from 6280dfdc3b did not detect this because, while
it does introduce renames in the export stream, it does not
actually turn on rename detection, so they were presented as
pairs of deletions/adds. Using "-M" reveals the bug.

Signed-off-by: Jay Soffian <jaysoffian@gmail.com>
Signed-off-by: Jeff King <peff@peff.net>
Signed-off-by: Junio C Hamano <gitster@pobox.com>

git-remote-mediawiki: import "File:" attachmentsPavel Volek Wed, 27 Jun 2012 14:21:29 +0000 (16:21 +0200)

git-remote-mediawiki: import "File:" attachments

Add the symmetrical feature to the "File:" export support in the previous
patch. Download files from the wiki as needed, and feed them into the
fast-import stream. Import both the file itself, and the corresponding
description page.

Signed-off-by: Pavel Volek <Pavel.Volek@ensimag.imag.fr>
Signed-off-by: NGUYEN Kim Thuat <Kim-Thuat.Nguyen@ensimag.imag.fr>
Signed-off-by: ROUCHER IGLESIAS Javier <roucherj@ensimag.imag.fr>
Signed-off-by: Matthieu Moy <Matthieu.Moy@imag.fr>
Signed-off-by: Junio C Hamano <gitster@pobox.com>

git-remote-mediawiki: split get_mw_pages into smaller... Matthieu Moy Wed, 27 Jun 2012 09:10:19 +0000 (11:10 +0200)

git-remote-mediawiki: split get_mw_pages into smaller functions

Signed-off-by: Matthieu Moy <Matthieu.Moy@imag.fr>
Signed-off-by: Junio C Hamano <gitster@pobox.com>

git-remote-mediawiki: send "File:" attachments to a... NGUYEN Kim Thuat Wed, 27 Jun 2012 09:10:18 +0000 (11:10 +0200)

git-remote-mediawiki: send "File:" attachments to a remote wiki

The current version of the git-remote-mediawiki supports only import and
export of plain wiki pages. This patch adds the functionality to export
file attachments (i.e. the content of the File: MediaWiki namespace),
which are also exposed by MediaWiki API.

This requires a recent version of MediaWiki::API (Version 0.37 works.
Version 0.34 doesn't).

Signed-off-by: Pavel Volek <Pavel.Volek@ensimag.imag.fr>
Signed-off-by: NGUYEN Kim Thuat <Kim-Thuat.Nguyen@ensimag.imag.fr>
Signed-off-by: ROUCHER IGLESIAS Javier <roucherj@ensimag.imag.fr>
Signed-off-by: Matthieu Moy <Matthieu.Moy@imag.fr>
Signed-off-by: Junio C Hamano <gitster@pobox.com>

git-remote-mediawiki: don't "use encoding 'utf8';"Matthieu Moy Wed, 27 Jun 2012 09:10:17 +0000 (11:10 +0200)

git-remote-mediawiki: don't "use encoding 'utf8';"

The use of this statement is generally discouraged, and is too intrusive
for us: it forces the HTTP requests made by the API to contain only valid
UTF-8 characters. This would break the upload of binary files.

Signed-off-by: Matthieu Moy <Matthieu.Moy@imag.fr>
Signed-off-by: Junio C Hamano <gitster@pobox.com>

git-remote-mediawiki: don't compute the diff when getti... Matthieu Moy Wed, 27 Jun 2012 09:10:16 +0000 (11:10 +0200)

git-remote-mediawiki: don't compute the diff when getting commit message

While we're there, simplify the code a bit: since log --format=%s anyway
shows the subject line as a single line, no need to split to take the
first line.

Signed-off-by: Matthieu Moy <Matthieu.Moy@imag.fr>
Signed-off-by: Junio C Hamano <gitster@pobox.com>

add test case for rebase of empty commitMartin von Zweigbergk Wed, 27 Jun 2012 16:22:01 +0000 (09:22 -0700)

add test case for rebase of empty commit

Signed-off-by: Junio C Hamano <gitster@pobox.com>

Add tests for rebase -i --root without --ontoChris Webb Tue, 26 Jun 2012 21:55:24 +0000 (22:55 +0100)

Add tests for rebase -i --root without --onto

Test for likely breakages in t3404, including successful reordering of
non-conflicting changes with a new root, correct preservation of commit
message and author in a root commit when it is squashed with the
sentinel, and presence of the sentinel following a conflicting
cherry-pick of a new root.

Remove test_must_fail for git rebase --root without --onto from t3412 as
this case will now be successfully handled by an implicit git rebase -i.

Signed-off-by: Chris Webb <chris@arachsys.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>

rebase -i: support --root without --ontoChris Webb Tue, 26 Jun 2012 21:55:23 +0000 (22:55 +0100)

rebase -i: support --root without --onto

Allow --root to be specified to rebase -i without --onto, making it
possible to edit and re-order all commits right back to the root(s).

If there is a conflict to be resolved when applying the first change,
the user will expect a sane index and working tree to get sensible
behaviour from git-diff and friends, so create a sentinel commit with an
empty tree to rebase onto. Automatically squash the sentinel with any
commits rebased directly onto it, so they end up as root commits in
their own right and retain their authorship and commit message.

Implicitly use rebase -i for non-interactive rebase of --root without
an --onto argument now that rebase -i can correctly do this.

Signed-off-by: Chris Webb <chris@arachsys.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>

index-pack: Disable threading on cygwinJunio C Hamano Tue, 26 Jun 2012 18:19:32 +0000 (19:19 +0100)

index-pack: Disable threading on cygwin

The Cygwin implementation of pread() is not thread-safe since, just
like the emulation provided by compat/pread.c, it uses a sequence of
seek-read-seek calls. In order to avoid failues due to thread-safety
issues, commit b038a61 disables threading when NO_PREAD is defined.
(ie when using the emulation code in compat/pread.c).

We introduce a new build variable, NO_THREAD_SAFE_PREAD, which allows
use to disable the threaded index-pack code on cygwin, in addition to
the above NO_PREAD case.

Signed-off-by: Ramsay Jones <ramsay@ramsay1.demon.co.uk>
Signed-off-by: Junio C Hamano <gitster@pobox.com>

am: don't call mailinfo if $rebasingMartin von Zweigbergk Tue, 26 Jun 2012 14:51:57 +0000 (07:51 -0700)

am: don't call mailinfo if $rebasing

Since 5e835ca (rebase: do not munge commit log message, 2008-04-16),
'git am --rebasing' no longer gets the commit log message from the
patch, but reads it from the commit identified by the "From " header
line. From 43c2325 (am: use get_author_ident_from_commit instead of
mailinfo when rebasing, 2010-06-16), it also gets the author name,
email and date from the commit. Now that the final part of the patch
-- the patch body itself -- is also read from the commit, there is no
longer a need to call 'git mailinfo' to extract any of these parts
while --rebasing.

Sugested-by: Junio C Hamano <gitster@pobox.com>
Signed-off-by: Martin von Zweigbergk <martin.von.zweigbergk@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>

am --rebasing: get patch body from commit, not from... Martin von Zweigbergk Tue, 26 Jun 2012 14:51:56 +0000 (07:51 -0700)

am --rebasing: get patch body from commit, not from mailbox

Rebasing a commit that contains a diff in the commit message results
in a failure with output such as

First, rewinding head to replay your work on top of it...
Applying: My cool patch.
fatal: sha1 information is lacking or useless
(app/controllers/settings_controller.rb).
Repository lacks necessary blobs to fall back on 3-way merge.
Cannot fall back to three-way merge.
Patch failed at 0001 My cool patch.

The reason is that 'git rebase' without -p/-i/-m internally calls 'git
format-patch' and pipes the output to 'git am --rebasing', which has
no way of knowing what is a real patch and what is a commit message
that contains a patch.

Make 'git am' while in --rebasing mode get the patch body from the
commit object instead of extracting it from the mailbox.

Patch by Junio, test case and commit log message by Martin.

Reported-by: anikey <arty.anikey@gmail.com>
Helped-by: Junio C Hamano <gitster@pobox.com>
Signed-off-by: Martin von Zweigbergk <martin.von.zweigbergk@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>

rebase --root: print usage on too many argsMartin von Zweigbergk Tue, 26 Jun 2012 14:51:55 +0000 (07:51 -0700)

rebase --root: print usage on too many args

Just like

git rebase --onto newbase upstream branch error

displays the usage message, so should clearly

git rebase --onto newbase --root branch error

, but it doesn't. Instead, it ignores both "branch" and "error" and
rebases the current HEAD. This is because we try to match the number
of remainging arguments "$#", which fails to match "1" argument and
matches the "*" that really should have been a "0".

Make sure we display usage information when too many arguments are
given. Also fail-fast in case of similar bugs in the future by
matching on exactly 0 arguments and failing on unknown numbers.

Signed-off-by: Junio C Hamano <gitster@pobox.com>

rebase: don't source git-sh-setup twiceMartin von Zweigbergk Tue, 26 Jun 2012 14:51:54 +0000 (07:51 -0700)

rebase: don't source git-sh-setup twice

The git-sh-setup script is already sourced in git-rebase.sh before
calling into git-rebase--(am|interactive|merge).sh. There are no other
callers of these scripts. It is therefore unnecessary to source
git-sh-setup again in them.

Signed-off-by: Junio C Hamano <gitster@pobox.com>

git-checkout: disallow --detach on unborn branchChris Webb Tue, 26 Jun 2012 15:06:42 +0000 (16:06 +0100)

git-checkout: disallow --detach on unborn branch

abe199808c (git checkout -b: allow switching out of an unborn branch)
introduced a bug demonstrated by

git checkout --orphan foo
git checkout --detach
git symbolic-ref HEAD

which gives 'refs/heads/(null)'.

This happens because we strbuf_addf(&branch_ref, "refs/heads/%s",
opts->new_branch) when opts->new_branch can be NULL for --detach.

Catch and forbid this case, adding a test to t2017 to catch it in
future.

Signed-off-by: Chris Webb <chris@arachsys.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>

git-remote-mediawiki: add credential supportMatthieu Moy Sun, 24 Jun 2012 11:40:01 +0000 (13:40 +0200)

git-remote-mediawiki: add credential support

The previous version implemented the possibility to log in a wiki, but
the username and password had to be provided as configuration variables.
We add the possibility to use the Git credential system to prompt
the password.

The support if implemented with generic functions that mimic the C API,
designed to be usable from other contexts in the future (i.e. they may
migrate to Git.pm if someone is interested).

While we're there, do a bit of refactoring in mw_connect_maybe.

Based on patch by: Javier Roucher Iglesias <Javier.Roucher-Iglesias@ensimag.imag.fr>

Signed-off-by: Junio C Hamano <gitster@pobox.com>

git credential fill: output the whole 'struct credential'Matthieu Moy Sun, 24 Jun 2012 11:40:00 +0000 (13:40 +0200)

git credential fill: output the whole 'struct credential'

Instead of outputing only the username and password, print all the
attributes, even those that already appeared in the input.

This is closer to what the C API does, and allows one to take the exact
output of "git credential fill" as input to "git credential approve" or
"git credential reject".

Signed-off-by: Junio C Hamano <gitster@pobox.com>

add 'git credential' plumbing commandJavier Roucher Iglesias Sun, 24 Jun 2012 11:39:59 +0000 (13:39 +0200)

add 'git credential' plumbing command

The credential API is in C, and not available to scripting languages.
Expose the functionalities of the API by wrapping them into a new
plumbing command "git credentials".

In other words, replace the internal "test-credential" by an official Git
command.

Most documentation writen by: Jeff King <peff@peff.net>
Signed-off-by: Pavel Volek <Pavel.Volek@ensimag.imag.fr>
Signed-off-by: Kim Thuat Nguyen <Kim-Thuat.Nguyen@ensimag.imag.fr>
Signed-off-by: Javier Roucher Iglesias <Javier.Roucher-Iglesias@ensimag.imag.fr>
Signed-off-by: Matthieu Moy <Matthieu.Moy@imag.fr>
Signed-off-by: Junio C Hamano <gitster@pobox.com>

Second batch for 1.7.12Junio C Hamano Mon, 25 Jun 2012 18:31:07 +0000 (11:31 -0700)

Second batch for 1.7.12

Signed-off-by: Junio C Hamano <gitster@pobox.com>

Merge branch 'lp/no-cmd-http-fetch'Junio C Hamano Mon, 25 Jun 2012 18:25:48 +0000 (11:25 -0700)

Merge branch 'lp/no-cmd-http-fetch'

Remove unused declarations of nonexisting functions from a header
file.

* lp/no-cmd-http-fetch:
builtin.h: remove unused cmd_<foo> declarations

Merge branch 'cn/cherry-pick-range-docs'Junio C Hamano Mon, 25 Jun 2012 18:25:38 +0000 (11:25 -0700)

Merge branch 'cn/cherry-pick-range-docs'

The command line argument of "git cherry-pick maint master..next" is
just an ordinary revision range, which is unintuitive and at least
deserves documentation.

* cn/cherry-pick-range-docs:
git-cherry-pick.txt: clarify the use of revision range notation
Documentation: --no-walk is no-op if range is specified

Merge branch 'lm/git-blame-el'Junio C Hamano Mon, 25 Jun 2012 18:25:12 +0000 (11:25 -0700)

Merge branch 'lm/git-blame-el'

eLisp fixes for a contrib/ script.

* lm/git-blame-el:
git-blame.el: Do not use bare 0 to mean (point-min)
git-blame.el: Use with-current-buffer where appropriate
git-blame.el: Do not use goto-line in lisp code

Merge branch 'rs/ipv6-ssh-url'Junio C Hamano Mon, 25 Jun 2012 18:25:06 +0000 (11:25 -0700)

Merge branch 'rs/ipv6-ssh-url'

ssh:// URLs to IPv6 hosts with custom port number were parsed
incorrectly.

* rs/ipv6-ssh-url:
git: Wrong parsing of ssh urls with IPv6 literals ignores port

Merge branch 'jc/ustar-checksum-is-unsigned'Junio C Hamano Mon, 25 Jun 2012 18:24:57 +0000 (11:24 -0700)

Merge branch 'jc/ustar-checksum-is-unsigned'

"git archive" incorrectly computed the header checksum; the symptom
was observed only when using pathnames with hi-bit set.

* jc/ustar-checksum-is-unsigned:
archive: ustar header checksum is computed unsigned

Merge branch 'rs/git-blame-mapcar-mapc'Junio C Hamano Mon, 25 Jun 2012 18:24:52 +0000 (11:24 -0700)

Merge branch 'rs/git-blame-mapcar-mapc'

* rs/git-blame-mapcar-mapc:
git-blame.el: use mapc instead of mapcar

Merge branch 'rr/doc-commit'Junio C Hamano Mon, 25 Jun 2012 18:24:42 +0000 (11:24 -0700)

Merge branch 'rr/doc-commit'

* rr/doc-commit:
commit: document a couple of options

Merge branch 'nd/i18n-misc'Junio C Hamano Mon, 25 Jun 2012 18:24:37 +0000 (11:24 -0700)

Merge branch 'nd/i18n-misc'

Restructure the way message strings are created, in preparation for
marking them for i18n.

* nd/i18n-misc:
rerere: remove i18n legos in result message
notes-merge: remove i18n legos in merge result message
reflog: remove i18n legos in pruning message

Merge branch 'nd/i18n-branch-lego'Junio C Hamano Mon, 25 Jun 2012 18:24:20 +0000 (11:24 -0700)

Merge branch 'nd/i18n-branch-lego'

Restructure the way message strings are created, in preparation for
marking them for i18n.

* nd/i18n-branch-lego:
Remove i18n legos in notifying new branch tracking setup

Merge branch 'jk/no-more-asciidoc7'Junio C Hamano Mon, 25 Jun 2012 18:24:10 +0000 (11:24 -0700)

Merge branch 'jk/no-more-asciidoc7'

We no longer use AsciiDoc7 syntax in our documentation and favor a
more modern style.

* jk/no-more-asciidoc7:
docs: drop antique comment from Makefile
docs: drop asciidoc7compatible flag

Merge branch 'maint'Junio C Hamano Mon, 25 Jun 2012 18:21:33 +0000 (11:21 -0700)

Merge branch 'maint'

* maint:
git-submodule.sh: fix filename in comment.
git-add--interactive.perl: Remove two unused variables

git-submodule.sh: fix filename in comment.Michał Górny Mon, 25 Jun 2012 10:56:59 +0000 (12:56 +0200)

git-submodule.sh: fix filename in comment.

Signed-off-by: Michał Górny <mgorny@gentoo.org>
Signed-off-by: Junio C Hamano <gitster@pobox.com>

git-add--interactive.perl: Remove two unused variablesThomas Badie Sun, 24 Jun 2012 21:37:34 +0000 (23:37 +0200)

git-add--interactive.perl: Remove two unused variables

The patch 8f0bef6 refactored this script and made the variable $fh
unneeded in subs diff_applies and patch_update_file, but forgot to
remove them.

Signed-off-by: Thomas Badie <badie@lrde.epita.fr>
Signed-off-by: Junio C Hamano <gitster@pobox.com>

config: write to $XDG_CONFIG_HOME/git/config file when... Huynh Khoi Nguyen Nguyen Fri, 22 Jun 2012 09:03:26 +0000 (11:03 +0200)

config: write to $XDG_CONFIG_HOME/git/config file when appropriate

Teach git to write to $XDG_CONFIG_HOME/git/config if

- it already exists,
- $HOME/.gitconfig file doesn't, and
- The --global option is used.

Otherwise, write to $HOME/.gitconfig when the --global option is
given, as before.

If the user doesn't create $XDG_CONFIG_HOME/git/config, there is
absolutely no change. Users can use this new file only if they want.

If $XDG_CONFIG_HOME is either not set or empty, $HOME/.config/git/config
will be used.

Advice for users who often come back to an old version of Git: you
shouldn't create this file.

Signed-off-by: Huynh Khoi Nguyen Nguyen <Huynh-Khoi-Nguyen.Nguyen@ensimag.imag.fr>
Signed-off-by: Valentin Duperray <Valentin.Duperray@ensimag.imag.fr>
Signed-off-by: Franck Jonas <Franck.Jonas@ensimag.imag.fr>
Signed-off-by: Lucien Kong <Lucien.Kong@ensimag.imag.fr>
Signed-off-by: Thomas Nguy <Thomas.Nguy@ensimag.imag.fr>
Signed-off-by: Matthieu Moy <Matthieu.Moy@imag.fr>
Signed-off-by: Junio C Hamano <gitster@pobox.com>

Let core.attributesfile default to $XDG_CONFIG_HOME... Huynh Khoi Nguyen Nguyen Fri, 22 Jun 2012 09:03:25 +0000 (11:03 +0200)

Let core.attributesfile default to $XDG_CONFIG_HOME/git/attributes

This gives the default value for the core.attributesfile variable
following the exact same logic of the previous change for the
core.excludesfile setting.

Signed-off-by: Huynh Khoi Nguyen Nguyen <Huynh-Khoi-Nguyen.Nguyen@ensimag.imag.fr>
Signed-off-by: Valentin Duperray <Valentin.Duperray@ensimag.imag.fr>
Signed-off-by: Franck Jonas <Franck.Jonas@ensimag.imag.fr>
Signed-off-by: Lucien Kong <Lucien.Kong@ensimag.imag.fr>
Signed-off-by: Thomas Nguy <Thomas.Nguy@ensimag.imag.fr>
Signed-off-by: Matthieu Moy <Matthieu.Moy@imag.fr>
Signed-off-by: Junio C Hamano <gitster@pobox.com>

Let core.excludesfile default to $XDG_CONFIG_HOME/git... Huynh Khoi Nguyen Nguyen Fri, 22 Jun 2012 09:03:24 +0000 (11:03 +0200)

Let core.excludesfile default to $XDG_CONFIG_HOME/git/ignore

To use the feature of core.excludesfile, the user needs:

1. to create such a file,

2. and add configuration variable to point at it.

Instead, we can make this a one-step process by choosing a default value
which points to a filename in the user's $HOME, that is unlikely to
already exist on the system, and only use the presence of the file as a
cue that the user wants to use that feature.

And we use "${XDG_CONFIG_HOME:-$HOME/.config/git}/ignore" as such a
file, in the same directory as the newly added configuration file
("${XDG_CONFIG_HOME:-$HOME/.config/git}/config). The use of this
directory is in line with XDG specification as a location to store
such application specific files.

Signed-off-by: Huynh Khoi Nguyen Nguyen <Huynh-Khoi-Nguyen.Nguyen@ensimag.imag.fr>
Signed-off-by: Valentin Duperray <Valentin.Duperray@ensimag.imag.fr>
Signed-off-by: Franck Jonas <Franck.Jonas@ensimag.imag.fr>
Signed-off-by: Lucien Kong <Lucien.Kong@ensimag.imag.fr>
Signed-off-by: Thomas Nguy <Thomas.Nguy@ensimag.imag.fr>
Signed-off-by: Matthieu Moy <Matthieu.Moy@imag.fr>
Signed-off-by: Junio C Hamano <gitster@pobox.com>

config: read (but not write) from $XDG_CONFIG_HOME... Huynh Khoi Nguyen Nguyen Fri, 22 Jun 2012 09:03:23 +0000 (11:03 +0200)

config: read (but not write) from $XDG_CONFIG_HOME/git/config file

Teach git to read the "gitconfig" information from a new location,
$XDG_CONFIG_HOME/git/config; this allows the user to avoid
cluttering $HOME with many per-application configuration files.

In the order of reading, this file comes between the global
configuration file (typically $HOME/.gitconfig) and the system wide
configuration file (typically /etc/gitconfig).

We do not write to this new location (yet).

If $XDG_CONFIG_HOME is either not set or empty, $HOME/.config/git/config
will be used. This is in line with XDG specification.

If the new file does not exist, the behavior is unchanged.

Signed-off-by: Huynh Khoi Nguyen Nguyen <Huynh-Khoi-Nguyen.Nguyen@ensimag.imag.fr>
Signed-off-by: Valentin Duperray <Valentin.Duperray@ensimag.imag.fr>
Signed-off-by: Franck Jonas <Franck.Jonas@ensimag.imag.fr>
Signed-off-by: Lucien Kong <Lucien.Kong@ensimag.imag.fr>
Signed-off-by: Thomas Nguy <Thomas.Nguy@ensimag.imag.fr>
Signed-off-by: Matthieu Moy <Matthieu.Moy@imag.fr>
Signed-off-by: Junio C Hamano <gitster@pobox.com>

test-lib: reorder and include GIT-BUILD-OPTIONS a lot... Junio C Hamano Mon, 25 Jun 2012 05:01:35 +0000 (22:01 -0700)

test-lib: reorder and include GIT-BUILD-OPTIONS a lot earlier

This dot-sources GIT-BUILD-OPTIONS a lot earlier in test-lib.sh so
that its use of "perl" can use "$PERL_PATH" to choose the version of
Perl the user told us is suitable for our use.

This is iffy; I didn't check it very carefully, and I would not be
surprised if there are subtle breakages.

Signed-off-by: Junio C Hamano <gitster@pobox.com>

t/README: add a bit more Don'tsJunio C Hamano Tue, 12 Jun 2012 16:44:56 +0000 (09:44 -0700)

t/README: add a bit more Don'ts

Add a few more advices that we often have to give to new test
writers.

Also update an example where a double quote pair is used to enclose
a test body to use a single quote pair, which is more readable and
more importantly gives saner semantics for variable substitution.

Signed-off-by: Junio C Hamano <gitster@pobox.com>

tests: enclose $PERL_PATH in double quotesJunio C Hamano Tue, 12 Jun 2012 16:49:59 +0000 (09:49 -0700)

tests: enclose $PERL_PATH in double quotes

Otherwise it will be split at a space after "Program" when it is set
to "\\Program Files\perl" or something silly like that.

Signed-off-by: Junio C Hamano <gitster@pobox.com>

t/test-lib.sh: export PERL_PATH for use in scriptsJunio C Hamano Mon, 25 Jun 2012 04:42:11 +0000 (21:42 -0700)

t/test-lib.sh: export PERL_PATH for use in scripts

Most notably, t4031 creates a small shell script that invokes perl
and we want to use "$PERL_PATH" to name the version of Perl suitable
for our use, read from GIT-BUILD-OPTS. The test would fail when it
is directly run in t/ directory from the shell or "make" is run in t/
directory.

This problem was hidden from "make test" run in the top-level
directory, because its Makefile exports PERL_PATH.

Signed-off-by: Junio C Hamano <gitster@pobox.com>

Merge branch 'maint'Junio C Hamano Fri, 22 Jun 2012 21:35:51 +0000 (14:35 -0700)

Merge branch 'maint'

* maint:
Documentation: Fix misspellings

Documentation: Fix misspellingsLeila Muhtasib Fri, 22 Jun 2012 20:03:01 +0000 (16:03 -0400)

Documentation: Fix misspellings

Signed-off-by: Leila Muhtasib <muhtasib@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>

clone: fix ref selection in --single-branch --branch=xxxNguyễn Thái Ngọc Duy Fri, 22 Jun 2012 09:35:47 +0000 (16:35 +0700)

clone: fix ref selection in --single-branch --branch=xxx

- do not fetch HEAD
- do not also fetch refs following "xxx"

Signed-off-by: Nguyễn Thái Ngọc Duy <pclouds@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>

Merge branch 'vr/help-per-platform'Junio C Hamano Fri, 22 Jun 2012 18:07:28 +0000 (11:07 -0700)

Merge branch 'vr/help-per-platform'

* vr/help-per-platform:
Restore use of 'help.format' configuration property in 'git help'

Restore use of 'help.format' configuration property... Pat Thoyts Fri, 22 Jun 2012 12:48:46 +0000 (13:48 +0100)

Restore use of 'help.format' configuration property in 'git help'

Commit 1cc8af0 "help: use HTML as the default help format on Windows"
lost the ability to make use of the help.format config value by forcing
the use of a compiled in default if no command-line argument was provided.
This commit restores the use of the help.format value if one is
available, overriding the compiled default.

Signed-off-by: Pat Thoyts <patthoyts@users.sourceforge.net>
Signed-off-by: Junio C Hamano <gitster@pobox.com>

diff-no-index: exit(1) if 'diff --quiet <repo file... Tim Henigan Thu, 21 Jun 2012 18:09:51 +0000 (14:09 -0400)

diff-no-index: exit(1) if 'diff --quiet <repo file> <external file>' finds changes

When running 'git diff --quiet <file1> <file2>', if file1 or file2
is outside the repository, it will exit(0) even if the files differ.
It should exit(1) when they differ.

This happens because 'diff_no_index' looks at the 'found_changes'
member from 'diff_options' to determine if changes were made. This
is the wrong thing to do, since it is only set if xdiff is actually
run and it finds a change (the diff machinery will optimize out the
xdiff call when it is not necessary) and in that case HAS_CHANGED
flag needs to be taken into account.

Use diff_result_code() that knows all these details for the correct
exit value instead.

Signed-off-by: Tim Henigan <tim.henigan@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>

diff: handle relative paths in no-indexJeff King Thu, 21 Jun 2012 18:09:50 +0000 (14:09 -0400)

diff: handle relative paths in no-index

When diff-no-index is given a relative path to a file outside the
repository, it aborts with error. However, if the file is given
using an absolute path, the diff runs as expected. The two cases
should be treated the same.

Tests and commit message by Tim Henigan.

Signed-off-by: Jeff King <peff@peff.net>
Signed-off-by: Tim Henigan <tim.henigan@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>

Sync with 1.7.11.1Junio C Hamano Thu, 21 Jun 2012 21:52:23 +0000 (14:52 -0700)

Sync with 1.7.11.1

The first batch for 1.7.12Junio C Hamano Thu, 21 Jun 2012 21:51:39 +0000 (14:51 -0700)

The first batch for 1.7.12

Signed-off-by: Junio C Hamano <gitster@pobox.com>

Git 1.7.11.1 v1.7.11.1Junio C Hamano Thu, 21 Jun 2012 20:16:46 +0000 (13:16 -0700)

Git 1.7.11.1

Signed-off-by: Junio C Hamano <gitster@pobox.com>

Merge branch 'jk/maint-t1304-setfacl'Junio C Hamano Thu, 21 Jun 2012 21:42:43 +0000 (14:42 -0700)

Merge branch 'jk/maint-t1304-setfacl'

Works around a false test failure caused by a bug in ecryptofs.

* jk/maint-t1304-setfacl:
t1304: improve setfacl prerequisite setup

Merge branch 'vr/help-per-platform'Junio C Hamano Thu, 21 Jun 2012 21:42:38 +0000 (14:42 -0700)

Merge branch 'vr/help-per-platform'

We used to always default to "man" format even on platforms where
"man" viewer is not widely available.

* vr/help-per-platform:
help: use HTML as the default help format on Windows

Merge branch 'jc/ls-files-i-dir'Junio C Hamano Thu, 21 Jun 2012 21:42:06 +0000 (14:42 -0700)

Merge branch 'jc/ls-files-i-dir'

"git ls-files --exclude=t -i" did not consider anything under t/
as excluded, as it did not pay attention to exclusion of leading
paths while walking the index. Other two users of excluded() are
also updated.

* jc/ls-files-i-dir:
dir.c: make excluded() file scope static
unpack-trees.c: use path_excluded() in check_ok_to_remove()
builtin/add.c: use path_excluded()
path_excluded(): update API to less cache-entry centric
ls-files -i: micro-optimize path_excluded()
ls-files -i: pay attention to exclusion of leading paths

Merge branch 'jk/version-string'Junio C Hamano Thu, 21 Jun 2012 21:42:01 +0000 (14:42 -0700)

Merge branch 'jk/version-string'

Teaches git native protocol agents to show software version over the
wire.

* jk/version-string:
http: get default user-agent from git_user_agent
version: add git_user_agent function
move git_version_string into version.c

Merge branch 'jc/request-pull-match-tagname'Junio C Hamano Thu, 21 Jun 2012 21:41:57 +0000 (14:41 -0700)

Merge branch 'jc/request-pull-match-tagname'

"git request-pull $url dev" when the tip of "dev" branch was tagged
with "ext4-for-linus" used the contents from the tag in the output
but still asked the "dev" branch to be pulled, not the tag.

* jc/request-pull-match-tagname:
request-pull: really favor a matching tag

Merge branch 'jk/clone-local'Junio C Hamano Thu, 21 Jun 2012 21:41:53 +0000 (14:41 -0700)

Merge branch 'jk/clone-local'

"git clone --local $path" started its life as an experiment to
optionally use link/copy when cloning a repository on the disk, but
we didn't deprecate it after we made the option a no-op to always
use the optimization.

The command learns "--no-local" option to turn this off, as a more
explicit alternative over use of file:// URL.

* jk/clone-local:
clone: allow --no-local to turn off local optimizations
docs/clone: mention that --local may be ignored

Merge branch 'jc/bundle-complete-notice'Junio C Hamano Thu, 21 Jun 2012 21:41:44 +0000 (14:41 -0700)

Merge branch 'jc/bundle-complete-notice'

Running "git bundle verify" on a bundle that records a complete
history said "it requires these 0 commits".

* jc/bundle-complete-notice:
tweak "bundle verify" of a complete history

Kick off post 1.7.11 cycleJunio C Hamano Thu, 21 Jun 2012 20:18:49 +0000 (13:18 -0700)

Kick off post 1.7.11 cycle

I haven't decided what to call this one, 1.7.12, 1.8.0, or even 2.0.
Given that summer is a relatively slow season, I suspect 1.7.12 is
the most likely outcome, but we will see.

Signed-off-by: Junio C Hamano <gitster@pobox.com>

docs: always define git-relative-html-prefix attributeJeff King Thu, 21 Jun 2012 06:24:10 +0000 (02:24 -0400)

docs: always define git-relative-html-prefix attribute

Commit fe77b41 introduced a new attribute to let the linkgit macro
create cross-directory HTML references from the technical/ and howto/
subdirectories back to the main documentation. We define that attribute
to "../" on the command-line when building inside those subdirectories,
and otherwise leave it unset under the assumption that it would default
to being blank. Instead, asciidoc omits the link entirely, leading to
broken documentation. Fix this by defining git-relative-html-prefix to
blank in asciidoc.conf (and an instance on the command-line, when
present, will override it).

Signed-off-by: Jeff King <peff@peff.net>
Signed-off-by: Junio C Hamano <gitster@pobox.com>

Makefile: fold MISC_H into LIB_HJeff King Wed, 20 Jun 2012 18:30:56 +0000 (14:30 -0400)

Makefile: fold MISC_H into LIB_H

We keep a list of most of the header files in LIB_H, but
some are split out into MISC_H. The original point
of LIB_H was that it would force recompilation of C files
when any of the library headers changed. It was
over-encompassing, since not all C files included all of the
library headers; this made it simple to maintain, but meant
that we sometimes recompiled when it was not necessary.

Over time, some new headers were omitted from LIB_H, and
rules were added to the Makefile for a few specific targets
to explicitly depend on them. This avoided some unnecessary
recompilation at the cost of having to maintain the
dependency list of those targets manually (e.g., d349a03).

Later, we needed a complete list of headers from which we
should extract strings to localized. Thus 1b8b2e4 introduced
MISC_H to mention all header files not included in LIB_H,
and the concatenation of the two lists is fed to xgettext.
Headers mentioned as dependencies must also be manually
added to MISC_H to receive the benefits of localization.

Having to update multiple locations manually is a pain and
has led to errors. For example, see "git log -Swt-status.h
Makefile" for some back-and-forth between the two locations.
Or the fact that column.h was never added to MISC_H, and
therefore was not localized (which is fixed by this patch).
Moreover, the benefits of keeping these few headers out of
LIB_H is not that great, for two reasons:

1. The better way to do this is by auto-computing the
dependencies, which is more accurate and less work to
maintain. If your compiler supports it, we turn on
computed header dependencies by default these days. So
these manual dependencies are used only for people who
do not have gcc at all (which increases the chance of
them becoming stale, as many developers will never even
use them).

2. Even if you do not have gcc, the manual header
dependencies do not help all that much. They obviously
cannot help with an initial compilation (since their
purpose is to avoid unnecessary recompilation when a
header changes), which means they are only useful when
building a new version of git in the working tree that
held an existing build (e.g., after checkout or during a
bisection). But since a change of a header in LIB_H
will force recompilation, and given that the vast
majority of headers are in LIB_H, most version changes
will result in a full rebuild anyway.

Let's just fold MISC_H into LIB_H and get rid of these
manual rules. The worst case is some extra compilation, but
even that is unlikely to matter due to the reasons above.

The one exception is that we should keep common-cmds.h
separate. Because it is generated, the computed dependencies
do not handle it properly, and we must keep separate
individual dependencies on it. Let's therefore rename MISC_H
to GENERATED_H to make it more clear what should go in it.

Signed-off-by: Jeff King <peff@peff.net>
Signed-off-by: Junio C Hamano <gitster@pobox.com>

Makefile: sort LIB_H listJeff King Wed, 20 Jun 2012 18:30:08 +0000 (14:30 -0400)

Makefile: sort LIB_H list

This was mostly sorted already, but put things like
"cache-tree.h" after "cache.h", even though "-" comes before
"." (at least in the C locale). This will make it easier to
keep the list sorted later by piping it through "sort".

Signed-off-by: Jeff King <peff@peff.net>
Signed-off-by: Junio C Hamano <gitster@pobox.com>

completion: respect $GIT_DIRSZEDER Gábor Wed, 9 May 2012 00:44:35 +0000 (02:44 +0200)

completion: respect $GIT_DIR

The __gitdir() helper function finds out the path of the git
repository by running 'git rev-parse --git-dir'. However, it has a
shortcut first to avoid the overhead of running a git command in a
subshell when the current directory is at the top of the work tree,
i.e. when it contains a '.git' subdirectory.

If the 'GIT_DIR' environment variable is set then it specifies the
path to the git repository, and the autodetection of the '.git'
directory is not necessary. However, $GIT_DIR is only taken into
acocunt by 'git rev-parse --git-dir', and the check for the '.git'
subdirectory is performed first, so it wins over the path given in
$GIT_DIR.

There are several completion (helper) functions that depend on
__gitdir(), and when the above case triggers the completion script
will do weird things, like offering refs, aliases, or stashes from a
different repository, or displaying wrong or broken prompt, etc.

So check first whether $GIT_DIR is set, and only proceed with checking
the '.git' directory in the current directory if it isn't. 'git
rev-parse' would also check whether the path in $GIT_DIR is a proper
'.git' directory, i.e. 'HEAD', 'refs/', and 'objects/' are present and
accessible, but we don't have to be that thorough for the bash prompt.
And we've lived with an equally permissive check for '.git' in the
current working directory for years anyway.

Signed-off-by: SZEDER Gábor <szeder@ira.uka.de>
Signed-off-by: Junio C Hamano <gitster@pobox.com>

show: fix "range implies walking"Junio C Hamano Tue, 19 Jun 2012 21:15:57 +0000 (14:15 -0700)

show: fix "range implies walking"

Signed-off-by: Junio C Hamano <gitster@pobox.com>

Demonstrate git-show is broken with rangesThomas Rast Tue, 19 Jun 2012 20:04:57 +0000 (22:04 +0200)

Demonstrate git-show is broken with ranges

The logic of git-show has remained largely unchanged since around
5d7eeee (git-show: grok blobs, trees and tags, too, 2006-12-14): start
a revision walker with no_walk=1, look at its pending objects and
handle them one-by-one. For commits, this means stuffing them into a
new queue all alone, and running the walker.

Then Linus's f222abd (Make 'git show' more useful, 2009-07-13) came
along and set no_walk=0 whenever the user specifies a range. Which
appears to work fine, until you actually prod it hard enough, as the
preceding commit shows: UNINTERESTING commits will be marked as such,
but not walked further to propagate the marks.

Demonstrate this with the main tests of this patch: 'showing a range
walks (Y shape)'. The Y shape of history ensures that propagating the
UNINTERESTING marks is necessary to correctly exclude the main1
commit. The only example I could find actually requires that the
negative revisions are listed later, and in this scenario a dotted
range actually works. However, it is easy to find examples in git.git
where a dotted range is wrong, e.g.

$ git show v1.7.0..v1.7.1 | grep ^commit | wc -l
1297
$ git rev-list v1.7.0..v1.7.1 | wc -l
702

While there, also test a few other things that are not covered so far:
the -N way of triggering a range (added in 5853cae, DWIM 'git show -5'
to 'git show --do-walk -5', 2010-06-01), and the interactions of tags,
commits and ranges.

Pointed out by Dr_Memory on #git.

Signed-off-by: Thomas Rast <trast@student.ethz.ch>
Signed-off-by: Junio C Hamano <gitster@pobox.com>

remove the impression of unexpectedness when access... Heiko Voigt Tue, 19 Jun 2012 18:24:50 +0000 (20:24 +0200)

remove the impression of unexpectedness when access is denied

If a server accessed through ssh is denying access git will currently
issue the message

"fatal: The remote end hung up unexpectedly"

as the last line. This sounds as if something really ugly just happened.
Since this is a quite typical situation in which users regularly get
we do not say that if it happens at the beginning when reading the
remote heads.

If its in the very first beginning of reading the remote heads it is
very likely an authentication error or a missing repository.

If it happens later during reading the remote heads we still indicate
that it happened during this initial contact phase.

Signed-off-by: Heiko Voigt <hvoigt@hvoigt.net>
Signed-off-by: Junio C Hamano <gitster@pobox.com>

git-commit-tree(1): update synopsisJunio C Hamano Tue, 19 Jun 2012 18:36:57 +0000 (11:36 -0700)

git-commit-tree(1): update synopsis

Even with many new kinds of options, the command still takes the
single <tree> as the first argument.

Probably we would want to update the command to allow it to take
<tree>-ish at the end for consistency.

Signed-off-by: Junio C Hamano <gitster@pobox.com>