gitweb.git
make shallow repository deepening more network efficientNicolas Pitre Thu, 3 Sep 2009 23:08:33 +0000 (19:08 -0400)

make shallow repository deepening more network efficient

First of all, I can't find any reason why thin pack generation is
explicitly disabled when dealing with a shallow repository. The
possible delta base objects are collected from the edge commits which
are always obtained through history walking with the same shallow refs
as the client, Therefore the client is always going to have those base
objects available. So let's remove that restriction.

Then we can make shallow repository deepening much more efficient by
using the remote's unshallowed commits as edge commits to get preferred
base objects for thin pack generation. On git.git, this makes the data
transfer for the deepening of a shallow repository from depth 1 to depth 2
around 134 KB instead of 3.68 MB.

Signed-off-by: Nicolas Pitre <nico@cam.org>
Signed-off-by: Junio C Hamano <gitster@pobox.com>

fix simple deepening of a repoNicolas Pitre Mon, 24 Aug 2009 04:04:09 +0000 (00:04 -0400)

fix simple deepening of a repo

If all refs sent by the remote repo during a fetch are reachable
locally, then no further conversation is performed with the remote. This
check is skipped when the --depth argument is provided to allow the
deepening of a shallow clone which corresponding remote repo has no
changed.

However, some additional filtering was added in commit c29727d5 to
remove those refs which are equal on both sides. If the remote repo has
not changed, then the list of refs to give the remote process becomes
empty and simply attempting to deepen a shallow repo always fails.

Let's stop being smart in that case and simply send the whole list over
when that condition is met. The remote will do the right thing anyways.

Test cases for this issue are also provided.

Signed-off-by: Nicolas Pitre <nico@cam.org>
Signed-off-by: Junio C Hamano <gitster@pobox.com>

Change mentions of "git programs" to "git commands"Ori Avtalion Fri, 7 Aug 2009 14:24:21 +0000 (17:24 +0300)

Change mentions of "git programs" to "git commands"

Most of the docs and printouts refer to "commands" when discussing what
the end users call via the "git" top-level program. We should refer them
as "git programs" when we discuss the fact that the commands are
implemented as separate programs, but in other contexts, it is better to
use the term "git commands" consistently.

Signed-off-by: Ori Avtalion <ori@avtalion.name>
Signed-off-by: Nanako Shiraishi <nanako3@lavabit.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>

Documentation: merge: one <remote> is requiredPaul Bolle Tue, 11 Aug 2009 13:03:58 +0000 (15:03 +0200)

Documentation: merge: one <remote> is required

merge only requires one <remote>, so "<remote>..." should be used in the
synopsis (and not "<remote> <remote>...").

Signed-off-by: Paul Bolle <pebolle@tiscali.nl>
Signed-off-by: Junio C Hamano <gitster@pobox.com>

help.c: give correct structure's size to memset()Johan Herland Tue, 11 Aug 2009 10:10:21 +0000 (12:10 +0200)

help.c: give correct structure's size to memset()

These two structures are of the same type, but we'd better be consistent.

Signed-off-by: Johan Herland <johan@herland.net>
Signed-off-by: Junio C Hamano <gitster@pobox.com>

Fix typos in git-remote.txt and git-symbolic-ref.txtŠtěpán Němec Tue, 11 Aug 2009 00:52:07 +0000 (02:52 +0200)

Fix typos in git-remote.txt and git-symbolic-ref.txt

Signed-off-by: Štěpán Němec <stepnem@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>

Merge branch 'maint-1.6.2' into maint-1.6.3Junio C Hamano Sat, 8 Aug 2009 03:44:15 +0000 (20:44 -0700)

Merge branch 'maint-1.6.2' into maint-1.6.3

* maint-1.6.2:
verify-pack -v: do not report "chain length 0"
t5510: harden the way verify-pack is used

Merge branch 'maint-1.6.1' into maint-1.6.2Junio C Hamano Sat, 8 Aug 2009 03:44:09 +0000 (20:44 -0700)

Merge branch 'maint-1.6.1' into maint-1.6.2

* maint-1.6.1:
verify-pack -v: do not report "chain length 0"
t5510: harden the way verify-pack is used

Merge branch 'maint-1.6.0' into maint-1.6.1Junio C Hamano Sat, 8 Aug 2009 03:44:02 +0000 (20:44 -0700)

Merge branch 'maint-1.6.0' into maint-1.6.1

* maint-1.6.0:
verify-pack -v: do not report "chain length 0"
t5510: harden the way verify-pack is used

verify-pack -v: do not report "chain length 0"Junio C Hamano Fri, 7 Aug 2009 22:36:31 +0000 (15:36 -0700)

verify-pack -v: do not report "chain length 0"

When making a histogram of delta chain length in the pack, the program
collects number of objects whose delta depth exceeds the MAX_CHAIN limit
in histogram[0], and showed it as the number of items that exceeds the
limit correctly. HOWEVER, it also showed the same number labeled as
"chain length = 0".

In fact, we are not showing the number of objects whose chain length is
zero, i.e. the base objects. Correct this.

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

t5510: harden the way verify-pack is usedJunio C Hamano Sat, 8 Aug 2009 03:12:13 +0000 (20:12 -0700)

t5510: harden the way verify-pack is used

The test ignored the exit status from verify pack command, and also relied
on not seeing any delta chain statistics.

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

Better usage string for reflog.Matthieu Moy Wed, 5 Aug 2009 15:36:28 +0000 (17:36 +0200)

Better usage string for reflog.

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

hg-to-git: don't import the unused popen2 moduleMiklos Vajna Mon, 3 Aug 2009 16:41:34 +0000 (18:41 +0200)

hg-to-git: don't import the unused popen2 module

Importing the popen2 module in Python-2.6 results in the
"DeprecationWarning: The popen2 module is deprecated. Use the
subprocess module." message. The module itself isn't used in fact, so
just removing it solves the problem.

Signed-off-by: Miklos Vajna <vmiklos@frugalware.org>
Signed-off-by: Junio C Hamano <gitster@pobox.com>

