gitweb.git
Merge branch 'bg/apply-fix-blank-at-eof' into maintJunio C Hamano Wed, 24 Mar 2010 23:23:50 +0000 (16:23 -0700)

Merge branch 'bg/apply-fix-blank-at-eof' into maint

* bg/apply-fix-blank-at-eof:
t3417: Add test cases for "rebase --whitespace=fix"
t4124: Add additional tests of --whitespace=fix
apply: Allow blank context lines to match beyond EOF
apply: Remove the quick rejection test
apply: Don't unnecessarily update line lengths in the preimage

Teach rebase the --no-ff option.Marc Branchaud Wed, 24 Mar 2010 20:34:04 +0000 (16:34 -0400)

Teach rebase the --no-ff option.

For git-rebase.sh, --no-ff is a synonym for --force-rebase.

For git-rebase--interactive.sh, --no-ff cherry-picks all the commits in
the rebased branch, instead of fast-forwarding over any unchanged commits.

--no-ff offers an alternative way to deal with reverted merges. Instead of
"reverting the revert" you can use "rebase --no-ff" to recreate the branch
with entirely new commits (they're new because at the very least the
committer time is different). This obviates the need to revert the
reversion, as you can re-merge the new topic branch directly. Added an
addendum to revert-a-faulty-merge.txt describing the situation and how to
use --no-ff to handle it.

Signed-off-by: Marc Branchaud <marcnarc@xiplink.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>

http-backend: Don't infinite loop during die()Shawn O. Pearce Mon, 22 Mar 2010 14:22:04 +0000 (07:22 -0700)

http-backend: Don't infinite loop during die()

If stdout has already been closed by the CGI and die() gets called,
the CGI will fail to write the "Status: 500 Internal Server Error" to
the pipe, which results in die() being called again (via safe_write).
This goes on in an infinite loop until the stack overflows and the
process is killed by SIGSEGV.

Instead set a flag on the first die() invocation and if we came back to
the handler, just die silently, as it only means we failed to report the
failure---we cannot report anything anyway in such a case. This way
failures to write the error messages to the stdout pipe do not result in
an infinite loop.

We also now report on the death to stderr before we report to stdout,
to increase the chances that the cause of the die() invocation will
appear in the server's error log.

Signed-off-by: Shawn O. Pearce <spearce@spearce.org>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
fixup! http-backend.c: Don't infinite loop

Now die_webcgi() actually can return during a recursive call into it,
causing

http-backend.c:554: error: 'noreturn' function does return

The only reason we would come back to the die handler is because we
failed during it, so we cannot report anything anyway.

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

Correct references to /usr/bin/python which does not... R. Tyler Ballance Sun, 21 Mar 2010 19:01:50 +0000 (12:01 -0700)

Correct references to /usr/bin/python which does not exist on FreeBSD

On FreeBSD, Python does not ship as part of the base system but is available
via the ports system, which install the binary in /usr/local/bin.

Signed-off-by: R. Tyler Ballance <tyler@monkeypox.org>
Signed-off-by: Junio C Hamano <gitster@pobox.com>

Documentation: explain the meaning of "-g" in git-descr... Markus Heidelberg Mon, 22 Mar 2010 20:45:33 +0000 (21:45 +0100)

Documentation: explain the meaning of "-g" in git-describe output

Signed-off-by: Markus Heidelberg <markus.heidelberg@web.de>
Signed-off-by: Junio C Hamano <gitster@pobox.com>

rev-list: use default abbrev length when abbrev-commit... Michael J Gruber Mon, 22 Mar 2010 13:36:30 +0000 (14:36 +0100)

rev-list: use default abbrev length when abbrev-commit is in effect

Currently, rev-list has a default of "0" for abbrev which means that
switching on abbreviations with --abbrev-commit has no visible effect,
even though the option is documented.

Set abbrev to DEFAULT_ABBREV so that --abbrev-commit has the same effect
as for log.

Reported-by: Eli Barzilay <eli@barzilay.org>
Signed-off-by: Michael J Gruber <git@drmicha.warpmail.net>
Signed-off-by: Junio C Hamano <gitster@pobox.com>

imap-send: Remove limitation on message bodyRamkumar Ramachandra Mon, 22 Mar 2010 18:07:52 +0000 (23:37 +0530)

imap-send: Remove limitation on message body

There is a documented limitation on the body of any email not being
able to contain lines starting with "From ". This patch removes that
limitation by improving the parser to search for "From", "Date", and
"Subject" fields in the email before considering it to be an email.

Signed-off-by: Ramkumar Ramachandra <artagnon@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>

Sync with Git 1.7.0.3Junio C Hamano Mon, 22 Mar 2010 00:01:55 +0000 (17:01 -0700)

Sync with Git 1.7.0.3

* maint:
Git 1.7.0.3
.mailmap: Map the the first submissions of MJG by e-mail
Documentation/git-clone: Transform description list into item list
Documentation/urls: Remove spurious example markers
Documentation/gitdiffcore: Remove misleading date in heading
Documentation/git-reflog: Fix formatting of command lists

Git 1.7.0.3 v1.7.0.3Junio C Hamano Mon, 22 Mar 2010 00:01:22 +0000 (17:01 -0700)

Git 1.7.0.3

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

Merge branch 'maint-1.6.6' into maintJunio C Hamano Mon, 22 Mar 2010 00:00:22 +0000 (17:00 -0700)

Merge branch 'maint-1.6.6' into maint

* maint-1.6.6:
Documentation/git-clone: Transform description list into item list
Documentation/urls: Remove spurious example markers
Documentation/gitdiffcore: Remove misleading date in heading
Documentation/git-reflog: Fix formatting of command lists

.mailmap: Map the the first submissions of MJG by e... Michael J Gruber Sun, 21 Mar 2010 13:43:47 +0000 (14:43 +0100)

.mailmap: Map the the first submissions of MJG by e-mail

so that git shortlog with '-e' coalesces all my commits.

Signed-off-by: Michael J Gruber <git@drmicha.warpmail.net>
Signed-off-by: Junio C Hamano <gitster@pobox.com>

ls: remove redundant logicErik Faye-Lund Sat, 20 Mar 2010 18:55:28 +0000 (19:55 +0100)

ls: remove redundant logic

find_unique_abbrev() already returns the full SHA-1 if abbrev = 0,
so we can remove the logic that avoids the call.

Signed-off-by: Erik Faye-Lund <kusmabite@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>

cherry: support --abbrev optionErik Faye-Lund Sat, 20 Mar 2010 18:55:27 +0000 (19:55 +0100)

cherry: support --abbrev option

Switch to parse-options API while we're at it.

Signed-off-by: Erik Faye-Lund <kusmabite@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>

Documentation/git-clone: Transform description list... Michael J Gruber Sun, 21 Mar 2010 17:30:19 +0000 (18:30 +0100)

Documentation/git-clone: Transform description list into item list

so that the list of examples is formatted in the same way as for
git-fetch, and, more importantly, the different identation for the
code blocks in the examples (compared to the immediately preceding code
blocks from url.txt) doesn't look like misformatted, but is clarified by
the items' bullets.

