gitweb.git
Merge branch 'fk/relink-upon-ldflags-update' into maintJunio C Hamano Tue, 16 Aug 2011 18:23:26 +0000 (11:23 -0700)

Merge branch 'fk/relink-upon-ldflags-update' into maint

* fk/relink-upon-ldflags-update:
Makefile: Track changes to LDFLAGS and relink when necessary

Merge branch 'bc/submodule-foreach-stdin-fix-1.7.4... Junio C Hamano Tue, 16 Aug 2011 18:23:26 +0000 (11:23 -0700)

Merge branch 'bc/submodule-foreach-stdin-fix-1.7.4' into maint

* bc/submodule-foreach-stdin-fix-1.7.4:
git-submodule.sh: preserve stdin for the command spawned by foreach
t/t7407: demonstrate that the command called by 'submodule foreach' loses stdin

Merge branch 'aw/rebase-i-p' into maintJunio C Hamano Tue, 16 Aug 2011 18:23:25 +0000 (11:23 -0700)

Merge branch 'aw/rebase-i-p' into maint

* aw/rebase-i-p:
rebase -i -p: include non-first-parent commits in todo list

Merge branch 'jc/diff-index-quick-exit-early' into... Junio C Hamano Tue, 16 Aug 2011 18:23:25 +0000 (11:23 -0700)

Merge branch 'jc/diff-index-quick-exit-early' into maint

* jc/diff-index-quick-exit-early:
diff-index --quiet: learn the "stop feeding the backend early" logic

Conflicts:
unpack-trees.h

Merge branch 'jk/combine-diff-binary-etc' into maintJunio C Hamano Tue, 16 Aug 2011 18:23:24 +0000 (11:23 -0700)

Merge branch 'jk/combine-diff-binary-etc' into maint

* jk/combine-diff-binary-etc:
combine-diff: respect textconv attributes
refactor get_textconv to not require diff_filespec
combine-diff: handle binary files as binary
combine-diff: calculate mode_differs earlier
combine-diff: split header printing into its own function

am: refresh the index at start and --resolvedJeff King Tue, 16 Aug 2011 00:13:07 +0000 (17:13 -0700)

am: refresh the index at start and --resolved

If a file is unchanged but stat-dirty, we may erroneously
fail to apply patches, thinking that they conflict with a
dirty working tree.

This patch adds a call to "update-index --refresh". It comes
as late as possible, so that we don't bother with it for
thinks like "git rebase --abort", or when mbox-splitting
fails. However, it does come before we actually start
applying patches, meaning we will only call it once when we
start applying patches (or any time we return to "am" after
having resolved conflicts), and not once per patch.

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

revert: plug memory leak in "cherry-pick root commit... Jonathan Nieder Sun, 14 Aug 2011 15:22:04 +0000 (10:22 -0500)

revert: plug memory leak in "cherry-pick root commit" codepath

The empty tree passed as common ancestor to merge_trees() when
cherry-picking a parentless commit is allocated on the heap and never
freed. Leaking such a small one-time allocation is not a very big
problem, but now that "git cherry-pick" can cherry-pick multiple
commits it can start to add up.

Avoid the leak by storing the fake tree exactly once in the BSS
section (i.e., use a static). While at it, let's add a test to make
sure cherry-picking multiple parentless commits continues to work.

Signed-off-by: Jonathan Nieder <jrnieder@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>

Unroll the loop over passesMichael Haggerty Fri, 12 Aug 2011 21:43:10 +0000 (23:43 +0200)

Unroll the loop over passes

The passes no longer share much code, and the unrolled code is easier
to understand.

Use a new index variable instead of num_attr for the second loop, as
we are no longer counting attributes but rather indexing through them.

Signed-off-by: Michael Haggerty <mhagger@alum.mit.edu>
Signed-off-by: Junio C Hamano <gitster@pobox.com>

Change while loop into for loopMichael Haggerty Fri, 12 Aug 2011 21:43:09 +0000 (23:43 +0200)

Change while loop into for loop

Signed-off-by: Michael Haggerty <mhagger@alum.mit.edu>
Signed-off-by: Junio C Hamano <gitster@pobox.com>

Determine the start of the states outside of the pass... Michael Haggerty Fri, 12 Aug 2011 21:43:08 +0000 (23:43 +0200)

Determine the start of the states outside of the pass loop

Signed-off-by: Michael Haggerty <mhagger@alum.mit.edu>
Signed-off-by: Junio C Hamano <gitster@pobox.com>

Change parse_attr() to take a pointer to struct attr_stateMichael Haggerty Fri, 12 Aug 2011 21:43:07 +0000 (23:43 +0200)

Change parse_attr() to take a pointer to struct attr_state

parse_attr() only needs access to the attr_state to which it should
store its results, not to the whole match_attr structure. This change
also removes the need for it to know num_attr. Change its signature
accordingly and add a comment.

Signed-off-by: Michael Haggerty <mhagger@alum.mit.edu>
Signed-off-by: Junio C Hamano <gitster@pobox.com>

Increment num_attr in parse_attr_line(), not parse_attr()Michael Haggerty Fri, 12 Aug 2011 21:43:06 +0000 (23:43 +0200)

Increment num_attr in parse_attr_line(), not parse_attr()

num_attr is incremented iff parse_attr() returns non-NULL. So do the
counting in parse_attr_line() instead of within parse_attr(). This
allows an integer rather than a pointer to an integer to be passed to
parse_attr().

Signed-off-by: Michael Haggerty <mhagger@alum.mit.edu>
Signed-off-by: Junio C Hamano <gitster@pobox.com>

Document struct match_attrMichael Haggerty Fri, 12 Aug 2011 21:43:05 +0000 (23:43 +0200)

Document struct match_attr

Signed-off-by: Michael Haggerty <mhagger@alum.mit.edu>
Signed-off-by: Junio C Hamano <gitster@pobox.com>

Add a file commentMichael Haggerty Fri, 12 Aug 2011 21:43:04 +0000 (23:43 +0200)

Add a file comment

Consolidate here a few general comments plus links to other
documentation. Delete a comment with an out-of-date description of
the .gitattributes file format.

Signed-off-by: Michael Haggerty <mhagger@alum.mit.edu>
Signed-off-by: Junio C Hamano <gitster@pobox.com>