send-email: remove debug traceErik Faye-Lund Tue, 4 Aug 2009 21:57:34 +0000 (21:57 +0000)

send-email: remove debug trace

Signed-off-by: Erik Faye-Lund <kusmabite@gmail.com>

config: Keep inner whitespace verbatimBjörn Steinbrink Thu, 30 Jul 2009 11:41:57 +0000 (13:41 +0200)

config: Keep inner whitespace verbatim

Configuration values are expected to be quoted when they have leading or
trailing whitespace, but inner whitespace should be kept verbatim even if
the value is not quoted. This is already documented in git-config(1), but
the code caused inner whitespace to be collapsed to a single space,
breaking, for example, clones from a path that has two consecutive spaces
in it, as future fetches would only see a single space.

Reported-by: John te Bokkel <tanj.tanj@gmail.com>
Signed-off-by: Björn Steinbrink <B.Steinbrink@gmx.de>
Signed-off-by: Junio C Hamano <gitster@pobox.com>

GIT 1.6.3.4 v1.6.3.4Junio C Hamano Wed, 29 Jul 2009 06:52:58 +0000 (23:52 -0700)

GIT 1.6.3.4

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

config.txt: document add.ignore-errorsStephen Boyd Sun, 31 May 2009 05:08:02 +0000 (22:08 -0700)

config.txt: document add.ignore-errors

Use the description of "--ignore-errors" from git-add.txt as
inspiration.

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

request-pull: allow ls-remote to notice remote.$nicknam... Tom Grennan Wed, 29 Jul 2009 01:30:02 +0000 (18:30 -0700)

request-pull: allow ls-remote to notice remote.$nickname.uploadpack

The location to pull from should be converted from the configured nickname
to URL in the message, but ls-remote should be fed the nickname so that
the command uses remote.$nickname.* variables, most notably "uploadpack".

Signed-off-by: Tom Grennan <tgrennan@redback.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>

t8005: Nobody writes Russian in shift_jisJunio C Hamano Fri, 19 Jun 2009 02:18:37 +0000 (19:18 -0700)

t8005: Nobody writes Russian in shift_jis

The second and third tests of this script expected that Russian strings
are converted between ISO-8859-5 and Shift_JIS in the "blame --porcelain"
format output correctly.

Sure, many platforms may convert between such a combination, but that is
only because one of the base character set of Shift_JIS, JIS X 0208,
defines codepoints for Russian characters (among others); I do not think
anybody uses Shift_JIS when seriously writing Russian, and it is perfectly
understandable if iconv() libraries on some platforms fail converting
between this combination, as it does not matter in reality.

This patch changes the test to verify Japanese strings are converted
correctly between EUC-JP and Shift_JIS in the same procedure. The point
of the test is not about verifying the platform's iconv() library, but to
see if "git blame" makes correct iconv() library calls when it should.

We could instead use ISO-8859-5 and KOI8-R as the combination, because
they are both meant to represent Russian, in order to make this test
meaningful on more platforms, but we already use Shift_JIS vs EUC-JP
combinations to test other programs in our test suite, so this combination
is safer from the point of view of the portability. Besides, I do not
read nor write Russian; sorry ;-)