Signed-off-by: Michael J Gruber <git@drmicha.warpmail.net>
Signed-off-by: Junio C Hamano <gitster@pobox.com>

Documentation/urls: Remove spurious example markersMichael J Gruber Sun, 21 Mar 2010 17:30:18 +0000 (18:30 +0100)

Documentation/urls: Remove spurious example markers

In urls.txt (which is included from git-{clone,fetch,push}.txt)
several item lists are surrounded by example block markers. This is
problematic for two reasons:

- None of these lists are example lists, so they should not be marked as
such semantically.
- The html output looks weird (bulleted list with left sidebar).

Therefore, remove the example block markers. Output by the man backend
is unaffected.

Signed-off-by: Michael J Gruber <git@drmicha.warpmail.net>
Signed-off-by: Junio C Hamano <gitster@pobox.com>

Documentation/gitdiffcore: Remove misleading date in... Michael J Gruber Sun, 21 Mar 2010 17:30:17 +0000 (18:30 +0100)

Documentation/gitdiffcore: Remove misleading date in heading

Ever since the automatic conversion into man form, the heading
contained a misidentified subheading reading "June 2005".
Remove this since the documentation is more recent, and the correct
date is in the footer.

Signed-off-by: Michael J Gruber <git@drmicha.warpmail.net>
Signed-off-by: Junio C Hamano <gitster@pobox.com>

Documentation/git-reflog: Fix formatting of command... Michael J Gruber Sun, 21 Mar 2010 17:30:16 +0000 (18:30 +0100)

Documentation/git-reflog: Fix formatting of command lists

A misplaced list continuation mark appears literally in the
rendered doc. Fix this by removing it.

Signed-off-by: Michael J Gruber <git@drmicha.warpmail.net>
Signed-off-by: Junio C Hamano <gitster@pobox.com>

rev-list: fix --pretty=oneline with empty messageErik Faye-Lund Sun, 21 Mar 2010 14:40:16 +0000 (15:40 +0100)

rev-list: fix --pretty=oneline with empty message

55246aa (Dont use "<unknown>" for placeholders and suppress printing
of empty user formats) introduced a check to prevent empty
user-formats from being printed. This test didn't take empty commit
messages into account, and prevented the line-termination from being
output. This lead to multiple commits on a single line.

Correct it by guarding the check with a check for user-format. A
similar correction for the --graph code-path has been included.

Signed-off-by: Erik Faye-Lund <kusmabite@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>

merge-recursive: add a label for ancestorJonathan Nieder Sun, 21 Mar 2010 00:52:21 +0000 (19:52 -0500)

merge-recursive: add a label for ancestor

git merge-recursive (and hence git merge) will present conflict hunks
in output something like what ‘diff3 -m’ produces if the
merge.conflictstyle configuration option is set to diff3.
There is a small difference from diff3: diff3 -m includes a label
for the merge base on the ||||||| line.

Tools familiar with the format and humans unfamiliar with the format
both can benefit from such a label. So mark the start of the text
from the merge bases with the heading "||||||| merged common
ancestors".

It would be nicer to use a more informative label. Perhaps someone
will provide one some day.

git rerere does not have trouble parsing the new output, and its
preimage ids are unchanged since it has its own code for re-creating
conflict hunks. No other code in git parses conflict hunks.

Requested-by: Stefan Monnier <monnier@iro.umontreal.ca>
Signed-off-by: Jonathan Nieder <jrnieder@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>

cherry-pick, revert: add a label for ancestorJonathan Nieder Sun, 21 Mar 2010 00:46:07 +0000 (19:46 -0500)

cherry-pick, revert: add a label for ancestor

When writing conflict hunks in ‘diff3 -m’ format, also add a label to
the common ancestor. Especially in a cherry-pick, it is not immediately
obvious without such a label what the common ancestor represents.

git rerere does not have trouble parsing the new output and its preimage
ids are unchanged since it includes its own code for recreating conflict
hunks. No other code in git parses conflict hunks.

Requested-by: Stefan Monnier <monnier@iro.umontreal.ca>
Signed-off-by: Jonathan Nieder <jrnieder@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>

revert: clarify label on conflict hunksJonathan Nieder Sun, 21 Mar 2010 00:45:21 +0000 (19:45 -0500)

revert: clarify label on conflict hunks

When reverting a commit, the commit being merged is not the commit
to revert itself but its parent. Add “parent of” to the conflict
hunk label to make this more clear.

The conflict hunk labels are all pieces of a single string written in
the new get_message() function. Avoid some complication by using
mempcpy to advance a pointer as the result is written.

Also free the corresponding temporary buffer (it was leaked before).
This is not important because it is a small one-time allocation. It
would become a memory leak if unnoticed when libifying revert.

This patch uses calls to strlen() instead of integer constants in some
places. GCC will compute the length at compile time; I am not sure
about other compilers, but this is not performance-critical anyway.

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

compat: add mempcpy()Jonathan Nieder Sun, 21 Mar 2010 00:43:32 +0000 (19:43 -0500)

compat: add mempcpy()

The mempcpy() function was added in glibc 2.1. It is quite handy, so
add an implementation for cross-platform use.

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

checkout -m --conflict=diff3: add a label for ancestorJonathan Nieder Sun, 21 Mar 2010 00:42:51 +0000 (19:42 -0500)

checkout -m --conflict=diff3: add a label for ancestor

git checkout --merge --conflict=diff3 can be used to present conflict
hunks including text from the common ancestor. The added information
is helpful for resolving a merge by hand, and merge tools tend to
understand it because it is very similar to what ‘diff3 -m’ produces.

Unlike current git, diff3 -m includes a label for the merge base on
the ||||||| line, and unfortunately, some tools cannot parse the
conflict hunks without it. Humans can benefit from a cue when
learning to interpreting the format, too. Mark the start of the text
from the old branch with a label based on the branch’s name.

git rerere does not have trouble parsing this output and its preimage
ids are unchanged since it includes its own code for recreating
conflict hunks. No other code in git tries to parse conflict hunks.

Requested-by: Stefan Monnier <monnier@iro.umontreal.ca>
Signed-off-by: Jonathan Nieder <jrnieder@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>

merge_trees(): add ancestor label parameter for diff3... Jonathan Nieder Sun, 21 Mar 2010 00:41:38 +0000 (19:41 -0500)

merge_trees(): add ancestor label parameter for diff3-style output

Commands using the merge_trees() machinery will present conflict hunks
in output something like what ‘diff3 -m’ produces if the
merge.conflictstyle configuration option is set to diff3. The output
lacks the name of the merge base on the ||||||| line of the output,
and tools can misparse the conflict hunks without it. Add a new
o->ancestor parameter to merge_trees() for use as a label for the
ancestor in conflict hunks.

If o->ancestor is NULL, the output format is as before. All callers
pass NULL for now.

If o->ancestor is non-NULL and both branches renamed the base file
to the same name, that name is included in the conflict hunk labels.
Even if o->ancestor is NULL I think this would be a good change, but
this patch only does it in the non-NULL case to ensure the output
format does not change where it might matter.

Requested-by: Stefan Monnier <monnier@iro.umontreal.ca>
Signed-off-by: Jonathan Nieder <jrnieder@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>

