git.git
12 years agot9402: Rename check.cvsCount and check.list
Torsten Bögershausen [Sat, 8 Dec 2012 21:35:39 +0000 (22:35 +0100)]
t9402: Rename check.cvsCount and check.list

Checking and comparing the number of line in check.list and check.cvsCount
had been replaced by comparing both files line by line.
Rename the filenames to make clear which is expected and which is actual:
check.list    -> list.expected
check.cvsCount-> list.actual

Signed-off-by: Torsten Bögershausen <tboegi@web.de>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
12 years agot9402: Simplify git ls-tree
Torsten Bögershausen [Sat, 8 Dec 2012 21:35:06 +0000 (22:35 +0100)]
t9402: Simplify git ls-tree

Use "git ls-tree --name-only" which does not need a sed to filter out the sha

Signed-off-by: Torsten Bögershausen <tboegi@web.de>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
12 years agot9402: Add missing &&; Code style
Torsten Bögershausen [Sat, 8 Dec 2012 21:34:55 +0000 (22:34 +0100)]
t9402: Add missing &&; Code style

Add missing && at 2 places
Re-formated the sub-shell parantheses (coding style)
Added missing ] in the test_expect_success header at 2 places

Signed-off-by: Torsten Bögershausen <tboegi@web.de>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
12 years agot9402: No space after IO-redirection
Torsten Bögershausen [Sat, 8 Dec 2012 21:34:38 +0000 (22:34 +0100)]
t9402: No space after IO-redirection

Redirection should not have SP before the filename
(i.e. ">out", not "> out").

Signed-off-by: Torsten Bögershausen <tboegi@web.de>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
12 years agot9402: Dont use test_must_fail cvs
Torsten Bögershausen [Sat, 8 Dec 2012 21:34:15 +0000 (22:34 +0100)]
t9402: Dont use test_must_fail cvs

Replace "test_must_fail cvs" with "! cvs"

Signed-off-by: Torsten Bögershausen <tboegi@web.de>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
12 years agot9402: improve check_end_tree() and check_end_full_tree()
Torsten Bögershausen [Sat, 8 Dec 2012 21:33:55 +0000 (22:33 +0100)]
t9402: improve check_end_tree() and check_end_full_tree()

check_end_tree():
- Instead of counting lines using wc in expectCount and cvsCount:
   Sort and compare the files byte by byte with test_cmp,
   which is more exact and easier to debug
- Chain all shell comands together using &&

check_end_full_tree()
- Instead of counting lines using wc in expectCount, cvsCount and gitCount:
   Sort and compare the files byte by byte with test_cmp,
   which is more exact and easier to debug
- Break the test using two conditions anded together with -a
  into to call to test_cmp
- Chain all shell comands together using &&

Signed-off-by: Torsten Bögershausen <tboegi@web.de>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
12 years agot9402: sed -i is not portable
Torsten Bögershausen [Sat, 8 Dec 2012 21:33:38 +0000 (22:33 +0100)]
t9402: sed -i is not portable

On some systems sed allows the usage of e.g.
sed -i -e "s/line1/line2/" afile
to edit the file "in place".
Other systems don't allow that: one observed behaviour is that
sed -i -e "s/line1/line2/" afile
creates a backup file called afile-e, which breaks the test.
As sed -i is not part of POSIX, avoid it.

Signed-off-by: Torsten Bögershausen <tboegi@web.de>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
12 years agocvsserver Documentation: new cvs ... -r support
Matthew Ogilvie [Sun, 14 Oct 2012 05:42:33 +0000 (23:42 -0600)]
cvsserver Documentation: new cvs ... -r support

Signed-off-by: Matthew Ogilvie <mmogilvi_git@miniinfo.net>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
12 years agocvsserver: add t9402 to test branch and tag refs
Matthew Ogilvie [Sun, 14 Oct 2012 05:42:32 +0000 (23:42 -0600)]
cvsserver: add t9402 to test branch and tag refs

Signed-off-by: Matthew Ogilvie <mmogilvi_git@miniinfo.net>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
12 years agocvsserver: support -r and sticky tags for most operations
Matthew Ogilvie [Sun, 14 Oct 2012 05:42:31 +0000 (23:42 -0600)]
cvsserver: support -r and sticky tags for most operations

  - Split off prepDirForOutput for "update" and "commit".
    Some low level protocol details were changed to more closely
    resemble CVS even in non-tagged cases.  Hopefully it still works
    with finicky clients like Eclipse.
  - Substantial changes to "diff".  The output is now closer to
    standard CVS (including exit status), and can be used as
    a patch, but there are still a number of differences compared
    to CVS.
  - Tweaks to "add", "remove", "status", and "commit".
  - FUTURE: CVS revision numbers for branches simply encode git
    commit IDs in a way that resembles CVS revision numbers,
    dropping all normal CVS structural relations between different
    revision numbers.
  - FUTURE: "log" doesn't try to work properly at all with branches
    and tags.
  - FUTURE: "annotate" probably doesn't work with branches or
    tags either (untested)?

Signed-off-by: Matthew Ogilvie <mmogilvi_git@miniinfo.net>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
12 years agocvsserver: Add version awareness to argsfromdir
Matthew Ogilvie [Sun, 14 Oct 2012 05:42:30 +0000 (23:42 -0600)]
cvsserver: Add version awareness to argsfromdir

Signed-off-by: Matthew Ogilvie <mmogilvi_git@miniinfo.net>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
12 years agocvsserver: generalize getmeta() to recognize commit refs
Matthew Ogilvie [Sun, 14 Oct 2012 05:42:29 +0000 (23:42 -0600)]
cvsserver: generalize getmeta() to recognize commit refs

This allows getmeta() to recognize any commitish (sha1,
tag/branch name, etc).

Signed-off-by: Matthew Ogilvie <mmogilvi_git@miniinfo.net>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
12 years agocvsserver: implement req_Sticky and related utilities
Matthew Ogilvie [Sun, 14 Oct 2012 05:42:28 +0000 (23:42 -0600)]
cvsserver: implement req_Sticky and related utilities

Nothing sets sticky yet, or uses the values set by this, but soon...