This change allows tests to pass on my (friend's) Solaris 5.11 box.

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

Fix severe breakage in "git-apply --whitespace=fix"Junio C Hamano Sat, 25 Jul 2009 08:29:20 +0000 (01:29 -0700)

Fix severe breakage in "git-apply --whitespace=fix"

735c674 (Trailing whitespace and no newline fix, 2009-07-22) completely
broke --whitespace=fix, causing it to lose all the empty lines in a patch.

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

SunOS grep does not understand -C<n> nor -eJunio C Hamano Fri, 24 Jul 2009 05:30:07 +0000 (22:30 -0700)

SunOS grep does not understand -C<n> nor -e

The first "grep -C1" test in t7002 does not pass on my SunOS-5.11-i86pc,
and that is not because our way to spawn external grep is broken, but
because the native grep does not understand -C<n>.

It turns out that Peff was also using this option himself because our
Makefile doesn't do that automatically. Brandon Casey uses SUNWspro
compiler without having to set this, and it turns out that the compiler
does not define preprocessor macro __unix__ which made him always use the
built-in grep, never an external one.

Let's be more explicit and say that we do not use external grep on Suns.

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

Fix export_marks() error handling.Matthias Andree Fri, 24 Jul 2009 08:17:13 +0000 (10:17 +0200)

Fix export_marks() error handling.

- Don't leak one FILE * on error per export_marks() call. Found with
cppcheck and reported by Martin Ettl.

- Abort the potentially long for(;idnums.size;) loop on write errors.

- Record error if fprintf() fails for reasons not required to set the
stream error indicator, such as ENOMEM.

- Add a trailing full-stop to error message when fopen() fails.

Signed-off-by: Matthias Andree <matthias.andree@gmx.de>
Signed-off-by: Junio C Hamano <gitster@pobox.com>

git branch: clean up detached branch handlingLinus Torvalds Thu, 23 Jul 2009 19:13:48 +0000 (12:13 -0700)

git branch: clean up detached branch handling

Make the 'show detached branch info' a routine of its own. And in the
process, avoid the object lookup that is unnecessary if the current
branch isn't detached.

Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Signed-off-by: Junio C Hamano <gitster@pobox.com>

git branch: avoid unnecessary object lookupsLinus Torvalds Thu, 23 Jul 2009 19:05:34 +0000 (12:05 -0700)

git branch: avoid unnecessary object lookups

They can be expensive in the cold-cache case, so don't bother looking up
the commits for all branches unless we really need them for some reason.

Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Signed-off-by: Junio C Hamano <gitster@pobox.com>

git branch: fix performance problemLinus Torvalds Thu, 23 Jul 2009 17:17:04 +0000 (10:17 -0700)

git branch: fix performance problem

'git branch' looks at _all_ the refs, and verifies them. Which means that
during cold-cache situations with a slow disk (and lots of tags, for
example) it can take several very annoying seconds (7.5s according to a
report by Carlos R. Mafra).

This avoids most of it by simply doing the filtering before looking up
the commits, by using the "raw" version of for_each_ref.

Reported-by: Carlos R. Mafra <crmafra2@gmail.com>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Signed-off-by: Junio C Hamano <gitster@pobox.com>

do_one_ref(): null_sha1 check is not about broken refJunio C Hamano Thu, 23 Jul 2009 06:07:05 +0000 (23:07 -0700)

do_one_ref(): null_sha1 check is not about broken ref

f8948e2 (remote prune: warn dangling symrefs, 2009-02-08) introduced a
more dangerous variant of for_each_ref() family that skips the check for
dangling refs, but it also made another unrelated check optional by
mistake.

The check to see if a ref points at 0{40} is not about brokenness, but is
about a possible future plan to represent a deleted ref by writing 40 "0"
in a loose ref when there is a stale version of the same ref already in
.git/packed-refs, so that we can implement deletion of a ref without
having to rewrite the packed refs file excluding the ref being deleted.

This check has to live outside of the conditional.

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

Trailing whitespace and no newline fixSZEDER Gábor Thu, 23 Jul 2009 00:24:38 +0000 (19:24 -0500)

Trailing whitespace and no newline fix

If a patch adds a new line to the end of a file and this line ends with
one trailing whitespace character and has no newline, then
'--whitespace=fix' currently does not remove that trailing whitespace.

This patch fixes this by removing the check for trailing whitespace at
the end of the line at a hardcoded offset which does not take the
eventual absence of newline into account.

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

diff --cc: a lost line at the beginning of the file... Junio C Hamano Wed, 22 Jul 2009 21:48:29 +0000 (14:48 -0700)

diff --cc: a lost line at the beginning of the file is shown incorrectly

When combine-diff inspected the diff from one parent to the merge result,
it misinterpreted a header in the form @@ -l,k +0,0 @@.

This hunk header means that K lines were removed from the beginning of the
file, so the lost lines must be queued to the sline that represents the
first line of the merge result, but we incremented our pointer incorrectly
and ended up queuing it to the second line, which in turn made the lossage
appear _after_ the first line.

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

combine-diff.c: fix performance problem when folding... Junio C Hamano Wed, 22 Jul 2009 21:48:28 +0000 (14:48 -0700)

combine-diff.c: fix performance problem when folding common deleted lines

For a deleted line in a patch with the parent we are looking at, the
append_lost() function finds the same line among a run of lines that were
deleted from the same location by patches from parents we previously
checked. This is so that patches with two parents

@@ -1,4 +1,3 @@ @@ -1,4 +1,3 @@
one one
-two -two
three three
-quatro -fyra
+four +four

can be coalesced into this sequence, reusing one line that describes the
removal of "two" for both parents.

@@@ -1,4 -1,4 +1,3 @@@
one
--two
three
- quatro
-frya
++four

While reading the second patch (that removes "two" and then "fyra"), after
finding where removal of the "two" matches, we need to find existing
removal of "fyra" (if exists) in the removal list, but the match has to
happen after all the existing matches (in this case "two"). The code used
a naïve O(n^2) algorithm to compute this by scanning the whole removal
list over and over again.

This patch remembers where the next scan should be started in the existing
removal list to avoid this.

Noticed by Linus Torvalds.

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

checkout -f: deal with a D/F conflict entry correctlyJunio C Hamano Sat, 18 Jul 2009 19:26:38 +0000 (12:26 -0700)

checkout -f: deal with a D/F conflict entry correctly

When we switch branches with "checkout -f", unpack_trees() feeds two
cache_entries to oneway_merge() function in its src[] array argument. The
zeroth entry comes from the current index, and the first entry represents
what the merge result should be, taken from the tree recorded in the
commit we are switching to.

When we have a blob (either regular file or a symlink) in the index and in
the work tree at path "foo", and the switched-to tree has "foo/bar",
i.e. "foo" becomes a directory, src[0] is obviously that blob currently
registered at "foo". Even though we do not have anything at "foo" in the
switched-to tree, src[1] is _not_ NULL in this case.

The unpack_trees() machinery places a special marker df_conflict_entry
to signal that no blob exists at "foo", but it will become a directory
that may have somthing underneath it (namely "foo/bar"), so a usual 3-way
merge can notice the situation.

But oneway_merge() codepath failed to notice this and passed the special
marker directly to merged_entry(). This happens to remove the "foo" in
the end because the df_conflict_entry does not have any name (hence the
"error" message) and its addition in add_index_entry() is rejected, but it
is wrong.

Signed-off-by: Junio C Hamano <gitster@pobox.com>
Acked-by: Linus Torvalds <torvalds@linux-foundation.org>

sha1_name.c: avoid unnecessary strbuf_releaseBrandon Casey Thu, 16 Jul 2009 21:25:19 +0000 (16:25 -0500)

sha1_name.c: avoid unnecessary strbuf_release

When we fall back to a standard for_each_reflog_ent() after failing to find
the nth branch switch (or if we had a short reflog) with the call to
for_each_recent_reflog_ent(), we do not need to free the memory allocated
for our strbuf's since a strbuf_reset() will be performed in
grab_nth_branch_switch() before assigning to the entry.

Plus, the strbuf_release() negates the non-zero hint we initially gave to
strbuf_init() just above these lines.

Signed-off-by: Brandon Casey <drafnel@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>

refs.c: release file descriptor on error returnBrandon Casey Thu, 16 Jul 2009 21:25:18 +0000 (16:25 -0500)

refs.c: release file descriptor on error return

Signed-off-by: Brandon Casey <drafnel@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>

Merge branch 'cb/maint-fetch-refspec-wo-dst' into maintJunio C Hamano Wed, 8 Jul 2009 16:52:25 +0000 (09:52 -0700)

Merge branch 'cb/maint-fetch-refspec-wo-dst' into maint

* cb/maint-fetch-refspec-wo-dst:
fetch: do not create ref from empty name

Merge branch 'cf/maint-remote-uploadpack-useconfig... Junio C Hamano Wed, 8 Jul 2009 16:52:14 +0000 (09:52 -0700)

Merge branch 'cf/maint-remote-uploadpack-useconfig-fix' into maint

* cf/maint-remote-uploadpack-useconfig-fix:
git-remote: fix missing .uploadpack usage for show command

Documentation: update description of shell aliasesSitaram Chamarty Wed, 1 Jul 2009 16:00:31 +0000 (21:30 +0530)

Documentation: update description of shell aliases

Aliases that invoke shell commands start from the top-level directory,
but this was not documented.

Signed-off-by: Sitaram Chamarty <sitaramc@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>

request-pull: really really disable pagerMichal Marek Wed, 1 Jul 2009 09:40:30 +0000 (11:40 +0200)

request-pull: really really disable pager

Earlier 476cc72 (request-pull: really disable pager, 2009-06-30)
tried to use the correct environment variable to disable paging
from multiple calls to "git log" and friends, but there was one
extra call to "git log" that was not covered by the trick.

Move the setting and exporting of GIT_PAGER much earlier in the
script to cover everybody.

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

attr: plug minor memory leakRené Scharfe Tue, 30 Jun 2009 22:30:00 +0000 (00:30 +0200)

attr: plug minor memory leak

Free the memory allocated for struct strbuf pathbuf when we're done.

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

request-pull: really disable pagerJunio C Hamano Tue, 30 Jun 2009 18:29:36 +0000 (11:29 -0700)

request-pull: really disable pager

ff06c74 (Improve request-pull to handle non-rebased branches, 2007-05-01)
attempted to disable pager when running subcommands in this script, but
with a wrong variable. If GIT_PAGER is set, it takes precedence over
PAGER.

Noticed by Michal Marek.

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

Makes some cleanup/review in gittutorialThadeu Lima de Souza Cascardo Mon, 29 Jun 2009 15:13:58 +0000 (12:13 -0300)

Makes some cleanup/review in gittutorial

There are some different but little cleanup changes to fix some missing
quotes, to fix what seemed to be an unended sentence, to reident a
little paragraph with too large a sentence and fix a branch name that
was referred to twice later by another name.

Signed-off-by: Thadeu Lima de Souza Cascardo <cascardo@holoscopio.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>

Makefile: git.o depends on library headersJohannes Sixt Mon, 29 Jun 2009 19:42:08 +0000 (21:42 +0200)

Makefile: git.o depends on library headers

This dependency was not yet specified anywhere else.

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

git-submodule documentation: fix foreach exampleMiklos Vajna Sun, 28 Jun 2009 12:55:45 +0000 (14:55 +0200)

git-submodule documentation: fix foreach example

Backtick and apostrophe are asciidoc markup, so they should be escaped
in order to get the expected result in the rendered manual page.

Signed-off-by: Miklos Vajna <vmiklos@frugalware.org>
Signed-off-by: Junio C Hamano <gitster@pobox.com>

gitweb/README: fix AliasMatch in exampleGiuseppe Bilotta Sat, 27 Jun 2009 16:24:11 +0000 (18:24 +0200)

gitweb/README: fix AliasMatch in example

When combining "dumb client" and human-friendly access by using the
'.git' extension to switch between the two, make sure the AliasMatch
covers the entire request. Without a full match, a request for

http://git.example.com/project/shortlog/branch..gitsomething

would result in a 404 because the server would try to access the
the project 'project/shortlog/branch.'

The solution is still not bulletproof, so document the possible failing
case.

Signed-off-by: Giuseppe Bilotta <giuseppe.bilotta@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>

Test grep --and/--or/--notThomas Rast Sat, 27 Jun 2009 18:47:44 +0000 (20:47 +0200)

Test grep --and/--or/--not

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

Test git archive --remoteThomas Rast Sat, 27 Jun 2009 18:47:43 +0000 (20:47 +0200)

Test git archive --remote

Add a small test case for git archive --remote (and thus
git-upload-archive), which so far went untested.

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

git-remote: fix missing .uploadpack usage for show... Chris Frey Thu, 25 Jun 2009 21:21:35 +0000 (17:21 -0400)

git-remote: fix missing .uploadpack usage for show command

For users pulling from machines with self compiled git installs,
in non-PATH locations, they can set the config option
remote.<name>.uploadpack to set the location of git-upload-pack.

When using 'git remote show <name>', the remote HEAD check
did not use the uploadpack configuration setting, and would
not use the configured program.

In builtin-remote.c, the config setting is already loaded
with the call to remote_get(), so this patch passes that remote
along to transport_get().

Signed-off-by: Chris Frey <cdfrey@foursquare.net>
Signed-off-by: Junio C Hamano <gitster@pobox.com>

fread does not return negative on errorRoel Kluin Mon, 22 Jun 2009 16:42:33 +0000 (18:42 +0200)

fread does not return negative on error

size_t res cannot be less than 0. fread returns 0 on error.

Reported-by: Ingo Molnar <mingo@elte.hu>
Signed-off-by: Roel Kluin <roel.kluin@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>

t3700-add: add a POSIXPERM prerequisite to a new testJohannes Sixt Mon, 22 Jun 2009 07:30:38 +0000 (09:30 +0200)

t3700-add: add a POSIXPERM prerequisite to a new test

The new test does a 'chmod 0', which does not have the intended
effect on Windows.

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

Merge branch 'sb/maint-1.6.0-add-config-fix' into maintJunio C Hamano Mon, 22 Jun 2009 07:44:09 +0000 (00:44 -0700)

Merge branch 'sb/maint-1.6.0-add-config-fix' into maint

* sb/maint-1.6.0-add-config-fix:
add: allow configurations to be overriden by command line

GIT 1.6.3.3 v1.6.3.3Junio C Hamano Mon, 22 Jun 2009 04:02:49 +0000 (21:02 -0700)

GIT 1.6.3.3

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

Merge branch 'ak/maint-for-each-ref-no-lookup' into... Junio C Hamano Mon, 22 Jun 2009 04:15:39 +0000 (21:15 -0700)

Merge branch 'ak/maint-for-each-ref-no-lookup' into maint

* ak/maint-for-each-ref-no-lookup:
for-each-ref: Do not lookup objects when they will not be used

Merge branch 'rc/maint-http-local-slot-fix' into maintJunio C Hamano Mon, 22 Jun 2009 04:15:31 +0000 (21:15 -0700)

Merge branch 'rc/maint-http-local-slot-fix' into maint

* rc/maint-http-local-slot-fix:
http*: cleanup slot->local after fclose

Merge branch 'cb/maint-no-double-merge' into maintJunio C Hamano Mon, 22 Jun 2009 04:15:27 +0000 (21:15 -0700)

Merge branch 'cb/maint-no-double-merge' into maint

* cb/maint-no-double-merge:
refuse to merge during a merge

Merge branch 'mn/maint-iconv-autoconf' into maintJunio C Hamano Mon, 22 Jun 2009 04:14:25 +0000 (21:14 -0700)

Merge branch 'mn/maint-iconv-autoconf' into maint

* mn/maint-iconv-autoconf:
fix handling of iconv configuration options

Merge branch 'lt/maint-unsigned-left-shift' into maintJunio C Hamano Mon, 22 Jun 2009 04:14:09 +0000 (21:14 -0700)

Merge branch 'lt/maint-unsigned-left-shift' into maint

* lt/maint-unsigned-left-shift:
Fix big left-shifts of unsigned char

Merge branch 'pb/maint-1.6.2-userdiff-fix' into maintJunio C Hamano Mon, 22 Jun 2009 04:08:05 +0000 (21:08 -0700)

Merge branch 'pb/maint-1.6.2-userdiff-fix' into maint

* pb/maint-1.6.2-userdiff-fix:
upload-archive: fix infinite loop on Cygwin
avoid exponential regex match for java and objc function names

attribute: whitespace set to true detects all errors... Junio C Hamano Sun, 21 Jun 2009 09:35:18 +0000 (02:35 -0700)

attribute: whitespace set to true detects all errors known to git

That is what the documentation says, but the code pretends as if all the
known whitespace error tokens were given.

Among the whitespace error tokens, there is one kind that loosens the rule
when set: cr-at-eol. Which means that whitespace error token that is set
to true ignores a newly introduced CR at the end, which is inconsistent
with the documentation.

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

.gitattributes: CR at the end of the line is an errorNanako Shiraishi Fri, 19 Jun 2009 10:42:53 +0000 (19:42 +0900)

.gitattributes: CR at the end of the line is an error

When a CR is accidentally added at the end of a C source file in the git
project tree, "git diff --check" doesn't detect it as an error.

$ echo abQ | tr Q '\015' >>fast-import.c
$ git diff --check

I think this is because the "whitespace" attribute is set to *.[ch] files
without specifying what kind of errors are caught. It makes git "notice
all types of errors" (as described in the documentation), but I think it
is incorrectly setting cr-at-eol, too, and hides this error.

Signed-off-by: Nanako Shiraishi <nanako3@lavabit.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>

t3505: fix abuse of test_expect_codeJunio C Hamano Sun, 21 Jun 2009 09:01:28 +0000 (02:01 -0700)

t3505: fix abuse of test_expect_code

The test wanted to make sure that cherry-pick exits with status 1,
but with the way it was placed after "git checkout master &&" meant
that it could have misjudged success if checkout barfed with the
same failure status.

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

Merge branch 'maint-1.6.2' into maintJunio C Hamano Sun, 21 Jun 2009 06:48:46 +0000 (23:48 -0700)

Merge branch 'maint-1.6.2' into maint

* maint-1.6.2:
git-show-ref.txt: remove word and make consistent
git-svn documentation: fix typo in 'rebase vs. pull/merge' section
use xstrdup, not strdup in ll-merge.c

Merge branch 'maint-1.6.1' into maint-1.6.2Junio C Hamano Sun, 21 Jun 2009 06:48:28 +0000 (23:48 -0700)

Merge branch 'maint-1.6.1' into maint-1.6.2

* maint-1.6.1:
git-show-ref.txt: remove word and make consistent
git-svn documentation: fix typo in 'rebase vs. pull/merge' section
use xstrdup, not strdup in ll-merge.c

Merge branch 'maint-1.6.0' into maint-1.6.1Junio C Hamano Sun, 21 Jun 2009 06:48:21 +0000 (23:48 -0700)

Merge branch 'maint-1.6.0' into maint-1.6.1

* maint-1.6.0:
git-show-ref.txt: remove word and make consistent
git-svn documentation: fix typo in 'rebase vs. pull/merge' section
use xstrdup, not strdup in ll-merge.c

git-show-ref.txt: remove word and make consistentStephen Boyd Sun, 21 Jun 2009 04:40:45 +0000 (21:40 -0700)

git-show-ref.txt: remove word and make consistent

Under is better than in because of the nested nature of the .git
directory.

"also using" sounds a little odd, plus we say combined with later on so
just use that.

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

git-svn documentation: fix typo in 'rebase vs. pull... Miklos Vajna Sat, 20 Jun 2009 11:27:15 +0000 (13:27 +0200)

git-svn documentation: fix typo in 'rebase vs. pull/merge' section

Signed-off-by: Miklos Vajna <vmiklos@frugalware.org>
Signed-off-by: Junio C Hamano <gitster@pobox.com>

add: allow configurations to be overriden by command... Stephen Boyd Thu, 18 Jun 2009 09:17:54 +0000 (02:17 -0700)

add: allow configurations to be overriden by command line

Don't call git_config after parsing the command line options, otherwise
the config settings will override any settings made by the command line.

This can be seen by setting add.ignore_errors and then specifying
--no-ignore-errors when using git-add.

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

http.c: fix compiling with libcurl 7.9.2Mark Lodato Mon, 15 Jun 2009 02:39:00 +0000 (22:39 -0400)

http.c: fix compiling with libcurl 7.9.2

Change the minimimum required libcurl version for the http.sslKey option
to 7.9.3. Previously, preprocessor macros checked for >= 7.9.2, which
is incorrect because CURLOPT_SSLKEY was introduced in 7.9.3. This now
allows git to compile with libcurl 7.9.2.

Signed-off-by: Mark Lodato <lodatom@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>

fetch: do not create ref from empty nameClemens Buchacher Wed, 17 Jun 2009 13:38:36 +0000 (15:38 +0200)

fetch: do not create ref from empty name

Previously, the refspec "<src>:" would be expanded to
"<src>:refs/heads/". Instead, treat an empty <dst> just like refspecs
without a colon.

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

import-tars: support symlinksJohannes Schindelin Wed, 17 Jun 2009 12:49:39 +0000 (14:49 +0200)

import-tars: support symlinks

Without this patch, symbolic links are turned into empty files.

Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de>
Signed-off-by: Junio C Hamano <gitster@pobox.com>

upload-archive: fix infinite loop on CygwinRené Scharfe Wed, 17 Jun 2009 10:11:10 +0000 (12:11 +0200)

upload-archive: fix infinite loop on Cygwin

On Cygwin, poll() reports POLLIN even for file descriptors that have
reached their end. This caused git upload-archive to be stuck in an
infinite loop, as it only looked at the POLLIN flag.

In addition to POLLIN, check if read() returned 0, which indicates
end-of-file, and keep looping only as long as at least one of the file
descriptors has input. This lets the following command finish on its
own when run in a git repository on Cygwin, instead of it getting stuck
after printing all file names:

$ git archive -v --remote . HEAD >/dev/null

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

avoid exponential regex match for java and objc functio... Paolo Bonzini Wed, 17 Jun 2009 14:26:06 +0000 (16:26 +0200)

avoid exponential regex match for java and objc function names

In the old regex

^[ \t]*(([ \t]*[A-Za-z_][A-Za-z_0-9]*){2,}[ \t]*\([^;]*)$
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^

you can backtrack arbitrarily from [A-Za-z_0-9]* into [A-Za-z_], thus
causing an exponential number of backtracks. Ironically it also causes
the regex not to work as intended; for example "catch" can match the
underlined part of the regex, the first repetition matching "c" and
the second matching "atch".

The replacement regex avoids this problem, because it makes sure that
at least a space/tab is eaten on each repetition. In other words,
a suffix of a repetition can never be a prefix of the next repetition.

Signed-off-by: Paolo Bonzini <bonzini@gnu.org>
Signed-off-by: Junio C Hamano <gitster@pobox.com>

Fix big left-shifts of unsigned charLinus Torvalds Thu, 18 Jun 2009 00:22:27 +0000 (17:22 -0700)

Fix big left-shifts of unsigned char

Shifting 'unsigned char' or 'unsigned short' left can result in sign
extension errors, since the C integer promotion rules means that the
unsigned char/short will get implicitly promoted to a signed 'int' due to
the shift (or due to other operations).

This normally doesn't matter, but if you shift things up sufficiently, it
will now set the sign bit in 'int', and a subsequent cast to a bigger type
(eg 'long' or 'unsigned long') will now sign-extend the value despite the
original expression being unsigned.

One example of this would be something like

unsigned long size;
unsigned char c;

size += c << 24;

where despite all the variables being unsigned, 'c << 24' ends up being a
signed entity, and will get sign-extended when then doing the addition in
an 'unsigned long' type.

Since git uses 'unsigned char' pointers extensively, we actually have this
bug in a couple of places.

I may have missed some, but this is the result of looking at

git grep '[^0-9 ][ ]*<<[ ][a-z]' -- '*.c' '*.h'
git grep '<<[ ]*24'

which catches at least the common byte cases (shifting variables by a
variable amount, and shifting by 24 bits).

I also grepped for just 'unsigned char' variables in general, and
converted the ones that most obviously ended up getting implicitly cast
immediately anyway (eg hash_name(), encode_85()).

In addition to just avoiding 'unsigned char', this patch also tries to use
a common idiom for the delta header size thing. We had three different
variations on it: "& 0x7fUL" in one place (getting the sign extension
right), and "& ~0x80" and "& 0x7f" in two other places (not getting it
right). Apart from making them all just avoid using "unsigned char" at
all, I also unified them to then use a simple "& 0x7f".

I considered making a sparse extension which warns about doing implicit
casts from unsigned types to signed types, but it gets rather complex very
quickly, so this is just a hack.

Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Signed-off-by: Junio C Hamano <gitster@pobox.com>

pull, rebase: simplify to use die()Stephen Boyd Sun, 14 Jun 2009 23:08:56 +0000 (16:08 -0700)

pull, rebase: simplify to use die()

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

use xstrdup, not strdup in ll-merge.cJim Meyering Sun, 14 Jun 2009 19:47:54 +0000 (21:47 +0200)

use xstrdup, not strdup in ll-merge.c

Otherwise, a fluky allocation failure would cause merge
configuration settings to be silently ignored.

Signed-off-by: Jim Meyering <meyering@redhat.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>

Merge branch 'maint-1.6.2' into maintJunio C Hamano Sun, 14 Jun 2009 00:10:08 +0000 (17:10 -0700)

Merge branch 'maint-1.6.2' into maint

* maint-1.6.2:
git-rerere.txt: grammatical fixups and cleanups

Merge branch 'maint-1.6.1' into maint-1.6.2Junio C Hamano Sun, 14 Jun 2009 00:09:50 +0000 (17:09 -0700)

Merge branch 'maint-1.6.1' into maint-1.6.2

* maint-1.6.1:
git-rerere.txt: grammatical fixups and cleanups

Merge branch 'maint-1.6.0' into maint-1.6.1Junio C Hamano Sun, 14 Jun 2009 00:09:45 +0000 (17:09 -0700)

Merge branch 'maint-1.6.0' into maint-1.6.1

* maint-1.6.0:
git-rerere.txt: grammatical fixups and cleanups
http-push.c::remove_locks(): fix use after free

git-rerere.txt: grammatical fixups and cleanupsStephen Boyd Sat, 13 Jun 2009 18:20:00 +0000 (11:20 -0700)

git-rerere.txt: grammatical fixups and cleanups

Rewrite the gc section using unresolved and resolved instead of "not
recorded". Add plurals and missing articles. Make some sentences have
consistent tense. Try and be more active by removing "that" and
simplifying sentences.

The terms "hand-resolve" and "hand resolve" were used, so just use "hand
resolve" to be more consistent.

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

Documentation: git-send-mail can take rev-list arg... Paolo Bonzini Thu, 11 Jun 2009 07:30:27 +0000 (09:30 +0200)

Documentation: git-send-mail can take rev-list arg to drive format-patch

The git-send-email docs do not mention except in the usage lines
the combined patch formatting/sending ability of git-send-email.
This patch expands on the possible arguments to git-send-email
and explains the meaning of the rev-list argument.

Signed-off-by: Paolo Bonzini <bonzini@gnu.org>
Signed-off-by: Junio C Hamano <gitster@pobox.com>

Merge branch 'uk/maint-1.5.3-rebase-i-reflog' into... Junio C Hamano Thu, 11 Jun 2009 21:14:00 +0000 (14:14 -0700)

Merge branch 'uk/maint-1.5.3-rebase-i-reflog' into maint

* uk/maint-1.5.3-rebase-i-reflog:
rebase--interactive: remote stray closing parenthesis

Conflicts:
git-rebase--interactive.sh

rebase--interactive: remote stray closing parenthesisUwe Kleine-König Thu, 11 Jun 2009 20:27:55 +0000 (22:27 +0200)

rebase--interactive: remote stray closing parenthesis

it was introduced in 68a163c9b483ae352fcfee8c4505d113213daa73

Signed-off-by: Uwe Kleine-König <u.kleine-koenig@pengutronix.de>
Cc: Jöhännës "Dschö" Schindëlin <johannes.schindelin@gmx.de>
Signed-off-by: Junio C Hamano <gitster@pobox.com>

diff.c: plug a memory leak in an error pathJohannes Sixt Mon, 8 Jun 2009 20:34:30 +0000 (22:34 +0200)

diff.c: plug a memory leak in an error path

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

fetch-pack: close output channel after sideband demulti... Johannes Sixt Mon, 8 Jun 2009 08:51:22 +0000 (10:51 +0200)

fetch-pack: close output channel after sideband demultiplexer terminates

fetch-pack runs the sideband demultiplexer using start_async(). This
facility requires that the asynchronously executed function closes the
output file descriptor (see Documentation/technical/api-run-command.txt).
But the sideband demultiplexer did not do that. This fixes it.

In certain error situations this could lock up a fetch operation on
Windows because the asynchronous function is run in a thread; by not
closing the output fd the reading end never got EOF and waited for more
data indefinitely. On Unix this is not a problem because the asynchronous
function is run in a separate process, which exits after the function ends
and so implicitly closes the output.

Since the pack that is sent over the wire encodes the number of objects in
the stream, during normal operation the reading end knows when the stream
ends and terminates by itself, and does not lock up.

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

fix handling of iconv configuration optionsMarco Nelissen Tue, 9 Jun 2009 03:46:38 +0000 (20:46 -0700)

fix handling of iconv configuration options

Fix the way in which the configure script handles --without-iconv
(and --with-iconv=no), which it used to essentially ignore.
Also fix the way the configure script determines the value of
NEEDS_LIBICONV, which would be incorrectly set to 'YesPlease' on
systems that lack iconv entirely.

Signed-off-by: Marco Nelissen <marcone@xs4all.nl>
Signed-off-by: Junio C Hamano <gitster@pobox.com>

builtin-remote: Make "remote show" display all urlsMichael J Gruber Sat, 6 Jun 2009 15:16:30 +0000 (17:16 +0200)

builtin-remote: Make "remote show" display all urls

Currently, "git remote -v" lists all urls whereas "git remote show
$remote" shows only the first. Make it so that both show all.

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

Documentation: refer to gitworkflows(7) from tutorial... Thomas Rast Sat, 6 Jun 2009 13:11:07 +0000 (15:11 +0200)

Documentation: refer to gitworkflows(7) from tutorial and git(1)

Add references to the gitworkflows(7) manpage added in f948dd8
(Documentation: add manpage about workflows, 2008-10-19) to both
gittutorial(1) and git(1), so that new users might actually discover
and read it.

Noticed by Randal L. Schwartz.

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

daemon: Strictly parse the "extra arg" part of the... Shawn O. Pearce Fri, 5 Jun 2009 01:33:32 +0000 (18:33 -0700)

daemon: Strictly parse the "extra arg" part of the command

Since 1.4.4.5 (49ba83fb67 "Add virtualization support to git-daemon")
git daemon enters an infinite loop and never terminates if a client
hides any extra arguments in the initial request line which is not
exactly "\0host=blah\0".

Since that change, a client must never insert additional extra
arguments, or attempt to use any argument other than "host=", as
any daemon will get stuck parsing the request line and will never
complete the request.

Since the client can't tell if the daemon is patched or not, it
is not possible to know if additional extra args might actually be
able to be safely requested.

If we ever need to extend the git daemon protocol to support a new
feature, we may have to do something like this to the exchange:

# If both support git:// v2
#
C: 000cgit://v2
S: 0010ok host user
C: 0018host git.kernel.org
C: 0027git-upload-pack /pub/linux-2.6.git
S: ...git-upload-pack header...

# If client supports git:// v2, server does not:
#
C: 000cgit://v2
S: <EOF>

C: 003bgit-upload-pack /pub/linux-2.6.git\0host=git.kernel.org\0
S: ...git-upload-pack header...

This requires the client to create two TCP connections to talk to
an older git daemon, however all daemons since the introduction of
daemon.c will safely reject the unknown "git://v2" command request,
so the client can quite easily determine the server supports an
older protocol.

Signed-off-by: Shawn O. Pearce <spearce@spearce.org>
Signed-off-by: Junio C Hamano <gitster@pobox.com>

http*: cleanup slot->local after fcloseTay Ray Chuan Sat, 6 Jun 2009 08:43:26 +0000 (16:43 +0800)

http*: cleanup slot->local after fclose

Set slot->local to NULL after doing a fclose() on the file it points
to. This prevents the passing of a FILE* pointer to a fclose()'d file
to ftell() in http.c::run_active_slot().

This issue was raised by Clemens Buchacher on 30th May 2009:

http://www.spinics.net/lists/git/msg104623.html

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

GIT 1.6.3.2 v1.6.3.2Junio C Hamano Thu, 4 Jun 2009 05:42:15 +0000 (22:42 -0700)

GIT 1.6.3.2

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

grep: fix empty word-regexp matchesRené Scharfe Wed, 3 Jun 2009 16:19:01 +0000 (18:19 +0200)

grep: fix empty word-regexp matches

The command "git grep -w ''" dies as soon as it encounters an empty line,
reporting (wrongly) that "regexp returned nonsense". The first hunk of
this patch relaxes the sanity check that is responsible for that,
allowing matches to start at the end.

The second hunk complements it by making sure that empty matches are
rejected if -w was specified, as they are not really words.

GNU grep does the same:

$ echo foo | grep -c ''
1
$ echo foo | grep -c -w ''
0

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

blame: correctly handle a path that used to be a directoryJunio C Hamano Wed, 3 Jun 2009 07:43:22 +0000 (00:43 -0700)

blame: correctly handle a path that used to be a directory

When trying to see if the same path exists in the parent, we ran
"diff-tree" with pathspec set to the path we are interested in with the
parent, and expect either to have exactly one resulting filepair (either
"changed from the parent", "created when there was none") or nothing (when
there is no change from the parent).

If the path used to be a directory, however, we will also see unbounded
number of entries that talk about the files that used to exist underneath
the directory in question. Correctly pick only the entry that describes
the path we are interested in in such a case (namely, the creation of the
path as a regular file).

Noticed by Ben Willard.

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

add -i: do not dump patch during applicationThomas Rast Tue, 2 Jun 2009 21:34:27 +0000 (23:34 +0200)

add -i: do not dump patch during application

Remove a debugging print that snuck in at 7a26e65 (Revert
"git-add--interactive: remove hunk coalescing", 2009-05-16).

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

Update draft release notes for 1.6.3.2Junio C Hamano Tue, 2 Jun 2009 14:57:39 +0000 (07:57 -0700)

Update draft release notes for 1.6.3.2

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

Merge branch 'cb/maint-1.6.0-xdl-merge-fix' into maintJunio C Hamano Tue, 2 Jun 2009 14:48:44 +0000 (07:48 -0700)

Merge branch 'cb/maint-1.6.0-xdl-merge-fix' into maint

* cb/maint-1.6.0-xdl-merge-fix:
Change xdl_merge to generate output even for null merges
t6023: merge-file fails to output anything for a degenerate merge

Conflicts:
xdiff/xmerge.c

Merge branch 'rs/maint-grep-word-regexp-fix' into maintJunio C Hamano Tue, 2 Jun 2009 14:48:09 +0000 (07:48 -0700)

Merge branch 'rs/maint-grep-word-regexp-fix' into maint

* rs/maint-grep-word-regexp-fix:
grep: fix colouring of matches with zero length
grep: fix word-regexp at the beginning of lines

Merge branch 'sb/maint-1.6.2-opt-filename-fix' into... Junio C Hamano Tue, 2 Jun 2009 14:47:03 +0000 (07:47 -0700)

Merge branch 'sb/maint-1.6.2-opt-filename-fix' into maint

* sb/maint-1.6.2-opt-filename-fix:
apply, fmt-merge-msg: use relative filenames
commit: -F overrides -t

Merge branch 'jc/maint-add-p-coalesce-fix' into maintJunio C Hamano Tue, 2 Jun 2009 14:46:52 +0000 (07:46 -0700)

Merge branch 'jc/maint-add-p-coalesce-fix' into maint

* jc/maint-add-p-coalesce-fix:
t3701: ensure correctly set up repository after skipped tests
Revert "git-add--interactive: remove hunk coalescing"
Splitting a hunk that adds a line at the top fails in "add -p"

Merge branch 'tr/maint-doc-stash-pop' into maintJunio C Hamano Tue, 2 Jun 2009 14:43:45 +0000 (07:43 -0700)

Merge branch 'tr/maint-doc-stash-pop' into maint

* tr/maint-doc-stash-pop:
Documentation: teach stash/pop workflow instead of stash/apply

grep: fix colouring of matches with zero lengthRené Scharfe Mon, 1 Jun 2009 21:53:05 +0000 (23:53 +0200)

grep: fix colouring of matches with zero length

If a zero-length match is encountered, break out of loop and show the rest
of the line uncoloured. Otherwise we'd be looping forever, trying to make
progress by advancing the pointer by zero characters.

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

refuse to merge during a mergeClemens Buchacher Mon, 1 Jun 2009 09:20:56 +0000 (11:20 +0200)

refuse to merge during a merge

The following is an easy mistake to make for users coming from version
control systems with an "update and commit"-style workflow.

1. git pull
2. resolve conflicts
3. git pull

Step 3 overrides MERGE_HEAD, starting a new merge with dirty index.
IOW, probably not what the user intended. Instead, refuse to merge
again if a merge is in progress.

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

for-each-ref: Do not lookup objects when they will... Anders Kaseorg Wed, 27 May 2009 19:23:12 +0000 (15:23 -0400)

for-each-ref: Do not lookup objects when they will not be used

This makes commands such as `git for-each-ref --format='%(refname)'`,
which are used heavily by the bash_completion code, run about 6 times
faster on an uncached repository (3 s intead of 18 s on my linux-2.6
repository with several remotes).

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

Documentation: teach stash/pop workflow instead of... Thomas Rast Thu, 28 May 2009 09:40:15 +0000 (11:40 +0200)

Documentation: teach stash/pop workflow instead of stash/apply

Recent discussion on the list showed some comments in favour of a
stash/pop workflow:

http://marc.info/?l=git&m=124234911423358&w=2
http://marc.info/?l=git&m=124235348327711&w=2

Change the stash documentation and examples to document pop in its own
right (and apply in terms of pop), and use stash/pop in the examples.

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