merge_file(): add comment explaining behavior wrt confl... Jonathan Nieder Sun, 21 Mar 2010 00:40:53 +0000 (19:40 -0500)

merge_file(): add comment explaining behavior wrt conflict style

The merge_file() function is a helper for ‘git read-tree’, which does
not respect the merge.conflictstyle option, so there is no need to
worry about what ancestor_name it should pass to ll_merge(). Add a
comment to this effect.

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

checkout --conflict=diff3: add a label for ancestorJonathan Nieder Sun, 21 Mar 2010 00:40:19 +0000 (19:40 -0500)

checkout --conflict=diff3: add a label for ancestor

git checkout --conflict=diff3 can be used to present conflicts hunks
including text from the common ancestor:

<<<<<<< ours
ourside
|||||||
original
=======
theirside
>>>>>>> theirs

The added information is helpful for resolving a merge by hand, and
merge tools can usually understand it without trouble because it looks
like output from ‘diff3 -m’.

diff3 includes a label for the merge base on the ||||||| line, and it
seems some tools (for example, Emacs 22’s smerge-mode) cannot parse
conflict hunks without such a label. Humans could use help in
interpreting the output, too. So change the marker for the start of the
text from the common ancestor to include the label “base”.

git rerere’s conflict identifiers are not affected: to parse conflict
hunks, rerere looks for whitespace after the ||||||| marker rather
than a newline, and to compute preimage ids, rerere has its own code
for creating conflict hunks. No other code in git tries to parse
conflict hunks.

Requested-by: Stefan Monnier <monnier@iro.umontreal.ca>
Signed-off-by: Jonathan Nieder <jrnieder@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>

ll_merge(): add ancestor label parameter for diff3... Jonathan Nieder Sun, 21 Mar 2010 00:38:58 +0000 (19:38 -0500)

ll_merge(): add ancestor label parameter for diff3-style output

Commands using the ll_merge() function will present conflict hunks
imitating ‘diff3 -m’ output if the merge.conflictstyle configuration
option is set appropriately. Unlike ‘diff3 -m’, the output does not
include a label for the merge base on the ||||||| line of the output,
and some tools misparse the conflict hunks without that.

Add a new ancestor_label parameter to ll_merge() to give callers the
power to rectify this situation. If ancestor_label is NULL, the output
format is unchanged. All callers pass NULL for now.

Requested-by: Stefan Monnier <monnier@iro.umontreal.ca>
Signed-off-by: Jonathan Nieder <jrnieder@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>

merge-file --diff3: add a label for ancestorJonathan Nieder Sun, 21 Mar 2010 00:37:33 +0000 (19:37 -0500)

merge-file --diff3: add a label for ancestor

git merge-file --diff3 can be used to present conflicts hunks
including text from the common ancestor.

The added information is helpful for resolving a merge by hand, and
merge tools can usually grok it because it looks like output from
diff3 -m. However, ‘diff3’ includes a label for the merge base on the
||||||| line and some tools cannot parse conflict hunks without such a
label. Write the base-name as passed in a -L option (or the name of
the ancestor file by default) on that line.

git rerere will not have trouble parsing this output, since instead of
looking for a newline, it looks for whitespace after the |||||||
marker. Since rerere includes its own code for recreating conflict
hunks, conflict identifiers are unaffected. No other code in git tries
to parse conflict hunks.

Requested-by: Stefan Monnier <monnier@iro.umontreal.ca>
Signed-off-by: Jonathan Nieder <jrnieder@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>

xdl_merge(): move file1 and file2 labels to xmparam... Jonathan Nieder Sun, 21 Mar 2010 00:35:18 +0000 (19:35 -0500)

xdl_merge(): move file1 and file2 labels to xmparam structure

The labels for the three participants in a potential conflict are all
optional arguments for the xdiff merge routine; if they are NULL, then
xdl_merge() can cope by omitting the labels from its output. Move
them to the xmparam structure to allow new callers to save some
keystrokes where they are not needed.

This also has the virtue of making the xdiff merge interface more
similar to merge_trees, which might make it easier to learn.

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

xdl_merge(): add optional ancestor label to diff3-style... Jonathan Nieder Sun, 21 Mar 2010 00:31:44 +0000 (19:31 -0500)

xdl_merge(): add optional ancestor label to diff3-style output

The ‘git checkout --conflict=diff3’ command can be used to
present conflicts hunks including text from the common ancestor:

<<<<<<< ours
ourside
|||||||
original
=======
theirside
>>>>>>> theirs

The added information is helpful for resolving merges by hand, and
merge tools can usually grok it because it is very similar to the
output from diff3 -m.

A subtle change can help more tools to understand the output. ‘diff3’
includes the name of the merge base on the ||||||| line of the output,
and some tools misparse the conflict hunks without it. Add a new
xmp->ancestor parameter to xdl_merge() for use with conflict style
XDL_MERGE_DIFF3 as a label on the ||||||| line for any conflict hunks.

If xmp->ancestor is NULL, the output format is unchanged. Thus, this
change only provides unexposed plumbing for the new feature; it does
not affect the outward behavior of git.

Requested-by: Stefan Monnier <monnier@iro.umontreal.ca>
Signed-off-by: Jonathan Nieder <jrnieder@gmail.com>
Acked-by: Bert Wesarg <Bert.Wesarg@googlemail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>

tests: document cherry-pick behavior in face of conflictsJonathan Nieder Sun, 21 Mar 2010 00:28:14 +0000 (19:28 -0500)

tests: document cherry-pick behavior in face of conflicts

We are about to change the format of the conflict hunks that
cherry-pick and revert write. Add tests checking the current behavior
first.

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

tests: document format of conflicts from checkout -mJonathan Nieder Sun, 21 Mar 2010 00:27:17 +0000 (19:27 -0500)

tests: document format of conflicts from checkout -m

We are about to change the format of the conflict hunks that ‘checkout
--merge’ writes. Add tests checking the current behavior first.

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

.mailmap: Entries for Alex Bennée, Deskin Miller, Vital... Michael J Gruber Fri, 19 Mar 2010 11:02:04 +0000 (12:02 +0100)

.mailmap: Entries for Alex Bennée, Deskin Miller, Vitaly "_Vi" Shukela

With the current .mailmap, git shortlog shows the following for these:

11 Deskin Miller
3 Vitaly \"_Vi\" Shukela
1 Alex Bennee
1 Alex Bennée
1 Deskin Miler
1 Vitaly _Vi Shukela

Add (e-mail based qualified) entries to .mailmap to get:

12 Deskin Miller
4 Vitaly "_Vi" Shukela
2 Alex Bennée

The Shukela spelling is based on the version used consistently in the s-o-b
lines of all his patches.

Signed-off-by: Michael J Gruber <git@drmicha.warpmail.net>
Signed-off-by: Junio C Hamano <gitster@pobox.com>

revert: fix tiny memory leak in cherry-pick --ffJonathan Nieder Sun, 21 Mar 2010 02:01:20 +0000 (21:01 -0500)

revert: fix tiny memory leak in cherry-pick --ff

We forgot to free defmsg when returning early for a fast-forward.

Fixing this should reduce noise during test suite runs with valgrind.
More importantly, once cherry-pick learns to pick multiple commits,
the amount of memory leaked would start to add up.

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