Signed-off-by: Matthew Ogilvie <mmogilvi_git@miniinfo.net>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
12 years agocvsserver: add misc commit lookup, file meta data, and file listing functions
Matthew Ogilvie [Sun, 14 Oct 2012 05:42:27 +0000 (23:42 -0600)]
cvsserver: add misc commit lookup, file meta data, and file listing functions

These will be used soon, but not yet.

PERFORMANCE NOTE: getMetaFromCommithash() does not scale well as currently
implemented.  See comment for possible optimization strategies.
Fortunately, it will only be used in cases that would not have worked
at all before this change.

Signed-off-by: Matthew Ogilvie <mmogilvi_git@miniinfo.net>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
12 years agocvsserver: define a tag name character escape mechanism
Matthew Ogilvie [Sun, 14 Oct 2012 05:42:26 +0000 (23:42 -0600)]
cvsserver: define a tag name character escape mechanism

CVS tags are officially only allowed to use [-_0-9A-Za-f].  Git
refs commonly uses other characters, especially [./].  Such characters
need to be escaped from CVS in order to be referenced.

This just defines functions to escape/unescape names.  The functions
are not used yet.

Signed-off-by: Matthew Ogilvie <mmogilvi_git@miniinfo.net>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
12 years agocvsserver: cleanup extra slashes in filename arguments
Matthew Ogilvie [Sun, 14 Oct 2012 05:42:25 +0000 (23:42 -0600)]
cvsserver: cleanup extra slashes in filename arguments

Signed-off-by: Matthew Ogilvie <mmogilvi_git@miniinfo.net>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
12 years agocvsserver: factor out git-log parsing logic
Matthew Ogilvie [Sun, 14 Oct 2012 05:42:24 +0000 (23:42 -0600)]
cvsserver: factor out git-log parsing logic

Some field conversion was already duplicated, and more calls will
be added soon.

Signed-off-by: Matthew Ogilvie <mmogilvi_git@miniinfo.net>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
12 years agocvsserver status: provide real sticky info
Matthew Ogilvie [Sun, 14 Oct 2012 05:42:23 +0000 (23:42 -0600)]
cvsserver status: provide real sticky info

Signed-off-by: Matthew Ogilvie <mmogilvi_git@miniinfo.net>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
12 years agocvsserver: cvs add: do not expand directory arguments
Matthew Ogilvie [Sun, 14 Oct 2012 05:42:22 +0000 (23:42 -0600)]
cvsserver: cvs add: do not expand directory arguments

Standard "cvs add" never does any recursion.  With standard
cvs, "cvs add dir" will either add just the "dir" to
the repository, or error out.  Prior to this change, git-cvsserver
would try to recurse (perhaps re-adding sandbox-removed files?) into
the existing directory instead.

Signed-off-by: Matthew Ogilvie <mmogilvi_git@miniinfo.net>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
12 years agocvsserver: use whole CVS rev number in-process; don't strip "1." prefix
Matthew Ogilvie [Sun, 14 Oct 2012 05:42:21 +0000 (23:42 -0600)]
cvsserver: use whole CVS rev number in-process; don't strip "1." prefix

Keep track of the whole CVS revision number in-process.  This will
clarify code when we start handling non-linear revision numbers later.

There is one externally visible change: conflict markers after
an update will now include the full CVS revision number,
including the "1." prefix.  It used to leave off the prefix.

Other than the conflict marker, this change doesn't effect
external functionality.  No new features, and the DB schema
is unchanged such that it continues to store just
the stripped rev numbers (without prefix).

Signed-off-by: Matthew Ogilvie <mmogilvi_git@miniinfo.net>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
12 years agocvsserver: split up long lines in req_{status,diff,log}
Matthew Ogilvie [Sun, 14 Oct 2012 05:42:20 +0000 (23:42 -0600)]
cvsserver: split up long lines in req_{status,diff,log}

Signed-off-by: Matthew Ogilvie <mmogilvi_git@miniinfo.net>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
12 years agocvsserver: clean up client request handler map comments
Matthew Ogilvie [Sun, 14 Oct 2012 05:42:19 +0000 (23:42 -0600)]
cvsserver: clean up client request handler map comments

  - Comment that it should not be considered a complete list.
  - #'annotate' comment  - Uncommented annotate line is 2 lines earlier.

Signed-off-by: Matthew Ogilvie <mmogilvi_git@miniinfo.net>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
12 years agocvsserver: remove unused functions _headrev and gethistory
Matthew Ogilvie [Sun, 14 Oct 2012 05:42:18 +0000 (23:42 -0600)]
cvsserver: remove unused functions _headrev and gethistory

Remove:
   - _headrev() - It uses similar functionality from getmeta() and gethead().
   - gethistory() - It uses similar functions gethistorydense() and getlog().

Signed-off-by: Matthew Ogilvie <mmogilvi_git@miniinfo.net>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
12 years agocvsserver update: comment about how we shouldn't remove a user-modified file
Matthew Ogilvie [Sun, 14 Oct 2012 05:42:17 +0000 (23:42 -0600)]
cvsserver update: comment about how we shouldn't remove a user-modified file

Instead of a comment, we should really add test cases and actually fix it.

Signed-off-by: Matthew Ogilvie <mmogilvi_git@miniinfo.net>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
12 years agocvsserver: add comments about database schema/usage
Matthew Ogilvie [Sun, 14 Oct 2012 05:42:16 +0000 (23:42 -0600)]
cvsserver: add comments about database schema/usage

No functionality changes, but these comments should make it easier to
understand how it works.

Signed-off-by: Matthew Ogilvie <mmogilvi_git@miniinfo.net>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
12 years agocvsserver: removed unused sha1Or-k mode from kopts_from_path
Matthew Ogilvie [Sun, 14 Oct 2012 05:42:15 +0000 (23:42 -0600)]
cvsserver: removed unused sha1Or-k mode from kopts_from_path

sha1Or-k was a vestige from an early, never-released
attempt to handle some oddball cases of CRLF conversion (-k option).
Ultimately it wasn't needed, and I should have gotten rid of it
before submitting the CRLF patch in the first place.

See also 90948a42892779 (add ability to guess -kb from contents).

Signed-off-by: Matthew Ogilvie <mmogilvi_git@miniinfo.net>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
12 years agocvsserver t9400: add basic 'cvs log' test
Matthew Ogilvie [Sun, 14 Oct 2012 05:42:14 +0000 (23:42 -0600)]
cvsserver t9400: add basic 'cvs log' test