fast-import: prevent producing bad deltaDmitry Ivankov Sun, 14 Aug 2011 18:32:24 +0000 (00:32 +0600)

fast-import: prevent producing bad delta

To produce deltas for tree objects fast-import tracks two versions
of tree's entries - base and current one. Base version stands both
for a delta base of this tree, and for a entry inside a delta base
of a parent tree. So care should be taken to keep it in sync.

tree_content_set cuts away a whole subtree and replaces it with a
new one (or NULL for lazy load of a tree with known sha1). It
keeps a base sha1 for this subtree (needed for parent tree). And
here is the problem, 'subtree' tree root doesn't have the implied
base version entries.

Adjusting the subtree to include them would mean a deep rewrite of
subtree. Invalidating the subtree base version would mean recursive
invalidation of parents' base versions. So just mark this tree as
do-not-delta me. Abuse setuid bit for this purpose.

tree_content_replace is the same as tree_content_set except that is
is used to replace the root, so just clearing base sha1 here (instead
of setting the bit) is fine.

[di: log message]

Signed-off-by: Jonathan Nieder <jrnieder@gmail.com>
Signed-off-by: Dmitry Ivankov <divanorama@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>

fast-import: add a test for tree delta base corruptionDmitry Ivankov Sun, 14 Aug 2011 18:32:23 +0000 (00:32 +0600)

fast-import: add a test for tree delta base corruption

fast-import is able to write imported tree objects in delta format.
It holds a tree structure in memory where each tree entry may have
a delta base sha1 assigned. When delta base data is needed it is
reconstructed from this in-memory structure. Though sometimes the
delta base data doesn't match the delta base sha1 so wrong or even
corrupt pack is produced.

Add a small test that produces a corrupt pack. It uses just tree
copy and file modification commands aside from the very basic commit
and blob commands.

Signed-off-by: Dmitry Ivankov <divanorama@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>

ls-files: fix pathspec display on errorClemens Buchacher Mon, 1 Aug 2011 21:19:58 +0000 (23:19 +0200)

ls-files: fix pathspec display on error

The following sequence of commands reveals an issue with error
reporting of relative paths:

$ mkdir sub
$ cd sub
$ git ls-files --error-unmatch ../bbbbb
error: pathspec 'b' did not match any file(s) known to git.
$ git commit --error-unmatch ../bbbbb
error: pathspec 'b' did not match any file(s) known to git.

This bug is visible only if the normalized path (i.e., the relative
path from the repository root) is longer than the prefix.
Otherwise, the code skips over the normalized path and reads from
an unused memory location which still contains a leftover of the
original command line argument.

So instead, use the existing facilities to deal with relative paths
correctly.

Also fix inconsistency between "checkout" and "commit", e.g.

$ cd Documentation
$ git checkout nosuch.txt
error: pathspec 'Documentation/nosuch.txt' did not match...
$ git commit nosuch.txt
error: pathspec 'nosuch.txt' did not match...

by propagating the prefix down the codepath that reports the error.

Signed-off-by: Clemens Buchacher <drizzd@aon.at>
Signed-off-by: Junio C Hamano <gitster@pobox.com>

describe: Refresh the index when run with --dirtyAllan Caffee Mon, 1 Aug 2011 01:52:41 +0000 (21:52 -0400)

describe: Refresh the index when run with --dirty

When running git describe --dirty the index should be refreshed. Previously
the cached index would cause describe to think that the index was dirty when,
in reality, it was just stale.

The issue was exposed by python setuptools which hardlinks files into another
directory when building a distribution.

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

test: consolidate definition of $LFJunio C Hamano Mon, 8 Aug 2011 18:51:00 +0000 (11:51 -0700)

test: consolidate definition of $LF

As we seem to need this variable that holds a single LF character
in many places, define it in test-lib.sh and let the test scripts
use it.

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

Tolerate zlib deflation with window size < 32KbRoberto Tyley Sun, 7 Aug 2011 18:46:13 +0000 (19:46 +0100)

Tolerate zlib deflation with window size < 32Kb

Git currently reports loose objects as 'corrupt' if they've been
deflated using a window size less than 32Kb, because the
experimental_loose_object() function doesn't recognise the header
byte as a zlib header. This patch makes the function tolerant of
all valid window sizes (15-bit to 8-bit) - but doesn't sacrifice
it's accuracy in distingushing the standard loose-object format
from the experimental (now abandoned) format.

On memory constrained systems zlib may use a much smaller window
size - working on Agit, I found that Android uses a 4KB window;
giving a header byte of 0x48, not 0x78. Consequently all loose
objects generated appear 'corrupt', which is why Agit is a read-only
Git client at this time - I don't want my client to generate Git
repos that other clients treat as broken :(

This patch makes Git tolerant of different deflate settings - it
might appear that it changes experimental_loose_object() to the point
where it could incorrectly identify the experimental format as the
standard one, but the two criteria (bitmask & checksum) can only
give a false result for an experimental object where both of the
following are true:

1) object size is exactly 8 bytes when uncompressed (bitmask)
2) [single-byte in-pack git type&size header] * 256
+ [1st byte of the following zlib header] % 31 = 0 (checksum)

As it happens, for all possible combinations of valid object type
(1-4) and window bits (0-7), the only time when the checksum will be
divisible by 31 is for 0x1838 - ie object type *1*, a Commit - which,
due the fields all Commit objects must contain, could never be as
small as 8 bytes in size.

Given this, the combination of the two criteria (bitmask & checksum)
always correctly determines the buffer format, and is more tolerant
than the previous version.

The alternative to this patch is simply removing support for the
experimental format, which I am also totally cool with.

References:

Android uses a 4KB window for deflation:
http://android.git.kernel.org/?p=platform/libcore.git;a=blob;f=luni/src/main/native/java_util_zip_Deflater.cpp;h=c0b2feff196e63a7b85d97cf9ae5bb2583409c28;hb=refs/heads/gingerbread#l53

Code snippet searching for false positives with the zlib checksum:
https://gist.github.com/1118177

Signed-off-by: Roberto Tyley <roberto.tyley@guardian.co.uk>
Signed-off-by: Junio C Hamano <gitster@pobox.com>

am: ignore leading whitespace before patchDavid Barr Mon, 8 Aug 2011 02:49:04 +0000 (04:49 +0200)

am: ignore leading whitespace before patch