Update draft release notes to 1.7.1Junio C Hamano Sat, 20 Mar 2010 18:42:34 +0000 (11:42 -0700)

Update draft release notes to 1.7.1

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

Merge branch 'jk/maint-add-ignored-dir'Junio C Hamano Sat, 20 Mar 2010 18:29:36 +0000 (11:29 -0700)

Merge branch 'jk/maint-add-ignored-dir'

* jk/maint-add-ignored-dir:
tests for "git add ignored-dir/file" without -f
dir: fix COLLECT_IGNORED on excluded prefixes
t0050: mark non-working test as such

Merge branch 'ml/color-grep'Junio C Hamano Sat, 20 Mar 2010 18:29:36 +0000 (11:29 -0700)

Merge branch 'ml/color-grep'

* ml/color-grep:
grep: Colorize selected, context, and function lines
grep: Colorize filename, line number, and separator
Add GIT_COLOR_BOLD_* and GIT_COLOR_BG_*

Merge branch 'jc/color-attrs'Junio C Hamano Sat, 20 Mar 2010 18:29:36 +0000 (11:29 -0700)

Merge branch 'jc/color-attrs'

* jc/color-attrs:
color: allow multiple attributes

Merge branch 'cc/reset-keep'Junio C Hamano Sat, 20 Mar 2010 18:29:35 +0000 (11:29 -0700)

Merge branch 'cc/reset-keep'

* cc/reset-keep:
Documentation: improve description of "git reset --keep"
reset: disallow using --keep when there are unmerged entries
reset: disallow "reset --keep" outside a work tree
Documentation: reset: describe new "--keep" option
reset: add test cases for "--keep" option
reset: add option "--keep" to "git reset"

Merge branch 'fl/askpass'Junio C Hamano Sat, 20 Mar 2010 18:29:35 +0000 (11:29 -0700)

Merge branch 'fl/askpass'

* fl/askpass:
git-core: Support retrieving passwords with GIT_ASKPASS
git-svn: Support retrieving passwords with GIT_ASKPASS

Merge branch 'bg/apply-fix-blank-at-eof'Junio C Hamano Sat, 20 Mar 2010 18:29:35 +0000 (11:29 -0700)

Merge branch 'bg/apply-fix-blank-at-eof'

* bg/apply-fix-blank-at-eof:
t3417: Add test cases for "rebase --whitespace=fix"
t4124: Add additional tests of --whitespace=fix
apply: Allow blank context lines to match beyond EOF
apply: Remove the quick rejection test
apply: Don't unnecessarily update line lengths in the preimage

Merge branch 'bw/union-merge-refactor'Junio C Hamano Sat, 20 Mar 2010 18:29:34 +0000 (11:29 -0700)

Merge branch 'bw/union-merge-refactor'

* bw/union-merge-refactor:
merge-file: add option to select union merge favor
merge-file: add option to specify the marker size
refactor merge flags into xmparam_t
make union merge an xdl merge favor

Merge branch 'maint'Junio C Hamano Sat, 20 Mar 2010 18:29:19 +0000 (11:29 -0700)

Merge branch 'maint'

* maint:
Update draft release notes to 1.7.0.3
fetch: Fix minor memory leak
fetch: Future-proof initialization of a refspec on stack
fetch: Check for a "^{}" suffix with suffixcmp()
daemon: parse_host_and_port SIGSEGV if port is specified
Makefile: Fix CDPATH problem
pull: replace unnecessary sed invocation

Update draft release notes to 1.7.0.3Junio C Hamano Sat, 20 Mar 2010 18:29:13 +0000 (11:29 -0700)

Update draft release notes to 1.7.0.3

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

rebase -i: use new --ff cherry-pick optionChristian Couder Sat, 6 Mar 2010 20:34:46 +0000 (21:34 +0100)

rebase -i: use new --ff cherry-pick option

This simplifies rebase -i a little bit.

Signed-off-by: Christian Couder <chriscool@tuxfamily.org>
Signed-off-by: Junio C Hamano <gitster@pobox.com>

fetch: Fix minor memory leakAndreas Gruenbacher Mon, 15 Mar 2010 22:18:48 +0000 (23:18 +0100)

fetch: Fix minor memory leak

A temporary struct ref is allocated in store_updated_refs() but not
freed.

Signed-off-by: Andreas Gruenbacher <agruen@suse.de>
Signed-off-by: Junio C Hamano <gitster@pobox.com>

fetch: Future-proof initialization of a refspec on... Andreas Gruenbacher Fri, 12 Mar 2010 22:27:33 +0000 (23:27 +0100)

fetch: Future-proof initialization of a refspec on stack

The open-coded version to initialize each and every member will break
when a new member is added to the structure.

Signed-off-by: Andreas Gruenbacher <agruen@suse.de>
Signed-off-by: Junio C Hamano <gitster@pobox.com>

fetch: Check for a "^{}" suffix with suffixcmp()Andreas Gruenbacher Sat, 13 Mar 2010 17:17:04 +0000 (18:17 +0100)

fetch: Check for a "^{}" suffix with suffixcmp()

Otherwise, we will check random bytes for ref names < 3 characters.

Signed-off-by: Andreas Gruenbacher <agruen@suse.de>
Signed-off-by: Junio C Hamano <gitster@pobox.com>

Fix a spelling mistake in a git-p4 console messageBenjamin C Meyer Fri, 19 Mar 2010 04:39:10 +0000 (00:39 -0400)

Fix a spelling mistake in a git-p4 console message

Signed-off-by: Benjamin C Meyer <bmeyer@rim.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>

Use test_expect_success for test setupsBrian Gernhardt Sat, 20 Mar 2010 08:29:11 +0000 (04:29 -0400)

Use test_expect_success for test setups

Several tests did not use test_expect_success for their setup
commands. Putting these start commands into the testing framework
means both that errors during setup will be caught quickly and that
non-error text will be suppressed without -v.

Signed-off-by: Brian Gernhardt <brian@gernhardtsoftware.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>

Modernize git calling conventions in hook templatesBen Walton Sat, 20 Mar 2010 14:48:09 +0000 (10:48 -0400)

Modernize git calling conventions in hook templates

The hook templates were still using/referencing 'git-foo' instead of
'git foo.' This patch updates the sample hooks to use the modern
conventions instead.

Signed-off-by: Ben Walton <bwalton@artsci.utoronto.ca>
Signed-off-by: Junio C Hamano <gitster@pobox.com>

Make templates honour SHELL_PATH and PERL_PATHBen Walton Sat, 20 Mar 2010 14:48:08 +0000 (10:48 -0400)

Make templates honour SHELL_PATH and PERL_PATH

The hook script templates were hard coded to use /bin/sh and perl.
This patch ensures that they use the same tools specified for the rest
of the suite.

The impetus for the change was noticing that, as shipped, some of the
hooks used shell constructs that wouldn't work under Solaris' /bin/sh
(eg: $(cmd...) substitutions).

Signed-off-by: Ben Walton <bwalton@artsci.utoronto.ca>
Signed-off-by: Junio C Hamano <gitster@pobox.com>