'cvs log' output is arguably deficient in a number of ways
(see the comment added with the test), but add a test for
the current output to detect for accidental regressions.

Signed-off-by: Matthew Ogilvie <mmogilvi_git@miniinfo.net>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
12 years agoDocumentation/RelNotes: remove "updated up to this revision" markers
Thomas Ackermann [Tue, 16 Oct 2012 17:26:23 +0000 (19:26 +0200)]
Documentation/RelNotes: remove "updated up to this revision" markers

These were used to keep track of the last commit a release notes
entry was written for, and should have been removed when cutting
the final release.

Signed-off-by: Thomas Ackermann <th.acker@arcor.de>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
12 years agoUpdate draft release notes to 1.8.0
Junio C Hamano [Tue, 16 Oct 2012 20:27:23 +0000 (13:27 -0700)]
Update draft release notes to 1.8.0

We are almost there...

Signed-off-by: Junio C Hamano <gitster@pobox.com>
12 years agoMerge branch 'jk/maint-http-half-auth-push'
Junio C Hamano [Tue, 16 Oct 2012 18:44:37 +0000 (11:44 -0700)]
Merge branch 'jk/maint-http-half-auth-push'

Fixes a regression in maint-1.7.11 (v1.7.11.7), maint (v1.7.12.1)
and master (v1.8.0-rc0).

* jk/maint-http-half-auth-push:
  http: fix segfault in handle_curl_result

12 years agol10n: Update git.pot (3 new, 6 removed messages)
Jiang Xin [Tue, 16 Oct 2012 00:39:10 +0000 (08:39 +0800)]
l10n: Update git.pot (3 new, 6 removed messages)

This po/git.pot update is generated from v1.8.0-rc2-4-g42e55.

Signed-off-by: Jiang Xin <worldhello.net@gmail.com>
12 years agoMerge branch 'master' of git://github.com/vnwildman/git
Jiang Xin [Tue, 16 Oct 2012 00:31:22 +0000 (08:31 +0800)]
Merge branch 'master' of git://github.com/vnwildman/git

* 'master' of git://github.com/vnwildman/git:
  l10n: vi.po: update translation upto cc76011

12 years agol10n: vi.po: update translation upto cc76011
Tran Ngoc Quan [Mon, 15 Oct 2012 07:35:49 +0000 (14:35 +0700)]
l10n: vi.po: update translation upto cc76011

* translate all new messages (100%)
* review some others

Signed-off-by: Tran Ngoc Quan <vnwildman@gmail.com>
12 years agoMerge branch 'maint'
Junio C Hamano [Sun, 14 Oct 2012 06:05:54 +0000 (23:05 -0700)]
Merge branch 'maint'

* maint:
  Fix spelling error in post-receive-email hook

12 years agoFix spelling error in post-receive-email hook
Richard Fearn [Sat, 13 Oct 2012 22:32:50 +0000 (23:32 +0100)]
Fix spelling error in post-receive-email hook

Signed-off-by: Richard Fearn <richardfearn@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
12 years agoMerge branch 'maint'
Junio C Hamano [Fri, 12 Oct 2012 18:36:06 +0000 (11:36 -0700)]
Merge branch 'maint'

* maint:
  gitweb.cgi: fix "comitter_tz" typo in feed

12 years agohttp: fix segfault in handle_curl_result
Jeff King [Fri, 12 Oct 2012 06:22:49 +0000 (02:22 -0400)]
http: fix segfault in handle_curl_result

When we create an http active_request_slot, we can set its
"results" pointer back to local storage. The http code will
fill in the details of how the request went, and we can
access those details even after the slot has been cleaned
up.

Commit 8809703 (http: factor out http error code handling)
switched us from accessing our local results struct directly
to accessing it via the "results" pointer of the slot. That
means we're accessing the slot after it has been marked as
finished, defeating the whole purpose of keeping the results
storage separate.

Most of the time this doesn't matter, as finishing the slot
does not actually clean up the pointer. However, when using
curl's multi interface with the dumb-http revision walker,
we might actually start a new request before handing control
back to the original caller. In that case, we may reuse the
slot, zeroing its results pointer, and leading the original
caller to segfault while looking for its results inside the
slot.

Instead, we need to pass a pointer to our local results
storage to the handle_curl_result function, rather than
relying on the pointer in the slot struct. This matches what
the original code did before the refactoring (which did not
use a separate function, and therefore just accessed the
results struct directly).

Signed-off-by: Jeff King <peff@peff.net>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
12 years agogitweb.cgi: fix "comitter_tz" typo in feed
Dylan Alex Simon [Thu, 11 Oct 2012 20:40:35 +0000 (16:40 -0400)]
gitweb.cgi: fix "comitter_tz" typo in feed

gitweb's feeds sometimes contained committer timestamps in the wrong timezone
due to a misspelling.

Signed-off-by: Dylan Simon <dylan@dylex.net>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
12 years agoGit 1.8.0-rc2 v1.8.0-rc2
Junio C Hamano [Thu, 11 Oct 2012 18:18:56 +0000 (11:18 -0700)]
Git 1.8.0-rc2

Signed-off-by: Junio C Hamano <gitster@pobox.com>
12 years agoMerge branch 'rr/git-uri-doc'
Junio C Hamano [Wed, 10 Oct 2012 21:57:26 +0000 (14:57 -0700)]
Merge branch 'rr/git-uri-doc'

* rr/git-uri-doc:
  Git url doc: mark ftp/ftps as read-only and deprecate them

12 years agoMerge branch 'bw/cp-a-is-gnuism'
Junio C Hamano [Wed, 10 Oct 2012 21:57:09 +0000 (14:57 -0700)]
Merge branch 'bw/cp-a-is-gnuism'

* bw/cp-a-is-gnuism:
  tests: "cp -a" is a GNUism

12 years agoMerge branch 'nd/doc-ignore'
Junio C Hamano [Wed, 10 Oct 2012 21:57:02 +0000 (14:57 -0700)]
Merge branch 'nd/doc-ignore'

* nd/doc-ignore:
  gitignore.txt: suggestions how to get literal # or ! at the beginning

12 years agoMerge branch 'jc/doc-long-options'
Junio C Hamano [Wed, 10 Oct 2012 21:56:52 +0000 (14:56 -0700)]
Merge branch 'jc/doc-long-options'