Some web-based email clients prepend whitespace to raw message
transcripts to workaround content-sniffing in some browsers. Adjust
the patch format detection logic to ignore leading whitespace.

So now you can apply patches from GMail with "git am" in three steps:

1. choose "show original"
2. tell the browser to "save as" (for example by pressing Ctrl+S)
3. run "git am" on the saved file

This fixes a regression introduced by v1.6.4-rc0~15^2~2 (git-am
foreign patch support: autodetect some patch formats, 2009-05-27).
GMail support was first introduced to "git am" by v1.5.4-rc0~274^2
(Make mailsplit and mailinfo strip whitespace from the start of the
input, 2007-11-01).

Signed-off-by: David Barr <davidbarr@google.com>
Signed-off-by: Jonathan Nieder <jrnieder@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>

fsck: improve committer/author checkDmitry Ivankov Thu, 11 Aug 2011 10:21:10 +0000 (16:21 +0600)

fsck: improve committer/author check

fsck allows a name with > character in it like "name> <email>". Also for
"name email>" fsck says "missing space before email".

More precisely, it seeks for a first '<', checks that ' ' preceeds it.
Then seeks to '<' or '>' and checks that it is the '>'. Missing space is
reported if either '<' is not found or it's not preceeded with ' '.

Change it to following. Seek to '<' or '>', check that it is '<' and is
preceeded with ' '. Seek to '<' or '>' and check that it is '>'. So now
"name> <email>" is rejected as "bad name". More strict name check is the
only change in what is accepted.

Report 'missing space' only if '<' is found and is not preceeded with a
space.

Signed-off-by: Dmitry Ivankov <divanorama@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>

fsck: add a few committer name testsDmitry Ivankov Thu, 11 Aug 2011 10:21:09 +0000 (16:21 +0600)

fsck: add a few committer name tests

fsck reports "missing space before <email>" for committer string equal
to "name email>" or to "". It'd be nicer to say "missing email" for
the second string and "name is bad" (has > in it) for the first one.
Add a failing test for these messages.

For "name> <email>" no error is reported. Looks like a bug, so add
such a failing test."

Signed-off-by: Dmitry Ivankov <divanorama@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>

fast-import: check committer name more strictlyDmitry Ivankov Thu, 11 Aug 2011 10:21:08 +0000 (16:21 +0600)

fast-import: check committer name more strictly

The documentation declares following identity format:
(<name> SP)? LT <email> GT
where name is any string without LF and LT characters.
But fast-import just accepts any string up to first GT
instead of checking the whole format, and moreover just
writes it as is to the commit object.

git-fsck checks for [^<\n]* <[^<>\n]*> format. Note that the
space is mandatory. And the space quirk is already handled via
extending the string to the left when needed.

Modify fast-import input identity format to a slightly stricter
one - deny LF, LT and GT in both <name> and <email>. And check
for it.

This is stricter then git-fsck as fsck accepts "Name> <email>"
currently, but soon fsck check will be adjusted likewise.

Signed-off-by: Dmitry Ivankov <divanorama@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>

fast-import: don't fail on omitted committer nameDmitry Ivankov Thu, 11 Aug 2011 10:21:07 +0000 (16:21 +0600)

fast-import: don't fail on omitted committer name

fast-import format declares 'committer_name SP' to be optional in
'committer_name SP LT email GT'. But for a (commit) object SP is
obligatory while zero length committer_name is ok. git-fsck checks
that SP is present, so fast-import must prepend it if the name SP
part is omitted. It doesn't do so and thus for "LT email GT" ident
it writes a bad object.

Name cannot contain LT or GT, ident always comes after SP in fast-import.
So if ident starts with LT reuse the SP as if a valid 'SP LT email GT'
ident was passed.

This fixes a ident parsing bug for a well-formed fast-import input.
Though the parsing is still loose and can accept a ill-formed input.

Signed-off-by: Dmitry Ivankov <divanorama@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>

fast-import: add input format testsDmitry Ivankov Thu, 11 Aug 2011 10:21:06 +0000 (16:21 +0600)

fast-import: add input format tests

Documentation/git-fast-import.txt says that git-fast-import is strict
about it's input format. But committer/author field parsing is a bit
loose. Invalid values can be unnoticed and written out to the commit,
either with format-conforming input or with non-format-conforming one.

Add one passing and one failing test for empty/absent committer name
with well-formed input. And a failed test with unnoticed ill-formed
input.

Reported-by: SASAKI Suguru <sss.sonik@gmail.com>
Signed-off-by: Dmitry Ivankov <divanorama@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>

Reduce parse-options.o dependenciesDmitry Ivankov Thu, 11 Aug 2011 09:15:38 +0000 (15:15 +0600)

Reduce parse-options.o dependencies

Currently parse-options.o pulls quite a big bunch of dependencies.
his complicates it's usage in contrib/ because it pulls external
dependencies and it also increases executables size.

Split off less generic and more internal to git part of
parse-options.c to parse-options-cb.c.

Move prefix_filename function from setup.c to abspath.c. abspath.o
and wrapper.o pull each other, so it's unlikely to increase the
dependencies. It was a dependency of parse-options.o that pulled
many others.

Now parse-options.o pulls just abspath.o, ctype.o, strbuf.o, usage.o,
wrapper.o, libc directly and strlcpy.o indirectly.

Signed-off-by: Dmitry Ivankov <divanorama@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>

parse-options: export opterr, optbugDmitry Ivankov Thu, 11 Aug 2011 09:15:37 +0000 (15:15 +0600)

parse-options: export opterr, optbug

opterror and optbug functions are used by some of parsing routines
in parse-options.c to report errors and bugs respectively.

Export these functions to allow more custom parsing routines to use
them in a uniform way.

Signed-off-by: Dmitry Ivankov <divanorama@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>

Update draft release notes to 1.7.7Junio C Hamano Thu, 11 Aug 2011 19:12:22 +0000 (12:12 -0700)

Update draft release notes to 1.7.7

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

t3900: do not reference numbered arguments from the... Johannes Sixt Thu, 11 Aug 2011 07:05:48 +0000 (09:05 +0200)

t3900: do not reference numbered arguments from the test script

The call to test_expect_success is nested inside a function, whose
arguments the test code wants to access. But it is not specified that any
unexpanded $1, $2, $3, etc in the test code will access the surrounding
function's arguments. Rather, they will access the arguments of the
function that happens to eval the test code.