daemon: parse_host_and_port SIGSEGV if port is specifiedImre Deak Sat, 20 Mar 2010 02:23:58 +0000 (04:23 +0200)

daemon: parse_host_and_port SIGSEGV if port is specified

This typo will lead to git-daemon dying any time the connect
string includes a port after the host= attribute. This can lead
for example to one of the following error messages on the client
side when someone tries git clone git://...:<port>.

When the daemon is running on localhost:
fatal: The remote end hung up unexpectedly

or when the daemon is connected through an ssh tunnel:
fatal: protocol error: bad line length character: erro

In the latter case 'erro' comes from the daemon's reply:
error: git-daemon died of signal 11

Signed-off-by: Imre Deak <imre.deak@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>

Makefile: Fix occasional GIT-CFLAGS breakageJonathan Nieder Sat, 20 Mar 2010 03:20:12 +0000 (22:20 -0500)

Makefile: Fix occasional GIT-CFLAGS breakage

GNU make’s target-specific variables facility has one weird facet: any
variables set for a given target apply to all of its dependencies,
too. For example, when running “make exec_cmd.o”, since exec_cmd.o
depends on GIT-CFLAGS, the variable assignment in

exec_cmd.s exec_cmd.o: ALL_CFLAGS += \
'-DGIT_EXEC_PATH="$(gitexecdir_SQ)"' \
'-DBINDIR="$(bindir_relative_SQ)"' \
'-DPREFIX="$(prefix_SQ)"'

applies when refreshing GIT-CFLAGS, and the extra options get included
in the tracked compiler flags. If an object file like this is the
first target built, GIT-CFLAGS will appear to be out of date,
resulting in useless rebuilds and the dreaded “new build flags or
prefix” message.

This does not happen with every build because GIT-CFLAGS is only
refreshed once in a given “make” run, and usually the first target
does not set any variables. When this problem does rear its head, it
is very annoying.

So put target-specific flags in a separate EXTRA_CPPFLAGS variable
that is not included in $(TRACK_CFLAGS).

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

Makefile: Fix CDPATH problemJonathan Nieder Sat, 20 Mar 2010 00:06:15 +0000 (19:06 -0500)

Makefile: Fix CDPATH problem

If CDPATH is set, "cd" prints its destination to stdout, causing
the common (cd a && tar cf - .) | (cd b && tar xf -) idiom to fail.
For example:

make -C templates DESTDIR='' install
make[1]: Entering directory `/users/e477610/exptool/src/git-1.7.0.2/templates'
install -d -m 755 '/home/e477610/exptool/share/git-core/templates'
(cd blt && gtar cf - .) | \
(cd '/home/e477610/exptool/share/git-core/templates' && umask 022 && gtar xof -)
gtar: This does not look like a tar archive

Most git scripts already protect against use of CDPATH through
git-sh-setup, but the Makefile doesn’t.

Reported-by: Michael Cox <mhcox@bluezoosoftware.com>
Signed-off-by: Jonathan Nieder <jrnieder@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>

t/t5505-remote.sh: escape * to prevent interpretation... Brandon Casey Sat, 20 Mar 2010 00:10:20 +0000 (19:10 -0500)

t/t5505-remote.sh: escape * to prevent interpretation by shell as glob

This test is supposed to check that git-remote correctly refuses to delete
all URLS for the specified remote which match the '.*' regular expression.
Since the '*' was not protected, it was interpreted by the shell as a file
glob and expanded before being passed to git-remote. The call to
git-remote still exited non-zero in this case, and the overall test still
passed, but it exited non-zero because git-remote was passed the incorrect
number of arguments, not for the reason it was supposed to fail.

Correct the test by escaping the '*'.

Signed-off-by: Brandon Casey <casey@nrlssc.navy.mil>
Signed-off-by: Junio C Hamano <gitster@pobox.com>

t5505: add missing &&Brandon Casey Fri, 19 Mar 2010 23:36:35 +0000 (18:36 -0500)

t5505: add missing &&

Signed-off-by: Brandon Casey <casey@nrlssc.navy.mil>
Signed-off-by: Junio C Hamano <gitster@pobox.com>

t5505: remove unnecessary subshell invocationsBrandon Casey Fri, 19 Mar 2010 23:36:34 +0000 (18:36 -0500)

t5505: remove unnecessary subshell invocations

Signed-off-by: Brandon Casey <casey@nrlssc.navy.mil>
Signed-off-by: Junio C Hamano <gitster@pobox.com>

notes.c: remove inappropriate call to returnBrandon Casey Thu, 18 Mar 2010 15:03:43 +0000 (10:03 -0500)

notes.c: remove inappropriate call to return

Signed-off-by: Brandon Casey <casey@nrlssc.navy.mil>
Acked-by: Johan Herland <johan@herland.net>
Signed-off-by: Junio C Hamano <gitster@pobox.com>

pull: replace unnecessary sed invocationStephen Boyd Thu, 18 Mar 2010 05:10:45 +0000 (22:10 -0700)

pull: replace unnecessary sed invocation

Getting the shortened branch name is as easy as using the shell's
parameter expansion.

Signed-off-by: Stephen Boyd <bebarino@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>

gitk: Fix display of copyright symbolPat Thoyts Fri, 12 Mar 2010 18:31:49 +0000 (18:31 +0000)

gitk: Fix display of copyright symbol

The script file uses utf-8 encoding but when sourced it will be read
using the default system encoding which is never utf8 on windows.
This causes the copyright symbol to display incorrectly in the about
dialog. Using the unicode escape sequence avoids incorrect decoding
but does require a double escape in the .po files.

Also adjusted the year range.

Signed-off-by: Pat Thoyts <patthoyts@users.sourceforge.net>
Signed-off-by: Paul Mackerras <paulus@samba.org>

gitk: Add emacs editor variable blockPat Thoyts Fri, 12 Mar 2010 18:31:48 +0000 (18:31 +0000)

gitk: Add emacs editor variable block

Help contributors use the correct indentation style.

Signed-off-by: Pat Thoyts <patthoyts@users.sourceforge.net>
Signed-off-by: Paul Mackerras <paulus@samba.org>

gitk: Avoid calling tk_setPalette on WindowsPat Thoyts Fri, 12 Mar 2010 18:31:47 +0000 (18:31 +0000)

gitk: Avoid calling tk_setPalette on Windows

This just messes up the system colors. Leave them alone.

Signed-off-by: Pat Thoyts <patthoyts@users.sourceforge.net>
Signed-off-by: Paul Mackerras <paulus@samba.org>

gitk: Don't clobber "Remember this view" settingJonathan Nieder Sat, 6 Mar 2010 22:58:42 +0000 (16:58 -0600)

gitk: Don't clobber "Remember this view" setting

In the View → Edit View... dialog, the "Remember this view" option
always starts out unset. Using the dialog to change an existing view
and ignoring the parts of the dialog that aren’t relevant results in
both the old and new versions of the view being lost.

The cause: right after newviewopts($curview,perm) is set to an
appropriate value, decode_view_opts is clobbering it with the default
value. If that call is moved a little earlier, the "Remember this
view" option gets properly set to its previous value, fixing the
problem.

Reported-by: Steve Cotton <steve0001@s.cotton.clara.co.uk>
Signed-off-by: Jonathan Nieder <jrnieder@gmail.com>
Signed-off-by: Paul Mackerras <paulus@samba.org>

gitk: Add comments to explain encode_view_opts and... Jonathan Nieder Sat, 6 Mar 2010 22:48:38 +0000 (16:48 -0600)

gitk: Add comments to explain encode_view_opts and decode_view_opts

Summarize these functions to save the reader some time.

Signed-off-by: Jonathan Nieder <jrnieder@gmail.com>
Signed-off-by: Paul Mackerras <paulus@samba.org>

gitk: Use consistent font for all text input fieldsMark Hills Wed, 13 Jan 2010 20:40:22 +0000 (20:40 +0000)

gitk: Use consistent font for all text input fields

Instead of setting the font for specific widgets, set the font for the
widget type. If themed widgets are not available, this is via the X
resources. If themed widgets are available, the theme font is used.

The exception is the SHA1 ID which is forced to use the fixed-width
font, even where themed widgets are used.

Signed-off-by: Mark Hills <mark@pogo.org.uk>
Signed-off-by: Paul Mackerras <paulus@samba.org>

gitk: Set the font for all listbox widgetsMark Hills Wed, 13 Jan 2010 20:40:20 +0000 (20:40 +0000)

gitk: Set the font for all listbox widgets

This affects the font chooser.

Signed-off-by: Mark Hills <mark@pogo.org.uk>
Signed-off-by: Paul Mackerras <paulus@samba.org>

gitk: Set the font for all spinbox widgetsMark Hills Wed, 13 Jan 2010 20:40:19 +0000 (20:40 +0000)

gitk: Set the font for all spinbox widgets

Use the X resources to set the font, removing the need to set the font
for specific widgets.

Signed-off-by: Mark Hills <mark@pogo.org.uk>
Signed-off-by: Paul Mackerras <paulus@samba.org>

gitk: Remove forced use of sans-serif fontMark Hills Wed, 13 Jan 2010 20:40:18 +0000 (20:40 +0000)

gitk: Remove forced use of sans-serif font

The X resources set using uifont cover this case.

Signed-off-by: Mark Hills <mark@pogo.org.uk>
Signed-off-by: Paul Mackerras <paulus@samba.org>

gitk: Add Ctrl-W shortcut for closing the active windowJens Lehmann Tue, 2 Feb 2010 22:11:28 +0000 (23:11 +0100)

gitk: Add Ctrl-W shortcut for closing the active window

To make the user experience between git gui and gitk more homogeneous,
use Ctrl-W in gitk for closing the active window. When closing the
main window doquit is called for proper cleanup.

Signed-off-by: Jens Lehmann <Jens.Lehmann@web.de>
Signed-off-by: Paul Mackerras <paulus@samba.org>

Merge branch 'maint'Junio C Hamano Wed, 17 Mar 2010 21:24:08 +0000 (14:24 -0700)

Merge branch 'maint'

* maint:
Documentation: receive.denyCurrentBranch defaults to 'refuse'
bash: complete *_HEAD refs if present

Documentation: receive.denyCurrentBranch defaults to... Thomas Rast Wed, 17 Mar 2010 11:14:57 +0000 (12:14 +0100)

Documentation: receive.denyCurrentBranch defaults to 'refuse'

acd2a45 (Refuse updating the current branch in a non-bare repository
via push, 2009-02-11) changed the default to refuse such a push, but
it forgot to update the docs.

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

bash: complete *_HEAD refs if presentIan Ward Comfort Wed, 17 Mar 2010 09:20:35 +0000 (02:20 -0700)

bash: complete *_HEAD refs if present

We already complete HEAD, of course, and might as well complete the other
common refs mentioned in the rev-parse man page: FETCH_HEAD, ORIG_HEAD, and
MERGE_HEAD.

Signed-off-by: Ian Ward Comfort <icomfort@stanford.edu>
Acked-by: Shawn O. Pearce <spearce@spearce.org>
Signed-off-by: Junio C Hamano <gitster@pobox.com>

Merge branch 'maint'Junio C Hamano Wed, 17 Mar 2010 02:30:37 +0000 (19:30 -0700)

Merge branch 'maint'

* maint:
Documentation/git-read-tree: clarify 2-tree merge
Documentation/git-read-tree: fix table layout

everyday: fsck and gc are not everyday operationsAnders Kaseorg Wed, 21 Oct 2009 20:02:48 +0000 (16:02 -0400)

everyday: fsck and gc are not everyday operations

Back in 2005 when this document was written, it may have made sense to
introduce ‘git fsck’ (then ‘git fsck-objects’) as the very first example
command for new users of Git 0.99.9. Now that Git has been stable for
years and does not actually tend to eat your data, it makes significantly
less sense. In fact, it sends an entirely wrong message.

‘git gc’ is also unnecessary for the purposes of this document, especially
with gc.auto enabled by default.

The only other commands in the “Basic Repository” section were ‘git init’
and ‘git clone’. ‘clone’ is already listed in the “Participant” section,
so move ‘init’ to the “Standalone” section and get rid of “Basic
Repository” entirely.

Signed-off-by: Anders Kaseorg <andersk@mit.edu>
Signed-off-by: Junio C Hamano <gitster@pobox.com>

Improve error messages from 'git stash show'Gustaf Hendeby Tue, 16 Mar 2010 17:52:37 +0000 (18:52 +0100)

Improve error messages from 'git stash show'

The previous error message "fatal: Needed a single revision" is not
very informative.

Signed-off-by: Gustaf Hendeby <hendeby@isy.liu.se>
Signed-off-by: Junio C Hamano <gitster@pobox.com>

daemon.c: avoid accessing ss_family member of struct... Brandon Casey Mon, 15 Mar 2010 22:10:06 +0000 (17:10 -0500)

daemon.c: avoid accessing ss_family member of struct sockaddr_storage

When NO_SOCKADDR_STORAGE is set for a platform, either sockaddr_in or
sockaddr_in6 is used intead. Neither of which has an ss_family member.
They have an sin_family and sin6_family member respectively. Since the
addrcmp() function accesses the ss_family member of a sockaddr_storage
struct, compilation fails on platforms which define NO_SOCKADDR_STORAGE.

Since any sockaddr_* structure can be cast to a struct sockaddr and
have its sa_family member read, do so here to workaround this issue.

Thanks to Martin Storsjö for pointing out the fix, and Gary Vaughan
for drawing attention to the issue.

Signed-off-by: Brandon Casey <casey@nrlssc.navy.mil>
Signed-off-by: Junio C Hamano <gitster@pobox.com>

t/t1304: make a second colon optional in the mask ACL... Brandon Casey Mon, 15 Mar 2010 17:14:37 +0000 (12:14 -0500)

t/t1304: make a second colon optional in the mask ACL check

Solaris only uses one colon in the listing of the ACL mask, Linux uses two,
so substitute egrep for grep and make the second colon optional.

The -q option for Solaris 7's /usr/xpg4/bin/egrep does not appear to be
implemented, so redirect output to /dev/null.

Signed-off-by: Brandon Casey <casey@nrlssc.navy.mil>
Signed-off-by: Junio C Hamano <gitster@pobox.com>

t/t1304: set the ACL effective rights maskBrandon Casey Mon, 15 Mar 2010 18:35:03 +0000 (13:35 -0500)

t/t1304: set the ACL effective rights mask

Some implementations of setfacl do not recalculate the effective rights
mask when the ACL is modified. So, set the effective rights mask
explicitly to ensure that the ACL's that are set on the directories will
have effect.

Signed-off-by: Brandon Casey <casey@nrlssc.navy.mil>
Signed-off-by: Junio C Hamano <gitster@pobox.com>

t/t1304: use 'test -r' to test readability rather than... Brandon Casey Mon, 15 Mar 2010 17:14:35 +0000 (12:14 -0500)

t/t1304: use 'test -r' to test readability rather than looking at mode bits

This test was using the group read permission bit as an indicator of the
default ACL mask. This behavior is valid on Linux but not on other
platforms like Solaris. So, rather than looking at mode bits, just test
readability for the user. This, along with the checks for the existence
of the ACL's that were set on the parent directories, should be enough.

Signed-off-by: Brandon Casey <casey@nrlssc.navy.mil>
Signed-off-by: Junio C Hamano <gitster@pobox.com>

t/t1304: set the Default ACL base entriesBrandon Casey Mon, 15 Mar 2010 17:14:34 +0000 (12:14 -0500)

t/t1304: set the Default ACL base entries

According to the Linux setfacl man page, in order for an ACL to be valid,
the following rules must be satisfied:

* Whenever an ACL contains any Default ACL entries, the three Default
ACL base entries (default owner, default group, and default others)
must also exist.

* Whenever a Default ACL contains named user entries or named group
objects, it must also contain a default effective rights mask.

Some implementations of setfacl (Linux) do this automatically when
necessary, some (Solaris) do not. Solaris's setfacl croaks when trying to
create a default user ACL if the above rules are not satisfied. So, create
them before modifying the default user ACL's.

Signed-off-by: Brandon Casey <casey@nrlssc.navy.mil>
Signed-off-by: Junio C Hamano <gitster@pobox.com>

t/t1304: avoid -d option to setfaclBrandon Casey Mon, 15 Mar 2010 17:14:33 +0000 (12:14 -0500)

t/t1304: avoid -d option to setfacl

Some platforms (Solaris) have a setfacl whose -d switch works differently
than the one on Linux. On Linux, it causes all operations to be applied
to the Default ACL. There is a notation for operating on the Default ACL:

[d[efault]:] [u[ser]:]uid [:perms]

so use it instead of the -d switch.

Signed-off-by: Brandon Casey <casey@nrlssc.navy.mil>
Signed-off-by: Junio C Hamano <gitster@pobox.com>

refs: ref entry with NULL sha1 is can be a dangling... Junio C Hamano Tue, 16 Mar 2010 05:12:55 +0000 (22:12 -0700)

refs: ref entry with NULL sha1 is can be a dangling symref

Brandon Casey noticed that t5505 had accidentally broken its && chain,
hiding inconsistency between the code that writes the warning to the
standard output and the test that expects to see the warning on the
standard error, which was introduced by f8948e2 (remote prune: warn
dangling symrefs, 2009-02-08).

It turns out that the issue is deeper than that. After f8948e2, a symref
that is dangling is marked with a NULL sha1, and the idea of using NULL
sha1 to mean a deleted ref was scrapped, but somehow a follow-up eafb452
(do_one_ref(): null_sha1 check is not about broken ref, 2009-07-22)
incorrectly reorganized do_one_ref(), still thinking NULL sha1 is never
used in the code.

Fix this by:

- adopt Brandon's fix to t5505 test;

- introduce REF_BROKEN flag to mark a ref that fails to resolve (dangling
symref);

- move the check for broken ref back inside the "if we are skipping
dangling refs" code block.

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

grep: enable threading for context line printingRené Scharfe Mon, 15 Mar 2010 16:21:10 +0000 (17:21 +0100)

grep: enable threading for context line printing

If context lines are to be printed, grep separates them with hunk marks
("--\n"). These marks are printed between matches from different files,
too. They are not printed before the first file, though.

Threading was disabled when context line printing was enabled because
avoiding to print the mark before the first line was an unsolved
synchronisation problem. This patch separates the code for printing
hunk marks for the threaded and the unthreaded case, allowing threading
to be turned on together with the common -ABC options.

->show_hunk_mark, which controls printing of hunk marks between files in
show_line(), is now set in grep_buffer_1(), but only if some results
have already been printed and threading is disabled. The threaded case
is handled in work_done().

Signed-off-by: Rene Scharfe <rene.scharfe@lsrfire.ath.cx>
Signed-off-by: Junio C Hamano <gitster@pobox.com>

Documentation/git-read-tree: clarify 2-tree mergeMichael J Gruber Mon, 15 Mar 2010 10:54:46 +0000 (11:54 +0100)

Documentation/git-read-tree: clarify 2-tree merge

Clarify the description of the 2-tree merge by defining the terms
which are used in the table, and by applying some small linguistic
changes.

Signed-off-by: Michael J Gruber <git@drmicha.warpmail.net>
Signed-off-by: Junio C Hamano <gitster@pobox.com>

Documentation/git-read-tree: fix table layoutMichael J Gruber Mon, 15 Mar 2010 10:54:45 +0000 (11:54 +0100)

Documentation/git-read-tree: fix table layout

Asciidoc takes the first non-space character in the first line of the
paragraph as a reference point for preformatted layout, so adjust to
that to make the table align.

Signed-off-by: Michael J Gruber <git@drmicha.warpmail.net>
Signed-off-by: Junio C Hamano <gitster@pobox.com>

Merge branch 'sd/format-patch-to'Junio C Hamano Mon, 15 Mar 2010 07:58:55 +0000 (00:58 -0700)

Merge branch 'sd/format-patch-to'

* sd/format-patch-to:
send-email: add --no-cc, --no-to, and --no-bcc
format-patch: add --no-cc, --no-to, and --no-add-headers
format-patch: use a string_list for headers
Add 'git format-patch --to=' option and 'format.to' configuration variable.

Merge branch 'tc/http-cleanup'Junio C Hamano Mon, 15 Mar 2010 07:58:50 +0000 (00:58 -0700)

Merge branch 'tc/http-cleanup'

* tc/http-cleanup:
remote-curl: init walker only when needed
remote-curl: use http_fetch_ref() instead of walker wrapper
http: init and cleanup separately from http-walker
http-walker: cleanup more thoroughly
http-push: remove "|| 1" to enable verbose check
t554[01]-http-push: refactor, add non-ff tests
t5541-http-push: check that ref is unchanged for non-ff test

Merge branch 'tc/transport-verbosity'Junio C Hamano Mon, 15 Mar 2010 07:58:42 +0000 (00:58 -0700)

Merge branch 'tc/transport-verbosity'

* tc/transport-verbosity:
transport: update flags to be in running order
fetch and pull: learn --progress
push: learn --progress
transport->progress: use flag authoritatively
clone: support multiple levels of verbosity
push: support multiple levels of verbosity
fetch: refactor verbosity option handling into transport.[ch]
Documentation/git-push: put --quiet before --verbose
Documentation/git-pull: put verbosity options before merge/fetch ones
Documentation/git-clone: mention progress in -v

Conflicts:
transport.h

Merge branch 'ld/push-porcelain'Junio C Hamano Mon, 15 Mar 2010 07:58:24 +0000 (00:58 -0700)

Merge branch 'ld/push-porcelain'

* ld/push-porcelain:
t5516: Use test_cmp when appropriate
git-push: add tests for git push --porcelain
git-push: make git push --porcelain print "Done"
git-push: send "To <remoteurl>" messages to the standard output in --porcelain mode
git-push: fix an advice message so it goes to stderr

Conflicts:
transport.c

Merge branch 'jh/notes'Junio C Hamano Mon, 15 Mar 2010 07:52:06 +0000 (00:52 -0700)

Merge branch 'jh/notes'

* jh/notes: (33 commits)
Documentation: fix a few typos in git-notes.txt
notes: fix malformed tree entry
builtin-notes: Minor (mostly parse_options-related) fixes
builtin-notes: Add "copy" subcommand for copying notes between objects
builtin-notes: Misc. refactoring of argc and exit value handling
builtin-notes: Add -c/-C options for reusing notes
builtin-notes: Refactor handling of -F option to allow combining -m and -F
builtin-notes: Deprecate the -m/-F options for "git notes edit"
builtin-notes: Add "append" subcommand for appending to note objects
builtin-notes: Add "add" subcommand for adding notes to objects
builtin-notes: Add --message/--file aliases for -m/-F options
builtin-notes: Add "list" subcommand for listing note objects
Documentation: Generalize git-notes docs to 'objects' instead of 'commits'
builtin-notes: Add "prune" subcommand for removing notes for missing objects
Notes API: prune_notes(): Prune notes that belong to non-existing objects
t3305: Verify that removing notes triggers automatic fanout consolidation
builtin-notes: Add "remove" subcommand for removing existing notes
Teach builtin-notes to remove empty notes
Teach notes code to properly preserve non-notes in the notes tree
t3305: Verify that adding many notes with git-notes triggers increased fanout
...

Conflicts:
Makefile

rebase--interactive: don't require what's rebased to... Dave Olszewski Mon, 15 Mar 2010 04:48:22 +0000 (21:48 -0700)

rebase--interactive: don't require what's rebased to be a branch

git rebase allows you to specify a non-branch commit-ish as the "branch"
argument, which leaves HEAD detached when it's finished. This is
occasionally useful, and this patch brings the same functionality to git
rebase --interactive.

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

git-send-email.perl - try to give real name of the... Jari Aalto Sun, 14 Mar 2010 15:16:45 +0000 (17:16 +0200)

git-send-email.perl - try to give real name of the calling host to HELO/EHLO

Add new functions maildomain_net(), maildomain_mta() and
maildomain(), which return FQDN where possible for use in
send_message(). The value is passed to Net::SMTP HELO/EHLO
handshake. The domain name can also be set via new --smtp-domain
option.

The default value in Net::SMTP may not get through:

Net::SMTP=GLOB(0x267ec28)>>> EHLO localhost.localdomain
Net::SMTP=GLOB(0x267ec28)<<< 550 EHLO argument does not match calling host

whereas using the FQDN that matches the IP, the result is:

Net::SMTP=GLOB(0x15b8e80)>>> EHLO host.example.com
Net::SMTP=GLOB(0x15b8e80)<<< 250-host.example.com Hello host.example.com [192.168.1.7]

The maildomain*() code is based on ideas in Perl library
Test::Reporter by Graham Barr <gbarr@pobox.com> and Mark Overmeer
<mailtools@overmeer.net> released under the same terms as Perl
itself.

Signed-off-by: Jari Aalto <jari.aalto@cante.net>
Signed-off-by: Junio C Hamano <gitster@pobox.com>

git-send-email.perl: add option --smtp-debugJari Aalto Sun, 14 Mar 2010 15:16:09 +0000 (17:16 +0200)

git-send-email.perl: add option --smtp-debug

Signed-off-by: Jari Aalto <jari.aalto@cante.net>
Signed-off-by: Junio C Hamano <gitster@pobox.com>

git-send-email.perl: improve error message in send_mess... Jari Aalto Sun, 14 Mar 2010 15:15:33 +0000 (17:15 +0200)

git-send-email.perl: improve error message in send_message()

Signed-off-by: Jari Aalto <jari.aalto@cante.net>
Signed-off-by: Junio C Hamano <gitster@pobox.com>

tests for "git add ignored-dir/file" without -fJunio C Hamano Mon, 1 Mar 2010 03:12:31 +0000 (19:12 -0800)

tests for "git add ignored-dir/file" without -f

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

dir: fix COLLECT_IGNORED on excluded prefixesJeff King Thu, 11 Mar 2010 07:15:43 +0000 (02:15 -0500)

dir: fix COLLECT_IGNORED on excluded prefixes

As we walk the directory tree, if we see an ignored path, we
want to add it to the ignored list only if it matches any
pathspec that we were given. We used to check for the
pathspec to appear explicitly. E.g., if we see "subdir/file"
and it is excluded, we check to see if we have "subdir/file"
in our pathspec.

However, this interacts badly with the optimization to avoid
recursing into ignored subdirectories. If "subdir" as a
whole is ignored, then we never recurse, and consider only
whether "subdir" itself is in our pathspec. It would not
match a pathspec of "subdir/file" explicitly, even though it
is the reason that subdir/file would be excluded.

This manifests itself to the user as "git add subdir/file"
failing to correctly note that the pathspec was ignored.

This patch extends the in_pathspec logic to include prefix
directory case.

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

t0050: mark non-working test as suchJunio C Hamano Mon, 1 Mar 2010 07:31:21 +0000 (23:31 -0800)

t0050: mark non-working test as such

The test is to prepare an empty file "camelcase" in the index, remove
and replace it with another file "CamelCase" with "1" as its contents
in the working tree, and add it to the index, in a repository configured
to be case insensitive.

However, the test actually checked ls-files knows about a pathname that
matches "camelcase" case insensitively. It didn't check if the added
contents actually was the updated one.

Mark the test as non-working.

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

git status: ignoring untracked files must apply to... Jens Lehmann Sat, 13 Mar 2010 22:00:27 +0000 (23:00 +0100)

git status: ignoring untracked files must apply to submodules too

Since 1.7.0 submodules are considered dirty when they contain untracked
files. But when git status is called with the "-uno" option, the user
asked to ignore untracked files, so they must be ignored in submodules
too. To achieve this, the new flag DIFF_OPT_IGNORE_UNTRACKED_IN_SUBMODULES
is introduced.

Signed-off-by: Jens Lehmann <Jens.Lehmann@web.de>
Signed-off-by: Junio C Hamano <gitster@pobox.com>

Merge branch 'maint'Junio C Hamano Sun, 14 Mar 2010 05:31:42 +0000 (21:31 -0800)

Merge branch 'maint'

* maint:
don't use default revision if a rev was specified
for_each_recent_reflog_ent(): use strbuf, fix offset handling
t/Makefile: remove test artifacts upon "make clean"
blame: fix indent of line numbers