* jc/doc-long-options:
  gitcli: parse-options lets you omit tail of long options

12 years agoSync with maint
Junio C Hamano [Wed, 10 Oct 2012 21:54:25 +0000 (14:54 -0700)]
Sync with maint

* maint:
  attr: a note about the order of .gitattributes lookup

12 years agoMerge git://bogomips.org/git-svn
Junio C Hamano [Wed, 10 Oct 2012 20:53:56 +0000 (13:53 -0700)]
Merge git://bogomips.org/git-svn

* git://bogomips.org/git-svn:
  svn test: escape peg revision separator using empty peg rev
  git svn: work around SVN 1.7 mishandling of svn:special changes

12 years agosvn test: escape peg revision separator using empty peg rev
Jonathan Nieder [Tue, 9 Oct 2012 08:41:45 +0000 (01:41 -0700)]
svn test: escape peg revision separator using empty peg rev

This test script uses "svn cp" to create a branch with an @-sign in
its name:

svn cp "pr ject/trunk" "pr ject/branches/not-a@{0}reflog"

That sets up for later tests that fetch the branch and check that git
svn mangles the refname appropriately.

Unfortunately, modern svn versions interpret path arguments with an
@-sign as an example of path@revision syntax (which pegs a path to a
particular revision) and truncate the path or error out with message
"svn: E205000: Syntax error parsing peg revision '{0}reflog'".

When using subversion 1.6.x, escaping the @ sign as %40 avoids trouble
(see 08fd28bb, 2010-07-08).  Newer versions are stricter:

$ svn cp "$repo/pr ject/trunk" "$repo/pr ject/branches/not-a%40{reflog}"
svn: E205000: Syntax error parsing peg revision '%7B0%7Dreflog'

The recommended method for escaping a literal @ sign in a path passed
to subversion is to add an empty peg revision at the end of the path
("branches/not-a@{0}reflog@").  Do that.

Pre-1.6.12 versions of Subversion probably treat the trailing @ as
another literal @-sign (svn issue 3651).  Luckily ever since
v1.8.0-rc0~155^2~7 (t9118: workaround inconsistency between SVN
versions, 2012-07-28) the test can survive that.

Tested with Debian Subversion 1.6.12dfsg-6 and 1.7.5-1 and r1395837
of Subversion trunk (1.8.x).

Signed-off-by: Jonathan Nieder <jrnieder@gmail.com>
Tested-by: Michael J Gruber <git@drmicha.warpmail.net>
Signed-off-by: Eric Wong <normalperson@yhbt.net>
12 years agogit svn: work around SVN 1.7 mishandling of svn:special changes
Jonathan Nieder [Tue, 9 Oct 2012 10:12:39 +0000 (03:12 -0700)]
git svn: work around SVN 1.7 mishandling of svn:special changes

Subversion represents symlinks as ordinary files with content starting
with "link " and the svn:special property set to "*".  Thus a file can
switch between being a symlink and a non-symlink simply by toggling
its svn:special property, and new checkouts will automatically write a
file of the appropriate type.  Likewise, in subversion 1.6 and older,
running "svn update" would notice changes in filetype and update the
working copy appropriately.

Starting in subversion 1.7 (issue 4091), changes to the svn:special
property trip an assertion instead:

$ svn up svn-tree
Updating 'svn-tree':
svn: E235000: In file 'subversion/libsvn_wc/update_editor.c' \
line 1583: assertion failed (action == svn_wc_conflict_action_edit \
|| action == svn_wc_conflict_action_delete || action == \
svn_wc_conflict_action_replace)