In this case, the reference is intended to supply '-m message' to a call of
'git commit --squash'. Remove it because -m is optional and the test case
does not check for it. There are tests in t7500 that check combinations of
--squash and -m.

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

Merge branch 'cb/partial-commit-relative-pathspec'Junio C Hamano Thu, 11 Aug 2011 18:04:28 +0000 (11:04 -0700)

Merge branch 'cb/partial-commit-relative-pathspec'

* cb/partial-commit-relative-pathspec:
commit: allow partial commits with relative paths

Merge branch 'jk/fast-export-quote-path'Junio C Hamano Thu, 11 Aug 2011 18:03:16 +0000 (11:03 -0700)

Merge branch 'jk/fast-export-quote-path'

* jk/fast-export-quote-path:
fast-export: quote paths in output

Merge branch 'rc/maint-http-wrong-free'Junio C Hamano Thu, 11 Aug 2011 18:03:13 +0000 (11:03 -0700)

Merge branch 'rc/maint-http-wrong-free'

* rc/maint-http-wrong-free:
Makefile: some changes for http-related flag documentation
http.c: fix an invalid free()

Conflicts:
Makefile

Merge branch 'rs/grep-function-context'Junio C Hamano Thu, 11 Aug 2011 18:03:09 +0000 (11:03 -0700)

Merge branch 'rs/grep-function-context'

* rs/grep-function-context:
grep: long context options
grep: add option to show whole function as context

Merge branch 'ef/ipv4-connect-error-report'Junio C Hamano Thu, 11 Aug 2011 18:03:06 +0000 (11:03 -0700)

Merge branch 'ef/ipv4-connect-error-report'

* ef/ipv4-connect-error-report:
connect: only log if all attempts failed (ipv4)

am: Document new --exclude=<path> optionmaximilian attems Tue, 9 Aug 2011 15:21:08 +0000 (17:21 +0200)

am: Document new --exclude=<path> option

The --exclude=<path> option is passed down to apply; document it as such.

Signed-off-by: maximilian attems <max@stro.at>
Signed-off-by: Junio C Hamano <gitster@pobox.com>

bisect: add support for bisecting bare repositoriesJon Seymour Tue, 9 Aug 2011 02:11:54 +0000 (12:11 +1000)

bisect: add support for bisecting bare repositories

This enhances the support for bisecting history in bare repositories.

The "git bisect" command no longer needs to be run inside a repository
with a working tree; it defaults to --no-checkout when run in a bare
repository.

Two tests are included to demonstrate this behaviour.

Suggested-by: Junio C Hamano <gitster@pobox.com>
Reviewed-by: Jonathan Nieder <jrnieder@gmail.com>
Signed-off-by: Jon Seymour <jon.seymour@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>

helping smart-http/stateless-rpc fetch raceJunio C Hamano Fri, 5 Aug 2011 20:54:06 +0000 (13:54 -0700)

helping smart-http/stateless-rpc fetch race

A request to fetch from a client over smart HTTP protocol is served in
multiple steps. In the first round, the server side shows the set of refs
it has and their values, and the client picks from them and sends "I want
to fetch the history leading to these commits".

When the server tries to respond to this second request, its refs may have
progressed by a push from elsewhere. By design, we do not allow fetching
objects that are not at the tip of an advertised ref, and the server
rejects such a request. The client needs to try again, which is not ideal
especially for a busy server.

Teach upload-pack (which is the workhorse driven by git-daemon and smart
http server interface) that it is OK for a smart-http client to ask for
commits that are not at the tip of any advertised ref, as long as they are
reachable from advertised refs.

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

xdiff/xhistogram: drop need for additional variableTay Ray Chuan Mon, 1 Aug 2011 04:20:10 +0000 (12:20 +0800)

xdiff/xhistogram: drop need for additional variable

Having an additional variable (ptr) instead of changing line(1|2) and
count(1|2) was for debugging purposes.

Signed-off-by: Tay Ray Chuan <rctay89@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>

xdiff/xhistogram: rely on xdl_trim_ends()Tay Ray Chuan Mon, 1 Aug 2011 04:20:09 +0000 (12:20 +0800)

xdiff/xhistogram: rely on xdl_trim_ends()

Do away with reduce_common_start_end() and use xdf->dstart and xdf->dend
set by xdl_trim_ends() that similarly tells us where the first unmatched
line from the start and end occurs.

Signed-off-by: Tay Ray Chuan <rctay89@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>

xdiff/xhistogram: rework handling of recursed resultsTay Ray Chuan Mon, 1 Aug 2011 04:20:08 +0000 (12:20 +0800)

xdiff/xhistogram: rework handling of recursed results

Previously we were over-complicating matters by trying to combine the
recursed results. Now, terminate immediately if a recursive call failed
and return its result.

Signed-off-by: Tay Ray Chuan <rctay89@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>

Merge branch 'oa/pull-reflog'Junio C Hamano Mon, 8 Aug 2011 19:33:36 +0000 (12:33 -0700)

Merge branch 'oa/pull-reflog'

* oa/pull-reflog:
pull: remove extra space from reflog message

Conflicts:
git-pull.sh

Merge branch 'ms/reflog-show-is-default'Junio C Hamano Mon, 8 Aug 2011 19:33:35 +0000 (12:33 -0700)

Merge branch 'ms/reflog-show-is-default'

* ms/reflog-show-is-default:
reflog: actually default to subcommand 'show'

Merge branch 'jl/submodule-status-summary-doc'Junio C Hamano Mon, 8 Aug 2011 19:33:35 +0000 (12:33 -0700)

Merge branch 'jl/submodule-status-summary-doc'

* jl/submodule-status-summary-doc:
Documentation/submodule: add command references and update options

Merge branch 'jn/gitweb-config-list-case'Junio C Hamano Mon, 8 Aug 2011 19:33:35 +0000 (12:33 -0700)

Merge branch 'jn/gitweb-config-list-case'

* jn/gitweb-config-list-case:
gitweb: Git config keys are case insensitive, make config search too

Merge branch 'jl/submodule-update-quiet'Junio C Hamano Mon, 8 Aug 2011 19:33:34 +0000 (12:33 -0700)

Merge branch 'jl/submodule-update-quiet'

* jl/submodule-update-quiet:
submodule: update and add must honor --quiet flag

Merge branch 'js/ls-tree-error'Junio C Hamano Mon, 8 Aug 2011 19:33:34 +0000 (12:33 -0700)

Merge branch 'js/ls-tree-error'

* js/ls-tree-error:
Ensure git ls-tree exits with a non-zero exit code if read_tree_recursive fails.
Add a test to check that git ls-tree sets non-zero exit code on error.

Merge branch 'jn/gitweb-system-config'Junio C Hamano Mon, 8 Aug 2011 19:33:34 +0000 (12:33 -0700)

Merge branch 'jn/gitweb-system-config'

* jn/gitweb-system-config:
gitweb: Introduce common system-wide settings for convenience

Merge branch 'jk/reset-reflog-message-fix'Junio C Hamano Mon, 8 Aug 2011 19:33:33 +0000 (12:33 -0700)

Merge branch 'jk/reset-reflog-message-fix'

* jk/reset-reflog-message-fix:
reset: give better reflog messages

Merge branch 'jc/diff-index-refactor'Junio C Hamano Mon, 8 Aug 2011 19:33:33 +0000 (12:33 -0700)

Merge branch 'jc/diff-index-refactor'

* jc/diff-index-refactor:
diff-lib: refactor run_diff_index() and do_diff_cache()
diff-lib: simplify do_diff_cache()

receive-pack: do not overstep command line argument... Junio C Hamano Mon, 8 Aug 2011 19:31:01 +0000 (12:31 -0700)

receive-pack: do not overstep command line argument array

Previous commit added one element to the command line, without
making sure the result fits there.

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

Merge branch 'maint'Junio C Hamano Mon, 8 Aug 2011 19:24:16 +0000 (12:24 -0700)

Merge branch 'maint'

* maint:
filter-branch: Export variable `workdir' for --commit-filter
Documentation/Makefile: add *.pdf to `clean' target
Documentation: ignore *.pdf files

filter-branch: Export variable `workdir' for --commit... Michael Witten Sun, 7 Aug 2011 02:44:43 +0000 (02:44 +0000)

filter-branch: Export variable `workdir' for --commit-filter

According to `git help filter-branch':

--commit-filter <command>
...
You can use the _map_ convenience function in this filter,
and other convenience functions, too...
...

However, it turns out that `map' hasn't been usable because it depends
on the variable `workdir', which is not propogated to the environment
of the shell that runs the commit-filter <command> because the
shell is created via a simple-command rather than a compound-command
subshell:

@SHELL_PATH@ -c "$filter_commit" "git commit-tree" \
$(git write-tree) $parentstr < ../message > ../map/$commit ||
die "could not write rewritten commit"

One solution is simply to export `workdir'. However, it seems rather
heavy-handed to export `workdir' to the environments of all commands,
so instead this commit exports `workdir' for only the duration of the
shell command in question:

workdir=$workdir @SHELL_PATH@ -c "$filter_commit" "git commit-tree" \
$(git write-tree) $parentstr < ../message > ../map/$commit ||
die "could not write rewritten commit"

Signed-off-by: Michael Witten <mfwitten@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>

submodule: take advantage of gettextln and eval_gettextln.Jon Seymour Sun, 7 Aug 2011 11:58:17 +0000 (21:58 +1000)

submodule: take advantage of gettextln and eval_gettextln.

Signed-off-by: Jon Seymour <jon.seymour@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>

stash: take advantage of eval_gettextlnJon Seymour Sun, 7 Aug 2011 11:58:16 +0000 (21:58 +1000)

stash: take advantage of eval_gettextln

Signed-off-by: Jon Seymour <jon.seymour@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>

pull: take advantage of eval_gettextlnJon Seymour Sun, 7 Aug 2011 11:58:15 +0000 (21:58 +1000)

pull: take advantage of eval_gettextln

Signed-off-by: Jon Seymour <jon.seymour@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>

git-am: take advantage of gettextln and eval_gettextln.Jon Seymour Sun, 7 Aug 2011 11:58:14 +0000 (21:58 +1000)

git-am: take advantage of gettextln and eval_gettextln.

Signed-off-by: Jon Seymour <jon.seymour@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>

gettext: add gettextln, eval_gettextln to encode common... Jon Seymour Sun, 7 Aug 2011 11:58:13 +0000 (21:58 +1000)

gettext: add gettextln, eval_gettextln to encode common idiom

Currently, if you want to use gettext or eval_gettext to format a message
you may have to add a separate echo statement and a surrounding subshell
in order to interpolate the required trailing new line.

This patch introduces two new helper functions, gettextln and eval_gettextln
which append a trailing newline to the gettext output.

This allows constructions of the form:

if test -s "$GIT_DIR/BISECT_START"
then
(
gettext "You need to give me at least one good and one bad revisions.
(You can use \"git bisect bad\" and \"git bisect good\" for that.)" &&
echo
) >&2
else
...

to be expressed more concisely as:

if test -s "$GIT_DIR/BISECT_START"
then
gettextln "You need to give me at least one good and one bad revisions.
(You can use \"git bisect bad\" and \"git bisect good\" for that.)" >&2
else
...

Acked-by: Ævar Arnfjörð Bjarmason <avarab@gmail.com>
Signed-off-by: Jon Seymour <jon.seymour@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>

test: cope better with use of return for errorsJonathan Nieder Mon, 8 Aug 2011 01:17:09 +0000 (03:17 +0200)

test: cope better with use of return for errors

In olden times, tests would quietly exit the script when they failed
at an inconvenient moment, which was a little disconcerting.
Therefore v0.99.5~24^2~4 (Trapping exit in tests, using return for
errors, 2005-08-10) switched to an idiom of using "return" instead,
wrapping evaluation of test code in a function to make that safe:

test_run_ () {
eval >&3 2>&4 "$1"
eval_ret="$?"
return 0
}

Years later, the implementation of test_when_finished (v1.7.1.1~95,
2010-05-02) and v1.7.2-rc2~1^2~13 (test-lib: output a newline before
"ok" under a TAP harness, 2010-06-24) took advantage of test_run_ as a
place to put code shared by all test assertion functions, without
paying attention to the function's former purpose:

test_run_ () {
...
eval >&3 2>&4 "$1"
eval_ret=$?

if should run cleanup
then
eval >&3 2>&4 "$test_cleanup"
fi
if TAP format requires a newline here
then
echo
fi
return 0
}

That means cleanup commands and the newline to put TAP output at
column 0 are skipped when tests use "return" to fail early. Fix it by
introducing a test_eval_ function to catch the "return", with a
comment explaining the new function's purpose for the next person who
might touch this code.

Signed-off-by: Jonathan Nieder <jrnieder@gmail.com>
Acked-by: Jeff King <peff@peff.net>
Signed-off-by: Junio C Hamano <gitster@pobox.com>

test: simplify return value of test_run_Jonathan Nieder Mon, 8 Aug 2011 01:15:34 +0000 (03:15 +0200)

test: simplify return value of test_run_

As v0.99.5~24^2~4 (Trapping exit in tests, using return for errors,
2005-08-10) explains, callers to test_run_ (such as test_expect_code)
used to check the result from eval and the return value separately so
tests that fail early could be distinguished from tests that completed
normally with successful (nonzero) status. Eventually tests that
succeed with nonzero status were phased out (see v1.7.4-rc0~65^2~19,
2010-10-03 and especially v1.5.5-rc0~271, 2008-02-01) but the weird
two-return-value calling convention lives on.

Let's get rid of it. The new rule: test_run_ succeeds (returns 0)
if and only if the test succeeded.

Signed-off-by: Jonathan Nieder <jrnieder@gmail.com>
Acked-by: Jeff King <peff@peff.net>
Signed-off-by: Junio C Hamano <gitster@pobox.com>

Documentation/Makefile: add *.pdf to `clean' targetEmilio G. Cota Mon, 8 Aug 2011 08:33:05 +0000 (04:33 -0400)

Documentation/Makefile: add *.pdf to `clean' target

user-manual.pdf is not removed by `make clean'; fix it.

Signed-off-by: Emilio G. Cota <cota@braap.org>
Signed-off-by: Junio C Hamano <gitster@pobox.com>

Documentation: ignore *.pdf filesEmilio G. Cota Mon, 8 Aug 2011 08:33:04 +0000 (04:33 -0400)

Documentation: ignore *.pdf files

user-manual.pdf is generated by the build and therefore
should be ignored by git.

Signed-off-by: Emilio G. Cota <cota@braap.org>
Signed-off-by: Junio C Hamano <gitster@pobox.com>

fast-export: quote paths in outputJeff King Fri, 5 Aug 2011 22:36:22 +0000 (16:36 -0600)

fast-export: quote paths in output

Many pathnames in a fast-import stream need to be quoted. In
particular:

1. Pathnames at the end of an "M" or "D" line need quoting
if they contain a LF or start with double-quote.

2. Pathnames on a "C" or "R" line need quoting as above,
but also if they contain spaces.

For (1), we weren't quoting at all. For (2), we put
double-quotes around the paths to handle spaces, but ignored
the possibility that they would need further quoting.

This patch checks whether each pathname needs c-style
quoting, and uses it. This is slightly overkill for (1),
which doesn't actually need to quote many characters that
vanilla c-style quoting does. However, it shouldn't hurt, as
any implementation needs to be ready to handle quoted
strings anyway.

In addition to adding a test, we have to tweak a test which
blindly assumed that case (2) would always use
double-quotes, whether it needed to or not.

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

filter-branch.sh: de-dent usage stringJunio C Hamano Fri, 5 Aug 2011 22:06:21 +0000 (15:06 -0700)

filter-branch.sh: de-dent usage string

"Usage: git filter-branch " that is prefixed to the first line is 25
columns long, so the "[--index-filter ..." on the second line would not
align with "[--env-filter ..." on the first line to begin with. If the
second and subsequent lines do not aim to align with anything on the
first line, it is just fine to indent them with a single HT.

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

misc-sh: fix up whitespace in some other .sh files.Jon Seymour Fri, 5 Aug 2011 13:31:29 +0000 (23:31 +1000)

misc-sh: fix up whitespace in some other .sh files.

I found that the patched 4 files were different when this
filter is applied.

expand -i | unexpand --first-only

This patch contains the corrected files.

Signed-off-by: Jon Seymour <jon.seymour@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>

Merge branch 'tc/minix'Junio C Hamano Fri, 5 Aug 2011 21:55:00 +0000 (14:55 -0700)

Merge branch 'tc/minix'

* tc/minix:
Makefile: add Minix configuration options.

Merge branch 'jc/pack-order-tweak'Junio C Hamano Fri, 5 Aug 2011 21:54:57 +0000 (14:54 -0700)

Merge branch 'jc/pack-order-tweak'

* jc/pack-order-tweak:
pack-objects: optimize "recency order"
core: log offset pack data accesses happened

bisect: further style nitpicksJunio C Hamano Fri, 5 Aug 2011 17:09:23 +0000 (10:09 -0700)

bisect: further style nitpicks

Fix a few remaining lines that indented with spaces.

Also simplify the logic of checking out the original branch and reporting
error during "bisect reset".

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

bisect: replace "; then" with "\n<tab>*then"Jon Seymour Fri, 5 Aug 2011 11:31:31 +0000 (21:31 +1000)

bisect: replace "; then" with "\n<tab>*then"

Signed-off-by: Jon Seymour <jon.seymour@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>

bisect: cleanup whitespace errors in git-bisect.sh.Jon Seymour Fri, 5 Aug 2011 11:31:30 +0000 (21:31 +1000)

bisect: cleanup whitespace errors in git-bisect.sh.

All leading whitespace is now encoded with tabs.

After this patch, the following is true:

RAW=$(cat git-bisect.sh | md5sum) &&
ROUNDTRIP=$(cat git-bisect.sh | expand -i - | unexpand --first-only - | md5sum) &&
LEADING=$(sed -n "/^ */p" < git-bisect.sh | wc -l) &&
test $RAW = $ROUNDTRIP &&
test $LEADING = 0 &&
test -z "$(git diff -w HEAD~1 HEAD)"

Signed-off-by: Jon Seymour <jon.seymour@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>

test-path-utils: Add subcommand "prefix_path"Michael Haggerty Thu, 4 Aug 2011 04:47:48 +0000 (06:47 +0200)

test-path-utils: Add subcommand "prefix_path"

Signed-off-by: Michael Haggerty <mhagger@alum.mit.edu>
Signed-off-by: Junio C Hamano <gitster@pobox.com>

test-path-utils: Add subcommand "absolute_path"Michael Haggerty Thu, 4 Aug 2011 04:47:47 +0000 (06:47 +0200)

test-path-utils: Add subcommand "absolute_path"

Signed-off-by: Michael Haggerty <mhagger@alum.mit.edu>
Signed-off-by: Junio C Hamano <gitster@pobox.com>

git-check-attr: Normalize pathsMichael Haggerty Thu, 4 Aug 2011 04:47:46 +0000 (06:47 +0200)

git-check-attr: Normalize paths

Normalize the path arguments (relative to the working tree root, if
applicable) before looking up their attributes. This requires passing
the prefix down the call chain.

This fixes two test cases for different reasons:

* "unnormalized paths" is fixed because the .gitattribute-file-seeking
code is not confused into reading the top-level file twice.

* "relative paths" is fixed because the canonical pathnames are passed
to get_check_attr() or get_all_attrs(), allowing them to match the
pathname patterns as expected.

Signed-off-by: Michael Haggerty <mhagger@alum.mit.edu>
Signed-off-by: Junio C Hamano <gitster@pobox.com>

git-check-attr: Demonstrate problems with relative... Michael Haggerty Thu, 4 Aug 2011 04:47:45 +0000 (06:47 +0200)

git-check-attr: Demonstrate problems with relative paths

Signed-off-by: Michael Haggerty <mhagger@alum.mit.edu>
Signed-off-by: Junio C Hamano <gitster@pobox.com>

git-check-attr: Demonstrate problems with unnormalized... Michael Haggerty Thu, 4 Aug 2011 04:47:44 +0000 (06:47 +0200)

git-check-attr: Demonstrate problems with unnormalized paths

Signed-off-by: Michael Haggerty <mhagger@alum.mit.edu>
Signed-off-by: Junio C Hamano <gitster@pobox.com>

git-check-attr: test that no output is written to stderrMichael Haggerty Thu, 4 Aug 2011 04:47:43 +0000 (06:47 +0200)

git-check-attr: test that no output is written to stderr

Signed-off-by: Michael Haggerty <mhagger@alum.mit.edu>
Signed-off-by: Junio C Hamano <gitster@pobox.com>

Rename git_checkattr() to git_check_attr()Michael Haggerty Thu, 4 Aug 2011 04:36:33 +0000 (06:36 +0200)

Rename git_checkattr() to git_check_attr()

Suggested by: Junio Hamano <gitster@pobox.com>

Signed-off-by: Michael Haggerty <mhagger@alum.mit.edu>
Signed-off-by: Junio C Hamano <gitster@pobox.com>

git-check-attr: Fix command-line handling to match... Michael Haggerty Thu, 4 Aug 2011 04:36:32 +0000 (06:36 +0200)

git-check-attr: Fix command-line handling to match docs

According to the git-check-attr synopsis, if the '--stdin' option is
used then no pathnames are expected on the command line. Change the
behavior to match this description; namely, if '--stdin' is used but
not '--', then treat all command-line arguments as attribute names.

Signed-off-by: Michael Haggerty <mhagger@alum.mit.edu>
Signed-off-by: Junio C Hamano <gitster@pobox.com>

git-check-attr: Drive two tests using the same raw... Michael Haggerty Thu, 4 Aug 2011 04:36:31 +0000 (06:36 +0200)

git-check-attr: Drive two tests using the same raw data

Signed-off-by: Michael Haggerty <mhagger@alum.mit.edu>
Signed-off-by: Junio C Hamano <gitster@pobox.com>

git-check-attr: Add an --all option to show all attributesMichael Haggerty Thu, 4 Aug 2011 04:36:30 +0000 (06:36 +0200)

git-check-attr: Add an --all option to show all attributes

Add new usage patterns

git check-attr [-a | --all] [--] pathname...
git check-attr --stdin [-a | --all] < <list-of-paths>

which display all attributes associated with the specified file(s).

Signed-off-by: Michael Haggerty <mhagger@alum.mit.edu>
Signed-off-by: Junio C Hamano <gitster@pobox.com>

git-check-attr: Error out if no pathnames are specifiedMichael Haggerty Thu, 4 Aug 2011 04:36:29 +0000 (06:36 +0200)

git-check-attr: Error out if no pathnames are specified

If no pathnames are passed as command-line arguments and the --stdin
option is not specified, fail with the error message "No file
specified". Add tests of this behavior.

Signed-off-by: Michael Haggerty <mhagger@alum.mit.edu>
Signed-off-by: Junio C Hamano <gitster@pobox.com>

git-check-attr: Process command-line args more systemat... Michael Haggerty Thu, 4 Aug 2011 04:36:28 +0000 (06:36 +0200)

git-check-attr: Process command-line args more systematically

Signed-off-by: Michael Haggerty <mhagger@alum.mit.edu>
Signed-off-by: Junio C Hamano <gitster@pobox.com>

git-check-attr: Handle each error separatelyMichael Haggerty Thu, 4 Aug 2011 04:36:27 +0000 (06:36 +0200)

git-check-attr: Handle each error separately

This will make the code easier to refactor.

Signed-off-by: Michael Haggerty <mhagger@alum.mit.edu>
Signed-off-by: Junio C Hamano <gitster@pobox.com>

git-check-attr: Extract a function error_with_usage()Michael Haggerty Thu, 4 Aug 2011 04:36:26 +0000 (06:36 +0200)

git-check-attr: Extract a function error_with_usage()

Signed-off-by: Michael Haggerty <mhagger@alum.mit.edu>
Signed-off-by: Junio C Hamano <gitster@pobox.com>

git-check-attr: Introduce a new variableMichael Haggerty Thu, 4 Aug 2011 04:36:25 +0000 (06:36 +0200)

git-check-attr: Introduce a new variable

Avoid reusing variable "doubledash" to mean something other than the
expected "position of a double-dash, if any".

Signed-off-by: Michael Haggerty <mhagger@alum.mit.edu>
Signed-off-by: Junio C Hamano <gitster@pobox.com>

git-check-attr: Extract a function output_attr()Michael Haggerty Thu, 4 Aug 2011 04:36:24 +0000 (06:36 +0200)

git-check-attr: Extract a function output_attr()

Signed-off-by: Michael Haggerty <mhagger@alum.mit.edu>
Signed-off-by: Junio C Hamano <gitster@pobox.com>

Allow querying all attributes on a fileMichael Haggerty Thu, 4 Aug 2011 04:36:23 +0000 (06:36 +0200)

Allow querying all attributes on a file

Add a function, git_all_attrs(), that reports on all attributes that
are set on a path.

Signed-off-by: Michael Haggerty <mhagger@alum.mit.edu>
Signed-off-by: Junio C Hamano <gitster@pobox.com>

Remove redundant checkMichael Haggerty Thu, 4 Aug 2011 04:36:22 +0000 (06:36 +0200)

Remove redundant check

bootstrap_attr_stack() also checks whether attr_stack is already set.

Signed-off-by: Michael Haggerty <mhagger@alum.mit.edu>
Signed-off-by: Junio C Hamano <gitster@pobox.com>

Remove redundant call to bootstrap_attr_stack()Michael Haggerty Thu, 4 Aug 2011 04:36:21 +0000 (06:36 +0200)

Remove redundant call to bootstrap_attr_stack()

prepare_attr_stack() does the same thing.

Signed-off-by: Michael Haggerty <mhagger@alum.mit.edu>
Signed-off-by: Junio C Hamano <gitster@pobox.com>

Extract a function collect_all_attrs()Michael Haggerty Thu, 4 Aug 2011 04:36:20 +0000 (06:36 +0200)

Extract a function collect_all_attrs()

Signed-off-by: Michael Haggerty <mhagger@alum.mit.edu>
Signed-off-by: Junio C Hamano <gitster@pobox.com>

Teach prepare_attr_stack() to figure out dirlen itselfMichael Haggerty Thu, 4 Aug 2011 04:36:19 +0000 (06:36 +0200)

Teach prepare_attr_stack() to figure out dirlen itself

Signed-off-by: Michael Haggerty <mhagger@alum.mit.edu>
Signed-off-by: Junio C Hamano <gitster@pobox.com>

git-check-attr: Use git_attr_name()Michael Haggerty Thu, 4 Aug 2011 04:36:18 +0000 (06:36 +0200)

git-check-attr: Use git_attr_name()

Signed-off-by: Michael Haggerty <mhagger@alum.mit.edu>
Signed-off-by: Junio C Hamano <gitster@pobox.com>

Provide access to the name attribute of git_attrMichael Haggerty Thu, 4 Aug 2011 04:36:17 +0000 (06:36 +0200)

Provide access to the name attribute of git_attr

It will be present in any likely future reimplementation, and its
availability simplifies other code.

Signed-off-by: Michael Haggerty <mhagger@alum.mit.edu>
Signed-off-by: Junio C Hamano <gitster@pobox.com>

git-check-attr: Add tests of command-line parsingMichael Haggerty Thu, 4 Aug 2011 04:36:16 +0000 (06:36 +0200)

git-check-attr: Add tests of command-line parsing

Signed-off-by: Michael Haggerty <mhagger@alum.mit.edu>
Signed-off-by: Junio C Hamano <gitster@pobox.com>

git-check-attr: Add missing "&&"Michael Haggerty Thu, 4 Aug 2011 04:36:15 +0000 (06:36 +0200)

git-check-attr: Add missing "&&"

Signed-off-by: Michael Haggerty <mhagger@alum.mit.edu>
Signed-off-by: Junio C Hamano <gitster@pobox.com>

Disallow the empty string as an attribute nameMichael Haggerty Thu, 4 Aug 2011 04:36:14 +0000 (06:36 +0200)

Disallow the empty string as an attribute name

Previously, it was possible to have a line like "file.txt =foo" in a
.gitattribute file, after which an invocation like "git check-attr ''
-- file.txt" would succeed. This patch disallows both constructs.

Please note that any existing .gitattributes file that tries to set an
empty attribute will now trigger the error message "error: : not a
valid attribute name" whereas previously the nonsense was allowed
through.

Signed-off-by: Michael Haggerty <mhagger@alum.mit.edu>
Signed-off-by: Junio C Hamano <gitster@pobox.com>

Remove anachronism from commentMichael Haggerty Thu, 4 Aug 2011 04:36:13 +0000 (06:36 +0200)

Remove anachronism from comment

Setting attributes to arbitrary values ("attribute=value") is now
supported, so it is no longer necessary for this comment to justify
prohibiting '=' in an attribute name.

Signed-off-by: Michael Haggerty <mhagger@alum.mit.edu>
Signed-off-by: Junio C Hamano <gitster@pobox.com>

doc: Correct git_attr() calls in example codeMichael Haggerty Thu, 4 Aug 2011 04:36:12 +0000 (06:36 +0200)

doc: Correct git_attr() calls in example code

Commit 7fb0eaa2 (2010-01-17) changed git_attr() to take a string
instead of a string and a length. Update the documentation
accordingly.

Signed-off-by: Michael Haggerty <mhagger@alum.mit.edu>
Signed-off-by: Junio C Hamano <gitster@pobox.com>

doc: Add a link from gitattributes(5) to git-check... Michael Haggerty Thu, 4 Aug 2011 04:36:11 +0000 (06:36 +0200)

doc: Add a link from gitattributes(5) to git-check-attr(1)

Signed-off-by: Michael Haggerty <mhagger@alum.mit.edu>
Signed-off-by: Junio C Hamano <gitster@pobox.com>

docs: put listed example commands in backticksJeff King Thu, 4 Aug 2011 02:13:29 +0000 (20:13 -0600)

docs: put listed example commands in backticks

Many examples of git command invocation are given in asciidoc listing
blocks, which makes them monospaced and avoids further interpretation of
special characters. Some manpages make a list of examples, like:

git foo::
Run git foo.

git foo -q::
Use the "-q" option.

to quickly show many variants. However, they can sometimes be hard to
read, because they are shown in a proportional-width font (so, for
example, seeing the difference between "-- foo" and "--foo" can be
difficult).

This patch puts all such examples into backticks, which gives the
equivalent formatting to a listing block (i.e., monospaced and without
character interpretation).

As a bonus, this also fixes an example in the git-push manpage, in which
"git push origin :::" was accidentally considered a newly-indented list,
and not a list item with "git push origin :" in it.

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