Revisions prepared with ordinary svn commands ("svn add" and not "svn
propset") don't trip this because they represent these filetype
changes using a replace operation, which is approximately equivalent
to removal followed by adding a new file and works fine.  Follow suit.

Noticed using t9100.  After this change, git-svn's file-to-symlink
changes are sent in a format that modern "svn update" can handle and
tests t9100.11-13 pass again.

[ew: s,git-svn\.perl,perl/Git/SVN/Editor.pm,g]

Signed-off-by: Jonathan Nieder <jrnieder@gmail.com>
Signed-off-by: Eric Wong <normalperson@yhbt.net>
12 years agoMALLOC_CHECK: Allow checking to be disabled from config.mak
Ramsay Jones [Sat, 6 Oct 2012 17:33:08 +0000 (18:33 +0100)]
MALLOC_CHECK: Allow checking to be disabled from config.mak

The malloc checks can be disabled using the TEST_NO_MALLOC_CHECK
variable, either from the environment or command line of an
'make test' invocation. In order to allow the malloc checks to be
disabled from the 'config.mak' file, we add TEST_NO_MALLOC_CHECK
to the environment using an export directive.

Signed-off-by: Ramsay Jones <ramsay@ramsay1.demon.co.uk>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
12 years agoattr: a note about the order of .gitattributes lookup
Nguyen Thai Ngoc Duy [Wed, 10 Oct 2012 13:55:52 +0000 (20:55 +0700)]
attr: a note about the order of .gitattributes lookup

This is the documentation part of

1a9d7e9 (attr.c: read .gitattributes from index as well. - 2007-08-14)
06f33c1 (Read attributes from the index that is being checked out - 2009-03-13)

Signed-off-by: Nguyễn Thái Ngọc Duy <pclouds@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
12 years agoMerge branch 'maint'
Junio C Hamano [Tue, 9 Oct 2012 21:23:45 +0000 (14:23 -0700)]
Merge branch 'maint'

* maint:
  l10n: de.po: fix a few minor typos

12 years agoconfigure.ac: Add missing comma to CC_LD_DYNPATH
Øyvind A. Holm [Tue, 9 Oct 2012 14:26:11 +0000 (16:26 +0200)]
configure.ac: Add missing comma to CC_LD_DYNPATH

40bfbde ("build: don't duplicate substitution of make variables",
2012-09-11) by mistake removed a necessary comma at the end of
"CC_LD_DYNPATH=-Wl,rpath," in line 414.

When executing "./configure --with-zlib=PATH", this resulted in

      [...]
      CC xdiff/xhistogram.o
      AR xdiff/lib.a
      LINK git-credential-store
  /usr/bin/ld: bad -rpath option
  collect2: ld returned 1 exit status
  make: *** [git-credential-store] Error 1
  $

during make.

Signed-off-by: Øyvind A. Holm <sunny@sunbase.org>
Acked-by: Stefano Lattarini <stefano.lattarini@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
12 years agoMerge branch 'maint' of git://github.com/git-l10n/git-po into maint
Junio C Hamano [Tue, 9 Oct 2012 18:48:53 +0000 (11:48 -0700)]
Merge branch 'maint' of git://github.com/git-l10n/git-po into maint

* 'maint' of git://github.com/git-l10n/git-po:
  l10n: de.po: fix a few minor typos

12 years agotests: "cp -a" is a GNUism
Ben Walton [Mon, 8 Oct 2012 08:08:01 +0000 (09:08 +0100)]
tests: "cp -a" is a GNUism

These tests just want a bit-for-bit identical copy; they do not need
even -H (there is no symbolic link involved) nor -p (there is no
funny permission or ownership issues involved).

Just use "cp -R" instead.

Signed-off-by: Ben Walton <bdwalton@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
12 years agoGit url doc: mark ftp/ftps as read-only and deprecate them
Ramkumar Ramachandra [Mon, 8 Oct 2012 17:26:53 +0000 (10:26 -0700)]
Git url doc: mark ftp/ftps as read-only and deprecate them

It is not even worth mentioning their removal; just discourage
people from using them.

Signed-off-by: Ramkumar Ramachandra <artagnon@gmail.com>
Reviewed-by: Jonathan Nieder <jrnieder@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
12 years agoGit 1.8.0-rc1 v1.8.0-rc1
Junio C Hamano [Mon, 8 Oct 2012 18:45:41 +0000 (11:45 -0700)]
Git 1.8.0-rc1

Signed-off-by: Junio C Hamano <gitster@pobox.com>
12 years agoMerge branch 'jc/maint-t1450-fsck-order-fix'
Junio C Hamano [Mon, 8 Oct 2012 18:43:10 +0000 (11:43 -0700)]
Merge branch 'jc/maint-t1450-fsck-order-fix'

The fsck test assumed too much on what kind of error it will
detect. The only important thing is the inconsistency is detected
as an error.

* jc/maint-t1450-fsck-order-fix:
  t1450: the order the objects are checked is undefined

12 years agoMerge branch 'jc/merge-bases-paint-fix'
Junio C Hamano [Mon, 8 Oct 2012 18:42:15 +0000 (11:42 -0700)]
Merge branch 'jc/merge-bases-paint-fix'

"git fmt-merge-msg" (an internal helper reduce_heads() it uses) had
a severe performance regression; an empty "git pull" took forever to
finish as the result.

* jc/merge-bases-paint-fix:
  paint_down_to_common(): parse commit before relying on its timestamp

12 years agoSync with 1.7.12.3
Junio C Hamano [Mon, 8 Oct 2012 18:41:21 +0000 (11:41 -0700)]
Sync with 1.7.12.3

12 years agoGit 1.7.12.3 v1.7.12.3
Junio C Hamano [Mon, 8 Oct 2012 18:40:43 +0000 (11:40 -0700)]
Git 1.7.12.3

Signed-off-by: Junio C Hamano <gitster@pobox.com>
12 years agoMerge branch 'os/commit-submodule-ignore' into maint
Junio C Hamano [Mon, 8 Oct 2012 18:34:34 +0000 (11:34 -0700)]
Merge branch 'os/commit-submodule-ignore' into maint

"git status" honored the ignore=dirty settings in .gitmodules but
"git commit" didn't.

* os/commit-submodule-ignore:
  commit: pay attention to submodule.$name.ignore in .gitmodules

12 years agoMerge branch 'jk/receive-pack-unpack-error-to-pusher' into maint
Junio C Hamano [Mon, 8 Oct 2012 18:34:19 +0000 (11:34 -0700)]
Merge branch 'jk/receive-pack-unpack-error-to-pusher' into maint

"git receive-pack" (the counterpart to "git push") did not give
progress output while processing objects it received to the puser
when run over the smart-http protocol.

* jk/receive-pack-unpack-error-to-pusher:
  receive-pack: drop "n/a" on unpacker errors
  receive-pack: send pack-processing stderr over sideband
  receive-pack: redirect unpack-objects stdout to /dev/null

12 years agoMerge branch 'rt/maint-clone-single' into maint
Junio C Hamano [Mon, 8 Oct 2012 18:34:02 +0000 (11:34 -0700)]
Merge branch 'rt/maint-clone-single' into maint

A repository created with "git clone --single" had its fetch
refspecs set up just like a clone without "--single", leading the
subsequent "git fetch" to slurp all the other branches, defeating
the whole point of specifying "only this branch".

* rt/maint-clone-single:
  clone --single: limit the fetch refspec to fetched branch

12 years agoMerge branch 'jc/blame-follows-renames' into maint
Junio C Hamano [Mon, 8 Oct 2012 18:33:35 +0000 (11:33 -0700)]
Merge branch 'jc/blame-follows-renames' into maint

It was unclear in the documentation for "git blame" that it is
unnecessary for users to use the "--follow" option.

* jc/blame-follows-renames:
  git blame: document that it always follows origin across whole-file renames

12 years agoMerge branch 'lt/mailinfo-handle-attachment-more-sanely' into maint
Junio C Hamano [Mon, 8 Oct 2012 18:32:59 +0000 (11:32 -0700)]
Merge branch 'lt/mailinfo-handle-attachment-more-sanely' into maint

A patch attached as application/octet-stream (e.g. not text/*) were
mishandled, not correctly honoring Content-Transfer-Encoding
(e.g. base64).

* lt/mailinfo-handle-attachment-more-sanely:
  mailinfo: don't require "text" mime type for attachments

12 years agogitignore.txt: suggestions how to get literal # or ! at the beginning
Nguyễn Thái Ngọc Duy [Sun, 7 Oct 2012 03:13:54 +0000 (10:13 +0700)]
gitignore.txt: suggestions how to get literal # or ! at the beginning

We support backslash escape, but we hide the details behind the phrase
"a shell glob suitable for consumption by fnmatch(3)". So it may not
be obvious how one can get literal # or ! at the beginning of pattern.
Add a few lines on how to work around the magic characters.

Signed-off-by: Nguyễn Thái Ngọc Duy <pclouds@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
12 years agogit-svn: keep leading slash when canonicalizing paths (fallback case)
Jonathan Nieder [Fri, 5 Oct 2012 07:04:31 +0000 (00:04 -0700)]
git-svn: keep leading slash when canonicalizing paths (fallback case)

Subversion's svn_dirent_canonicalize() and svn_path_canonicalize()
APIs keep a leading slash in the return value if one was present on
the argument, which can be useful since it allows relative and
absolute paths to be distinguished.

When git-svn's canonicalize_path() learned to use these functions if
available, its semantics changed in the corresponding way.  Some new
callers rely on the leading slash --- for example, if the slash is
stripped out then _canonicalize_url_ourselves() will transform
"proto://host/path/to/resource" to "proto://hostpath/to/resource".

Unfortunately the fallback _canonicalize_path_ourselves(), used when
the appropriate SVN APIs are not usable, still follows the old
semantics, so if that code path is exercised then it breaks.  Fix it
to follow the new convention.

Noticed by forcing the fallback on and running tests.  Without this
patch, t9101.4 fails:

 Bad URL passed to RA layer: Unable to open an ra_local session to \
 URL: Local URL 'file://homejrnsrcgit-scratch/t/trash%20directory.\
 t9101-git-svn-props/svnrepo' contains unsupported hostname at \
 /home/jrn/src/git-scratch/perl/blib/lib/Git/SVN.pm line 148

With it, the git-svn tests pass again.

Signed-off-by: Jonathan Nieder <jrnieder@gmail.com>
Signed-off-by: Eric Wong <normalperson@yhbt.net>
12 years agoGit::SVN: rename private path field
Jonathan Nieder [Mon, 17 Sep 2012 09:13:31 +0000 (02:13 -0700)]
Git::SVN: rename private path field

All users of $gs->{path} should have been converted to use the
accessor by now.  Check our work by renaming the underlying variable
to break callers that try to use it directly.

Signed-off-by: Jonathan Nieder <jrnieder@gmail.com>
Signed-off-by: Eric Wong <normalperson@yhbt.net>
12 years agogit-svn: use path accessor for Git::SVN objects
Eric Wong [Tue, 18 Sep 2012 00:09:31 +0000 (00:09 +0000)]
git-svn: use path accessor for Git::SVN objects

The accessors should improve maintainability and enforce
consistent access to Git::SVN objects.

Signed-off-by: Eric Wong <normalperson@yhbt.net>
Reviewed-by: Jonathan Nieder <jrnieder@gmail.com>
12 years agoMake git-svn branch patterns match complete URL
Ammon Riley [Thu, 30 Aug 2012 22:53:57 +0000 (15:53 -0700)]
Make git-svn branch patterns match complete URL

When using the {word,[...]} style of configuration for tags and branches,
it appears the intent is to only match whole path parts, since the words
in the {} pattern are meta-character quoted.

When the pattern word appears in the beginning or middle of the url,
it's matched completely, since the left side, pattern, and (non-empty)
right side are joined together with path separators.

However, when the pattern word appears at the end of the URL, the
right side is an empty pattern, and the resulting regex matches
more than just the specified pattern.

For example, if you specify something along the lines of

    branches = branches/project/{release_1,release_2}

and your repository also contains "branches/project/release_1_2", you
will also get the release_1_2 branch.  By restricting the match regex
with anchors, this is avoided.

Signed-off-by: Ammon Riley <ammon.riley@gmail.com>
Signed-off-by: Eric Wong <normalperson@yhbt.net>
12 years agot9164: Add missing quotes in test
Robert Luberda [Sun, 19 Aug 2012 22:43:19 +0000 (00:43 +0200)]
t9164: Add missing quotes in test

This fixes `ambiguous redirect' error given by bash.

[ew: fix misspelled test name,
     also eliminate space after ">>" to conform to guidelines]

Signed-off-by: Eric Wong <normalperson@yhbt.net>
12 years agogit-svn.perl: keep processing all commits in parents_exclude
Steven Walter [Mon, 20 Aug 2012 01:39:41 +0000 (21:39 -0400)]
git-svn.perl: keep processing all commits in parents_exclude

This fixes a bug where git finds the incorrect merge parent.  Consider a
repository with trunk, branch1 of trunk, and branch2 of branch1.
Without this change, git interprets a merge of branch2 into trunk as a
merge of branch1 into trunk.

Signed-off-by: Steven Walter <stevenrwalter@gmail.com>
Reviewed-by: Sam Vilain <sam@vilain.net>
Signed-off-by: Eric Wong <normalperson@yhbt.net>
12 years agogit-svn.perl: consider all ranges for a given merge, instead of only tip-by-tip
Steven Walter [Mon, 20 Aug 2012 01:39:40 +0000 (21:39 -0400)]
git-svn.perl: consider all ranges for a given merge, instead of only tip-by-tip

Consider the case where you have trunk, branch1 of trunk, and branch2 of
branch1.  trunk is merged back into branch2, and then branch2 is
reintegrated into trunk.  The merge of branch2 into trunk will have
svn:mergeinfo property references to both branch1 and branch2.  When
git-svn fetches the commit that merges branch2 (check_cherry_pick),
it is necessary to eliminate the merged contents of branch1 as well as
branch2, or else the merge will be incorrectly ignored as a cherry-pick.

Signed-off-by: Steven Walter <stevenrwalter@gmail.com>
Reviewed-by: Sam Vilain <sam@vilain.net>
Signed-off-by: Eric Wong <normalperson@yhbt.net>
12 years agogitcli: parse-options lets you omit tail of long options
Junio C Hamano [Thu, 4 Oct 2012 17:13:49 +0000 (10:13 -0700)]
gitcli: parse-options lets you omit tail of long options

Describe the behaviour, but do warn people against taking it too
literally and expect an abbreviation valid today will stay valid
forever.

Signed-off-by: Junio C Hamano <gitster@pobox.com>
12 years agopaint_down_to_common(): parse commit before relying on its timestamp
Junio C Hamano [Thu, 4 Oct 2012 22:37:15 +0000 (15:37 -0700)]
paint_down_to_common(): parse commit before relying on its timestamp

When refactoring the merge-base computation to reduce the pairwise
O(n*(n-1)) traversals to parallel O(n) traversals, the code forgot
that timestamp based heuristics needs each commit to have been
parsed.  This caused an empty "git pull" to spend cycles, traversing
the history all the way down to 0 (because an unparsed commit object
has 0 timestamp, and any other commit object with positive timestamp
will be processed for its parents, all getting parsed), only to come
up with a merge message to be used.

Signed-off-by: Junio C Hamano <gitster@pobox.com>
12 years agol10n: de.po: fix a few minor typos
Simon Ruderich [Thu, 4 Oct 2012 14:23:14 +0000 (16:23 +0200)]
l10n: de.po: fix a few minor typos

Signed-off-by: Simon Ruderich <simon@ruderich.org>
Signed-off-by: Ralf Thielow <ralf.thielow@gmail.com>
12 years agoUpdate draft release notes to 1.8.0
Junio C Hamano [Wed, 3 Oct 2012 04:18:40 +0000 (21:18 -0700)]
Update draft release notes to 1.8.0

Signed-off-by: Junio C Hamano <gitster@pobox.com>
12 years agoMerge branch 'nd/grep-reflog'
Junio C Hamano [Wed, 3 Oct 2012 04:13:39 +0000 (21:13 -0700)]
Merge branch 'nd/grep-reflog'

Teach the commands from the "log" family the "--grep-reflog" option
to limit output by string that appears in the reflog entry when the
"--walk-reflogs" option is in effect.

* nd/grep-reflog:
  revision: make --grep search in notes too if shown
  log --grep-reflog: reject the option without -g
  revision: add --grep-reflog to filter commits by reflog messages
  grep: prepare for new header field filter

12 years agoMerge branch 'lt/mailinfo-handle-attachment-more-sanely'
Junio C Hamano [Wed, 3 Oct 2012 04:13:35 +0000 (21:13 -0700)]
Merge branch 'lt/mailinfo-handle-attachment-more-sanely'

A patch attached as application/octet-stream (e.g. not text/*) were
mishandled, not correctly honoring Content-Transfer-Encoding
(e.g. base64).

* lt/mailinfo-handle-attachment-more-sanely:
  mailinfo: don't require "text" mime type for attachments

12 years agoMerge branch 'tu/gc-auto-quiet'
Junio C Hamano [Wed, 3 Oct 2012 04:13:27 +0000 (21:13 -0700)]
Merge branch 'tu/gc-auto-quiet'

"gc --auto" notified the user that auto-packing has triggered even
under the "--quiet" option.

* tu/gc-auto-quiet:
  silence git gc --auto --quiet output

12 years agot1450: the order the objects are checked is undefined
Junio C Hamano [Tue, 2 Oct 2012 22:08:16 +0000 (15:08 -0700)]
t1450: the order the objects are checked is undefined

When a tag T points at an object X that is of a type that is
different from what the tag records as, fsck should report it as an
error.

However, depending on the order X and T are checked individually,
the actual error message can be different.  If X is checked first,
fsck remembers X's type and then when it checks T, it notices that T
records X as a wrong type (i.e. the complaint is about a broken tag
T).  If T is checked first, on the other hand, fsck remembers that we
need to verify X is of the type tag records, and when it later
checks X, it notices that X is of a wrong type (i.e. the complaint
is about a broken object X).

The important thing is that fsck notices such an error and diagnoses
the issue on object X, but the test was expecting that we happen to
check objects in the order to make us detect issues with tag T, not
with object X.  Remove this unwarranted assumption.

Signed-off-by: Junio C Hamano <gitster@pobox.com>
12 years agoMerge branch 'maint'
Junio C Hamano [Tue, 2 Oct 2012 20:47:30 +0000 (13:47 -0700)]
Merge branch 'maint'

12 years agoStart preparing for 1.7.12.3
Junio C Hamano [Tue, 2 Oct 2012 20:44:59 +0000 (13:44 -0700)]
Start preparing for 1.7.12.3

Signed-off-by: Junio C Hamano <gitster@pobox.com>
12 years agoMerge branch 'rr/maint-submodule-unknown-cmd' into maint
Junio C Hamano [Tue, 2 Oct 2012 20:42:32 +0000 (13:42 -0700)]
Merge branch 'rr/maint-submodule-unknown-cmd' into maint

"git submodule frotz" was not diagnosed as "frotz" being an unknown
subcommand to "git submodule"; the user instead got a complaint that
"git submodule status" was run with an unknown path "frotz".

* rr/maint-submodule-unknown-cmd:
  submodule: if $command was not matched, don't parse other args

12 years agoMerge branch 'sp/maint-http-enable-gzip' into maint
Junio C Hamano [Tue, 2 Oct 2012 20:42:13 +0000 (13:42 -0700)]
Merge branch 'sp/maint-http-enable-gzip' into maint

"git fetch" over http advertised that it supports "deflate", which
is much less common, and did not advertise more common "gzip" on its
Accept-Encoding header.

* sp/maint-http-enable-gzip:
  Enable info/refs gzip decompression in HTTP client

12 years agoMerge branch 'sp/maint-http-info-refs-no-retry' into maint
Junio C Hamano [Tue, 2 Oct 2012 20:41:38 +0000 (13:41 -0700)]
Merge branch 'sp/maint-http-info-refs-no-retry' into maint

"git fetch" over http had an old workaround for an unlikely server
misconfiguration; it turns out that this hurts debuggability of the
configuration in general, and has been reverted.

* sp/maint-http-info-refs-no-retry:
  Revert "retry request without query when info/refs?query fails"

12 years agol10n: Fix to Swedish translation
Peter Krefting [Tue, 2 Oct 2012 07:25:32 +0000 (08:25 +0100)]
l10n: Fix to Swedish translation

Fix bad translation of "Receiving objects".

Signed-off-by: Peter Krefting <peter@softwolves.pp.se>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
12 years agoDocumentation: mention `push.default` in git-push.txt
Ramkumar Ramachandra [Tue, 2 Oct 2012 15:38:00 +0000 (21:08 +0530)]
Documentation: mention `push.default` in git-push.txt

It already is listed in the "git config" documentation, but people
interested in pushing would first look at "git push" documentation.

Noticed-by: David Glasser
Signed-off-by: Ramkumar Ramachandra <artagnon@gmail.com>
Acked-by: Matthieu Moy <Matthieu.Moy@grenoble-inp.fr>
Fixed-by: Junio C Hamano <gitster@pobox.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
12 years agoRelNotes/1.8.0: various typo and style fixes
Michael J Gruber [Tue, 2 Oct 2012 14:35:55 +0000 (16:35 +0200)]
RelNotes/1.8.0: various typo and style fixes

Signed-off-by: Michael J Gruber <git@drmicha.warpmail.net>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
12 years agoGit 1.8.0-rc0 v1.8.0-rc0
Junio C Hamano [Mon, 1 Oct 2012 20:09:47 +0000 (13:09 -0700)]
Git 1.8.0-rc0

Signed-off-by: Junio C Hamano <gitster@pobox.com>
12 years agoMerge branch 'jk/completion-tests'
Junio C Hamano [Mon, 1 Oct 2012 19:59:10 +0000 (12:59 -0700)]
Merge branch 'jk/completion-tests'

* jk/completion-tests:
  t9902: add completion tests for "odd" filenames
  t9902: add a few basic completion tests

12 years agoMerge branch 'ep/malloc-check-perturb'
Junio C Hamano [Mon, 1 Oct 2012 19:59:06 +0000 (12:59 -0700)]
Merge branch 'ep/malloc-check-perturb'

Fixes a brown-paper bag bug.

* ep/malloc-check-perturb:
  MALLOC_CHECK: enable it, unless disabled explicitly

12 years agoMerge branch 'da/mergetool-custom'
Junio C Hamano [Mon, 1 Oct 2012 19:58:57 +0000 (12:58 -0700)]
Merge branch 'da/mergetool-custom'

The actual external command to run for mergetool backend can be
specified with difftool/mergetool.$name.cmd configuration
variables, but this mechanism was ignored for the backends we
natively support.

* da/mergetool-custom:
  mergetool--lib: Allow custom commands to override built-ins

12 years agoMerge branch 'os/commit-submodule-ignore'
Junio C Hamano [Mon, 1 Oct 2012 19:58:51 +0000 (12:58 -0700)]
Merge branch 'os/commit-submodule-ignore'

"git status" honored the ignore=dirty settings in .gitmodules but
"git commit" didn't.

* os/commit-submodule-ignore:
  commit: pay attention to submodule.$name.ignore in .gitmodules

12 years agoMerge branch 'jc/blame-follows-renames'
Junio C Hamano [Mon, 1 Oct 2012 19:58:43 +0000 (12:58 -0700)]
Merge branch 'jc/blame-follows-renames'

Clarify the "blame" documentation to tell the users that there is
no need to ask for "--follow".

* jc/blame-follows-renames:
  git blame: document that it always follows origin across whole-file renames

12 years agoMerge branch 'jk/receive-pack-unpack-error-to-pusher'
Junio C Hamano [Mon, 1 Oct 2012 19:58:34 +0000 (12:58 -0700)]
Merge branch 'jk/receive-pack-unpack-error-to-pusher'

Send errors from "unpack-objects" and "index-pack" back to the "git
push" over the git and smart-http protocols, just like it is done
for a push over the ssh protocol.

* jk/receive-pack-unpack-error-to-pusher:
  receive-pack: drop "n/a" on unpacker errors
  receive-pack: send pack-processing stderr over sideband
  receive-pack: redirect unpack-objects stdout to /dev/null

12 years agoMerge branch 'rt/maint-clone-single'
Junio C Hamano [Mon, 1 Oct 2012 19:58:10 +0000 (12:58 -0700)]
Merge branch 'rt/maint-clone-single'

Running "git fetch" in a repository made with "git clone --single"
slurps all the branches, defeating the point of "--single".

* rt/maint-clone-single:
  clone --single: limit the fetch refspec to fetched branch

12 years agomailinfo: don't require "text" mime type for attachments
Linus Torvalds [Sun, 30 Sep 2012 22:10:48 +0000 (15:10 -0700)]
mailinfo: don't require "text" mime type for attachments

Currently "git am" does insane things if the mbox it is given contains
attachments with a MIME type that aren't "text/*".

In particular, it will still decode them, and pass them "one line at a
time" to the mail body filter, but because it has determined that they
aren't text (without actually looking at the contents, just at the mime
type) the "line" will be the encoding line (eg 'base64') rather than a
line of *content*.

Which then will cause the text filtering to fail, because we won't
correctly notice when the attachment text switches from the commit message
to the actual patch. Resulting in a patch failure, even if patch may be a
perfectly well-formed attachment, it's just that the message type may be
(for example) "application/octet-stream" instead of "text/plain".

Just remove all the bogus games with the message_type. The only difference
that code creates is how the data is passed to the filter function
(chunked per-pred-code line or per post-decode line), and that difference
is *wrong*, since chunking things per pre-decode line can never be a
sensible operation, and cannot possibly matter for binary data anyway.

This code goes all the way back to March of 2007, in commit 87ab79923463
("builtin-mailinfo.c infrastrcture changes"), and apparently Don used to
pass random mbox contents to git. However, the pre-decode vs post-decode
logic really shouldn't matter even for that case, and more importantly, "I
fed git am crap" is not a valid reason to break *real* patch attachments.

If somebody really cares, and determines that some attachment is binary
data (by looking at the data, not the MIME-type), the whole attachment
should be dismissed, rather than fed in random-sized chunks to
"handle_filter()".

Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Cc: Don Zickus <dzickus@redhat.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
12 years agoMerge git://github.com/git-l10n/git-po
Junio C Hamano [Sun, 30 Sep 2012 06:28:20 +0000 (23:28 -0700)]
Merge git://github.com/git-l10n/git-po

* 'master' of git://github.com/git-l10n/git-po:
  l10n: Fixes to Swedish translation
  Update Swedish translation (1967t0f0u)
  l10n: zh.CN.po: msgmerge git.pot (1142t195f630u)
  l10n: Update git.pot (825 new, 24 removed messages)

12 years agoUpdate draft release notes to 1.8.0
Junio C Hamano [Sun, 30 Sep 2012 05:50:53 +0000 (22:50 -0700)]
Update draft release notes to 1.8.0

Signed-off-by: Junio C Hamano <gitster@pobox.com>
12 years agoSync with 1.7.12.2
Junio C Hamano [Sun, 30 Sep 2012 06:22:53 +0000 (23:22 -0700)]
Sync with 1.7.12.2

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