git
14 years agoMerge branch 'lh/short-decorate' into next
Junio C Hamano [Tue, 18 Aug 2009 21:40:35 +0000 (14:40 -0700)] 
Merge branch 'lh/short-decorate' into next

* lh/short-decorate:
  git-log: allow --decorate[=short|full]

14 years agoMerge branch 'rc/maint-http-fix' into next
Junio C Hamano [Tue, 18 Aug 2009 21:40:35 +0000 (14:40 -0700)] 
Merge branch 'rc/maint-http-fix' into next

* rc/maint-http-fix:
  http.c: don't assume that urls don't end with slash

14 years agoMerge branch 'lt/block-sha1' into next
Junio C Hamano [Tue, 18 Aug 2009 21:40:35 +0000 (14:40 -0700)] 
Merge branch 'lt/block-sha1' into next

* lt/block-sha1:
  remove ARM and Mozilla SHA1 implementations
  block-sha1: guard gcc extensions with __GNUC__
  make sure byte swapping is optimal for git
  block-sha1: make the size member first in the context struct

14 years agoMerge branch 'tr/reset-checkout-patch' into next
Junio C Hamano [Tue, 18 Aug 2009 21:40:35 +0000 (14:40 -0700)] 
Merge branch 'tr/reset-checkout-patch' into next

* tr/reset-checkout-patch:
  tests: disable interactive hunk selection tests if perl is not available

14 years agoMerge branch 'master' into next
Junio C Hamano [Tue, 18 Aug 2009 21:40:29 +0000 (14:40 -0700)] 
Merge branch 'master' into next

* master:
  filter-branch: make the usage string fit on 80 chars terminals.
  filter-branch: add an example how to add ACKs to a range of commits
  docs: describe impact of repack on "clone -s"

14 years agoMerge branch 'maint'
Junio C Hamano [Tue, 18 Aug 2009 21:40:10 +0000 (14:40 -0700)] 
Merge branch 'maint'

* maint:
  filter-branch: make the usage string fit on 80 chars terminals.
  filter-branch: add an example how to add ACKs to a range of commits
  docs: describe impact of repack on "clone -s"

14 years agoremove ARM and Mozilla SHA1 implementations
Nicolas Pitre [Tue, 18 Aug 2009 00:09:56 +0000 (20:09 -0400)] 
remove ARM and Mozilla SHA1 implementations

They are both slower than the new BLK_SHA1 implementation, so it is
pointless to keep them around.

Signed-off-by: Nicolas Pitre <nico@cam.org>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
14 years agoblock-sha1: guard gcc extensions with __GNUC__
Nicolas Pitre [Tue, 18 Aug 2009 19:37:22 +0000 (15:37 -0400)] 
block-sha1: guard gcc extensions with __GNUC__

With this, the code should now be portable to any C compiler.

Signed-off-by: Nicolas Pitre <nico@cam.org>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
14 years agomake sure byte swapping is optimal for git
Nicolas Pitre [Tue, 18 Aug 2009 19:26:55 +0000 (15:26 -0400)] 
make sure byte swapping is optimal for git

We rely on ntohl() and htonl() to perform byte swapping in many places.
However, some platforms have libraries providing really poor
implementations of those which might cause significant performance
issues, especially with the block-sha1 code.

Signed-off-by: Nicolas Pitre <nico@cam.org>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
14 years agohttp.c: don't assume that urls don't end with slash
Tay Ray Chuan [Mon, 17 Aug 2009 09:09:43 +0000 (17:09 +0800)] 
http.c: don't assume that urls don't end with slash

Make append_remote_object_url() (and by implication,
get_remote_object_url) use end_url_with_slash() to ensure that the url
ends with a slash.

Previously, they assumed that the url did not end with a slash and
as a result appended a slash, sometimes errorneously.

This fixes an issue introduced in 5424bc5 ("http*: add helper methods
for fetching objects (loose)"), where the append_remote_object_url()
implementation in http-push.c, which assumed that urls end with a
slash, was replaced by another one in http.c, which assumed urls did
not end with a slash.

The above issue was raised by Thomas Schlichter:

  http://marc.info/?l=git&m=125043105231327

Signed-off-by: Tay Ray Chuan <rctay89@gmail.com>
Tested-by: Thomas Schlichter <thomas.schlichter@web.de>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
14 years agofilter-branch: make the usage string fit on 80 chars terminals.
Matthieu Moy [Tue, 18 Aug 2009 09:51:00 +0000 (11:51 +0200)] 
filter-branch: make the usage string fit on 80 chars terminals.

It used to be a single, huge line, badly wrapped by xterm.

Signed-off-by: Matthieu Moy <Matthieu.Moy@imag.fr>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
14 years agogit-log: allow --decorate[=short|full]
Lars Hjemli [Sat, 15 Aug 2009 14:23:12 +0000 (16:23 +0200)] 
git-log: allow --decorate[=short|full]

Commit de435ac0 changed the behavior of --decorate from printing the
full ref (e.g., "refs/heads/master") to a shorter, more human-readable
version (e.g., just "master"). While this is nice for human readers,
external tools using the output from "git log" may prefer the full
version.

This patch introduces an extension to --decorate to allow the caller to
specify either the short or the full versions.

Signed-off-by: Lars Hjemli <hjemli@gmail.com>
Acked-by: Jeff King <peff@peff.net>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
14 years agotests: disable interactive hunk selection tests if perl is not available
Jeff King [Tue, 18 Aug 2009 06:12:44 +0000 (02:12 -0400)] 
tests: disable interactive hunk selection tests if perl is not available

These are all backed by git-add--interactive.perl under the hood.

Signed-off-by: Jeff King <peff@peff.net>
Acked-By: Thomas Rast <trast@student.ethz.ch>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
14 years agoblock-sha1: make the size member first in the context struct
Nicolas Pitre [Tue, 18 Aug 2009 00:18:23 +0000 (20:18 -0400)] 
block-sha1: make the size member first in the context struct

This is a 64-bit value, hence having it first provides a better
alignment.

Signed-off-by: Nicolas Pitre <nico@cam.org>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
14 years agofilter-branch: add an example how to add ACKs to a range of commits
Johannes Schindelin [Mon, 17 Aug 2009 20:38:46 +0000 (22:38 +0200)] 
filter-branch: add an example how to add ACKs to a range of commits

When you have to add certain lines like ACKs (or for that matter,
Signed-off-by:s) to a range of commits starting with HEAD, you might
be tempted to use 'git rebase -i -10', but that is a waste of your
time.

It is better to use 'git filter-branch' with an appropriate message
filter, and this commit adds an example how to do so to
filter-branch's man page.

Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
14 years agodocs: describe impact of repack on "clone -s"
Jeff King [Mon, 17 Aug 2009 06:19:17 +0000 (02:19 -0400)] 
docs: describe impact of repack on "clone -s"

The effects of repacking on a repository with alternates are a bit
subtle. The two main things users will want are:

  1. Not to waste disk space by accidentally copying objects which could
     be shared.

  2. Copying all objects explicitly to break the dependency on the source
     repo.

This patch describes both under the "clone -s" documentation. It makes
sense to put it there rather than in git-repack.txt for both cases.

For (1), we are warning the user who is using "clone -s" about what _not_
to do, so we need to get their attention when reading about "clone -s".

For (2), we are telling them how git-repack can be used to accomplish a
task, but until they know that git-repack is the right tool, they have no
reason to look at the repack documentation.

Signed-off-by: Jeff King <peff@peff.net>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
14 years agoMerge branch 'tr/reset-checkout-patch' into next
Junio C Hamano [Mon, 17 Aug 2009 05:30:28 +0000 (22:30 -0700)] 
Merge branch 'tr/reset-checkout-patch' into next

* tr/reset-checkout-patch:
  DWIM 'git stash save -p' for 'git stash -p'
  Implement 'git stash save --patch'
  Implement 'git checkout --patch'
  Implement 'git reset --patch'
  builtin-add: refactor the meat of interactive_add()
  Add a small patch-mode testing library
  git-apply--interactive: Refactor patch mode code
  Make 'git stash -k' a short form for 'git stash save --keep-index'

14 years agoMerge branch 'tr/maint-1.6.3-add-p-modeonly-fix' into next
Junio C Hamano [Sun, 16 Aug 2009 11:59:32 +0000 (04:59 -0700)] 
Merge branch 'tr/maint-1.6.3-add-p-modeonly-fix' into next

* tr/maint-1.6.3-add-p-modeonly-fix:
  add -p: do not attempt to coalesce mode changes
  git add -p: demonstrate failure when staging both mode and hunk

14 years agoMerge branch 'master' into next
Junio C Hamano [Sun, 16 Aug 2009 11:59:23 +0000 (04:59 -0700)] 
Merge branch 'master' into next

* master:
  gitk: Parse arbitrary commit-ish in SHA1 field
  gitk: Fix direction of symmetric difference in optimized mode
  gitk: New option to hide remote refs
  gitk: Do not hard-code "encoding" in attribute lookup functions

14 years agoMerge branch 'lt/block-sha1'
Junio C Hamano [Sun, 16 Aug 2009 11:14:32 +0000 (04:14 -0700)] 
Merge branch 'lt/block-sha1'

* lt/block-sha1:
  block-sha1/sha1.c: silence compiler complaints by casting void * to char *
  block-sha1: more good unaligned memory access candidates
  block-sha1: support for architectures with memory alignment restrictions
  block-sha1: split the different "hacks" to be individually selected
  block-sha1: move code around
  block-sha1: improve code on large-register-set machines
  block-sha1: improved SHA1 hashing
  block-sha1: perform register rotation using cpp
  block-sha1: get rid of redundant 'lenW' context
  block-sha1: Use '(B&C)+(D&(B^C))' instead of '(B&C)|(D&(B|C))' in round 3
  block-sha1: macroize the rounds a bit further
  block-sha1: re-use the temporary array as we calculate the SHA1
  block-sha1: make the 'ntohl()' part of the first SHA1 loop
  block-sha1: minor fixups
  block-sha1: try to use rol/ror appropriately
  block-sha1: undo ctx->size change
  Add new optimized C 'block-sha1' routines

14 years agoMerge branch 'bc/maint-am-email'
Junio C Hamano [Sun, 16 Aug 2009 11:13:22 +0000 (04:13 -0700)] 
Merge branch 'bc/maint-am-email'

* bc/maint-am-email:
  git-am: print fair error message when format detection fails
  am: allow individual e-mail files as input

14 years agoMerge branch 'js/maint-cover-letter-non-ascii'
Junio C Hamano [Sun, 16 Aug 2009 11:13:18 +0000 (04:13 -0700)] 
Merge branch 'js/maint-cover-letter-non-ascii'

* js/maint-cover-letter-non-ascii:
  Correctly mark cover letters' encodings if they are not pure ASCII
  Expose the has_non_ascii() function

14 years agoMerge branch 'jc/maint-clean-nested-dir-safety'
Junio C Hamano [Sun, 16 Aug 2009 11:13:13 +0000 (04:13 -0700)] 
Merge branch 'jc/maint-clean-nested-dir-safety'

* jc/maint-clean-nested-dir-safety:
  clean: require double -f options to nuke nested git repository and work tree

14 years agoMerge branch 'jk/maint-merge-msg-fix'
Junio C Hamano [Sun, 16 Aug 2009 11:13:04 +0000 (04:13 -0700)] 
Merge branch 'jk/maint-merge-msg-fix'

* jk/maint-merge-msg-fix:
  merge: indicate remote tracking branches in merge message
  merge: fix incorrect merge message for ambiguous tag/branch
  add tests for merge message headings

14 years agoMerge git://git.kernel.org/pub/scm/gitk/gitk
Junio C Hamano [Sun, 16 Aug 2009 10:46:51 +0000 (03:46 -0700)] 
Merge git://git.kernel.org/pub/scm/gitk/gitk

* git://git.kernel.org/pub/scm/gitk/gitk:
  gitk: Parse arbitrary commit-ish in SHA1 field
  gitk: Fix direction of symmetric difference in optimized mode
  gitk: New option to hide remote refs
  gitk: Do not hard-code "encoding" in attribute lookup functions

14 years agoDWIM 'git stash save -p' for 'git stash -p'
Thomas Rast [Thu, 13 Aug 2009 12:29:45 +0000 (14:29 +0200)] 
DWIM 'git stash save -p' for 'git stash -p'

Signed-off-by: Thomas Rast <trast@student.ethz.ch>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
14 years agoMerge branch 'js/stash-dwim' into tr/reset-checkout-patch
Junio C Hamano [Sat, 15 Aug 2009 22:20:28 +0000 (15:20 -0700)] 
Merge branch 'js/stash-dwim' into tr/reset-checkout-patch

* commit 'tr/reset-checkout-patch^^2':
  Make 'git stash -k' a short form for 'git stash save --keep-index'

14 years agoImplement 'git stash save --patch'
Thomas Rast [Thu, 13 Aug 2009 12:29:44 +0000 (14:29 +0200)] 
Implement 'git stash save --patch'

This adds a hunk-based mode to git-stash.  You can select hunks from
the difference between HEAD and worktree, and git-stash will build a
stash that reflects these changes.  The index state of the stash is
the same as your current index, and we also let --patch imply
--keep-index.

Note that because the selected hunks are rolled back from the worktree
but not the index, the resulting state may appear somewhat confusing
if you had also staged these changes.  This is not entirely
satisfactory, but due to the way stashes are applied, other solutions
would require a change to the stash format.

Signed-off-by: Thomas Rast <trast@student.ethz.ch>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
14 years agoImplement 'git checkout --patch'
Thomas Rast [Sat, 15 Aug 2009 11:48:30 +0000 (13:48 +0200)] 
Implement 'git checkout --patch'

This introduces a --patch mode for git-checkout.  In the index usage

  git checkout --patch -- [files...]

it lets the user discard edits from the <files> at the granularity of
hunks (by selecting hunks from 'git diff' and then reverse applying
them to the worktree).

We also accept a revision argument.  In the case

  git checkout --patch HEAD -- [files...]

we offer hunks from the difference between HEAD and the worktree, and
reverse applies them to both index and worktree, allowing you to
discard staged changes completely.  In the non-HEAD usage

  git checkout --patch <revision> -- [files...]

it offers hunks from the difference between the worktree and
<revision>.  The chosen hunks are then applied to both index and
worktree.

The application to worktree and index is done "atomically" in the
sense that we first check if the patch applies to the index (it should
always apply to the worktree).  If it does not, we give the user a
choice to either abort or apply to the worktree anyway.

Signed-off-by: Thomas Rast <trast@student.ethz.ch>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
14 years agoImplement 'git reset --patch'
Thomas Rast [Sat, 15 Aug 2009 11:48:31 +0000 (13:48 +0200)] 
Implement 'git reset --patch'

This introduces a --patch mode for git-reset.  The basic case is

  git reset --patch -- [files...]

which acts as the opposite of 'git add --patch -- [files...]': it
offers hunks for *un*staging.  Advanced usage is

  git reset --patch <revision> -- [files...]

which offers hunks from the diff between the index and <revision> for
forward application to the index.  (That is, the basic case is just
<revision> = HEAD.)

Signed-off-by: Thomas Rast <trast@student.ethz.ch>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
14 years agoMerge branch 'jl/submodule-summary-diff-files' into next
Junio C Hamano [Sat, 15 Aug 2009 22:14:27 +0000 (15:14 -0700)] 
Merge branch 'jl/submodule-summary-diff-files' into next

* jl/submodule-summary-diff-files:
  Documentaqtion/git-submodule.txt: Typofix

14 years agoMerge branch 'jc/shortstatus' into next
Junio C Hamano [Sat, 15 Aug 2009 22:14:26 +0000 (15:14 -0700)] 
Merge branch 'jc/shortstatus' into next

* jc/shortstatus:
  git commit --dry-run -v: show diff in color when asked
  Documentation/git-commit.txt: describe --dry-run

14 years agoadd -p: do not attempt to coalesce mode changes
Thomas Rast [Sat, 15 Aug 2009 13:56:39 +0000 (15:56 +0200)] 
add -p: do not attempt to coalesce mode changes

In 0392513 (add-interactive: refactor mode hunk handling, 2009-04-16),
we merged the interaction loops for mode changes and hunk staging.
This was fine at the time, because 0beee4c (git-add--interactive:
remove hunk coalescing, 2008-07-02) removed hunk coalescing.

However, in 7a26e65 (Revert "git-add--interactive: remove hunk
coalescing", 2009-05-16), we resurrected it.  Since then, the code
would attempt in vain to merge mode changes with diff hunks,
corrupting both in the process.

We add a check to the coalescing loop to ensure it only looks at diff
hunks, thus skipping mode changes.

Noticed-by: Kirill Smelkov <kirr@mns.spb.ru>
Signed-off-by: Thomas Rast <trast@student.ethz.ch>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
14 years agogit add -p: demonstrate failure when staging both mode and hunk
Kirill Smelkov [Sat, 15 Aug 2009 12:26:49 +0000 (16:26 +0400)] 
git add -p: demonstrate failure when staging both mode and hunk

When trying to stage changes to file which has also pending `chmod +x`,
`git add -p` produces lots of 'Use of uninitialized value ...' warnings
and fails to do the job:

    $ echo content >> file
    $ chmod +x file
    $ git add -p
    diff --git a/file b/file
    index e69de29..d95f3ad
    --- a/file
    +++ b/file
    old mode 100644
    new mode 100755
    Stage mode change [y,n,q,a,d,/,j,J,g,?]? y
    @@ -0,0 +1 @@
    +content
    Stage this hunk [y,n,q,a,d,/,K,g,e,?]? y
    Use of uninitialized value $o_ofs in addition (+) at .../git-add--interactive line 776.
    Use of uninitialized value $ofs in numeric le (<=) at .../git-add--interactive line 806.
    Use of uninitialized value $o0_ofs in concatenation (.) or string at .../git-add--interactive line 830.
    Use of uninitialized value $n0_ofs in concatenation (.) or string at .../git-add--interactive line 830.
    Use of uninitialized value $o_ofs in addition (+) at .../git-add--interactive line 776.
    fatal: corrupt patch at line 5
    diff --git a/file b/file
    index e69de29..d95f3ad
    --- a/file
    +++ b/file
    @@ -,0 + @@
    +content

Signed-off-by: Kirill Smelkov <kirr@mns.spb.ru>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
14 years agogit commit --dry-run -v: show diff in color when asked
Junio C Hamano [Sat, 15 Aug 2009 09:14:14 +0000 (02:14 -0700)] 
git commit --dry-run -v: show diff in color when asked

The earlier implementation of --dry-run didn't duplicate the use of color
"git status -v" set up for diff output.

Signed-off-by: Junio C Hamano <gitster@pobox.com>
14 years agoDocumentation/git-commit.txt: describe --dry-run
Junio C Hamano [Sat, 15 Aug 2009 08:58:37 +0000 (01:58 -0700)] 
Documentation/git-commit.txt: describe --dry-run

Signed-off-by: Junio C Hamano <gitster@pobox.com>
14 years agoDocumentaqtion/git-submodule.txt: Typofix
Lars Hjemli [Sat, 15 Aug 2009 08:40:42 +0000 (10:40 +0200)] 
Documentaqtion/git-submodule.txt: Typofix

Signed-off-by: Lars Hjemli <hjemli@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
14 years agoMerge branch 'ld/p4' into next
Junio C Hamano [Sat, 15 Aug 2009 02:55:06 +0000 (19:55 -0700)] 
Merge branch 'ld/p4' into next

* ld/p4:
  git-p4: stream from perforce to speed up clones

14 years agoMerge branch 'jl/submodule-summary-diff-files' into next
Junio C Hamano [Sat, 15 Aug 2009 02:54:03 +0000 (19:54 -0700)] 
Merge branch 'jl/submodule-summary-diff-files' into next

* jl/submodule-summary-diff-files:
  git submodule summary: add --files option

14 years agoMerge branch 'oa/stash-na' into next
Junio C Hamano [Sat, 15 Aug 2009 02:54:03 +0000 (19:54 -0700)] 
Merge branch 'oa/stash-na' into next

* oa/stash-na:
  git stash: Give friendlier errors when there is nothing to apply

14 years agoMerge branch 'mr/gitweb-xz' into next
Junio C Hamano [Sat, 15 Aug 2009 02:54:03 +0000 (19:54 -0700)] 
Merge branch 'mr/gitweb-xz' into next

* mr/gitweb-xz:
  gitweb: add support for XZ compressed snapshots
  gitweb: update INSTALL regarding specific snapshot settings
  gitweb: support to globally disable a snapshot format

14 years agoMerge branch 'lt/block-sha1' into next
Junio C Hamano [Sat, 15 Aug 2009 02:54:02 +0000 (19:54 -0700)] 
Merge branch 'lt/block-sha1' into next

* lt/block-sha1:
  block-sha1/sha1.c: silence compiler complaints by casting void * to char *
  block-sha1: more good unaligned memory access candidates

14 years agoMerge branch 'master' into next
Junio C Hamano [Sat, 15 Aug 2009 02:53:57 +0000 (19:53 -0700)] 
Merge branch 'master' into next

* master:
  git-cvsimport: add support for cvs pserver password scrambling.
  gitweb: Optimize git-favicon.png
  svn: (cleanup) use predefined constant for rev_map_fmt
  svn: allow branches outside of refs/remotes
  svn: initial "master" points to trunk if possible

14 years agogit submodule summary: add --files option
Jens Lehmann [Thu, 13 Aug 2009 19:32:50 +0000 (21:32 +0200)] 
git submodule summary: add --files option

git submodule summary is providing similar functionality for submodules as
git diff-index does for a git project (including the meaning of --cached).
But the analogon to git diff-files is missing, so add a --files option to
summarize the differences between the index of the super project and the
last commit checked out in the working tree of the submodule.

Signed-off-by: Jens Lehmann <Jens.Lehmann@web.de>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
14 years agogit-cvsimport: add support for cvs pserver password scrambling.
Dirk Hoerner [Fri, 14 Aug 2009 06:58:31 +0000 (08:58 +0200)] 
git-cvsimport: add support for cvs pserver password scrambling.

Instead of a cleartext password, the CVS pserver expects a scrambled one
in the authentication request. With this patch it is possible to import
CVS repositories only accessible via pserver and user/password.

Signed-off-by: Dirk Hoerner <dirker@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
14 years agogitweb: Optimize git-favicon.png
Benjamin Kramer [Mon, 10 Aug 2009 12:09:00 +0000 (14:09 +0200)] 
gitweb: Optimize git-favicon.png

Reduce size of git-favicon.png using a combination of optipng and
pngout. From 164 bytes to 115 bytes (30% reduction). Also reduce
git-logo.png's size by one byte using advcomp.

Signed-off-by: Benjamin Kramer <benny.kra@googlemail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
14 years agogit stash: Give friendlier errors when there is nothing to apply
Ori Avtalion [Tue, 11 Aug 2009 11:12:13 +0000 (14:12 +0300)] 
git stash: Give friendlier errors when there is nothing to apply

The change makes sure a stash (given or default) exists before
checking if the working tree is dirty.

If the default stash is requested, the old message was scary and
included a 'fatal' error from rev-parse:
     fatal: Needed a single revision
     : no valid stashed state found

It is replaced with a friendlier 'Nothing to apply' error, similar to
'git stash branch'.

If a specific stash is specified, the 'Needed a single revision' errors
from rev-parse are suppressed.

Signed-off-by: Ori Avtalion <ori@avtalion.name>
Acked-by: Thomas Rast <trast@student.ethz.ch>
Acked-by: Nanako Shiraishi <nanako3@lavabit.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
14 years agoblock-sha1/sha1.c: silence compiler complaints by casting void * to char *
Brandon Casey [Fri, 14 Aug 2009 22:52:15 +0000 (17:52 -0500)] 
block-sha1/sha1.c: silence compiler complaints by casting void * to char *

Some compilers produce errors when arithmetic is attempted on pointers to
void.  We want computations done on byte addresses, so cast them to char *
to work them around.

Signed-off-by: Brandon Casey <casey@nrlssc.navy.mil>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
14 years agoMerge branch 'jn/gitweb-blame' (early part)
Junio C Hamano [Fri, 14 Aug 2009 23:32:52 +0000 (16:32 -0700)] 
Merge branch 'jn/gitweb-blame' (early part)

* 'jn/gitweb-blame' (early part):
  gitweb: Use light/dark for class names also in 'blame' view
  gitweb: Add author initials in 'blame' view, a la "git gui blame"
  gitweb: Mark commits with no "previous" in 'blame' view
  gitweb: Use "previous" header of git-blame -p in 'blame' view
  gitweb: Mark boundary commits in 'blame' view
  gitweb: Make .error style generic

14 years agobuiltin-add: refactor the meat of interactive_add()
Thomas Rast [Thu, 13 Aug 2009 12:29:41 +0000 (14:29 +0200)] 
builtin-add: refactor the meat of interactive_add()

This moves the call setup for 'git add--interactive' to a separate
function, as other users will call it without running
validate_pathspec() first.

Signed-off-by: Thomas Rast <trast@student.ethz.ch>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
14 years agoAdd a small patch-mode testing library
Thomas Rast [Thu, 13 Aug 2009 12:29:40 +0000 (14:29 +0200)] 
Add a small patch-mode testing library

The tests for {reset,commit,stash} -p will frequently have to set both
worktree and index states to known values, and verify that the outcome
(again both worktree and index) are what was expected.

Add a small helper library that lets us do these tasks more easily.

Signed-off-by: Thomas Rast <trast@student.ethz.ch>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
14 years agogit-apply--interactive: Refactor patch mode code
Thomas Rast [Thu, 13 Aug 2009 12:29:39 +0000 (14:29 +0200)] 
git-apply--interactive: Refactor patch mode code

This makes some aspects of the 'git add -p' loop configurable (within
the code), so that we can later reuse git-add--interactive for other
similar tools.

Most fields are fairly straightforward, but APPLY gets a subroutine
(instead of just a string a la 'apply --cached') so that we can handle
'checkout -p', which will need to atomically apply the patch twice
(index and worktree).

Signed-off-by: Thomas Rast <trast@student.ethz.ch>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
14 years agoblock-sha1: more good unaligned memory access candidates
Nicolas Pitre [Thu, 13 Aug 2009 04:29:14 +0000 (00:29 -0400)] 
block-sha1: more good unaligned memory access candidates

In addition to X86, PowerPC and S390 are capable of unaligned memory
accesses.

Signed-off-by: Nicolas Pitre <nico@cam.org>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
14 years agogitk: Parse arbitrary commit-ish in SHA1 field
Thomas Rast [Thu, 13 Aug 2009 07:25:03 +0000 (09:25 +0200)] 
gitk: Parse arbitrary commit-ish in SHA1 field

We only accepted either SHA1s or heads/tags that have been read.  This
meant the user could not, e.g., enter HEAD to go back to the current
commit.

This adds code to call out to git rev-parse --verify if all other
methods of interpreting the string the user entered fail.
(git-rev-parse alone is not enough as we really want a single
revision.)

The error paths change slighly, because we now know from the rev-parse
invocation whether the expression was valid at all.  The previous
"unknown" path is now only triggered if the revision does exist, but
is not in the current view display.

Signed-off-by: Thomas Rast <trast@student.ethz.ch>
Signed-off-by: Paul Mackerras <paulus@samba.org>
14 years agogitk: Fix direction of symmetric difference in optimized mode
Thomas Rast [Wed, 5 Aug 2009 21:15:36 +0000 (23:15 +0200)] 
gitk: Fix direction of symmetric difference in optimized mode

ee66e08 (gitk: Make updates go faster, 2008-05-09) implemented an
optimized mode where gitk parses the arguments with rev-parse, and
manually reads history in chunks.  As mentioned in the commit message,
symmetric differences are a problem there:

    One wrinkle is that we have to turn symmetric diff arguments (of the
    form a...b) back into symmetric diff form so that --left-right still
    works, as git rev parse turns a...b into a b ^merge_base(a,b).

However, git-rev-parse returns a...b in the swapped order

    b a ^merge_base(a,b)

This has been the case since at least 1f8115b (the state of master at
the time of the abovementioned ee66e08; Merge branch 'maint',
2008-05-08).  So gitk flipped the sides of symmetric differences
whenever it was in optimized mode.

Fix this by swapping the sides of the reconstruction code.

Signed-off-by: Thomas Rast <trast@student.ethz.ch>
Signed-off-by: Paul Mackerras <paulus@samba.org>
14 years agogitk: New option to hide remote refs
Thomas Rast [Mon, 3 Aug 2009 21:53:36 +0000 (23:53 +0200)] 
gitk: New option to hide remote refs

In repositories with lots of remotes, looking at the history in gitk
can be borderline insane with all the red labels for remote refs.
Introduce a new option in the preferences that makes gitk ignore
remote refs entirely, so they don't take up space in the display.

Wished-for-by: Thell Fowler <tbfowler4@gmail.com>
Signed-off-by: Thomas Rast <trast@student.ethz.ch>
Signed-off-by: Paul Mackerras <paulus@samba.org>
14 years agogitk: Do not hard-code "encoding" in attribute lookup functions
Johannes Sixt [Tue, 21 Jul 2009 08:09:48 +0000 (10:09 +0200)] 
gitk: Do not hard-code "encoding" in attribute lookup functions

Commit 39ee47e (Clean up file encoding code and add enable/disable option,
2008-10-15) rewrote the attribute lookup functions gitattr and
cache_gitattr, but in the process hard-coded the attribute name "encoding"
instead of using the functions' parameters. This fixes it.

This is not a serious regression because currently all callers look only
for "encoding".

Further note that this fix assumes that future callers will not pass an
attribute name that contains regex special characters.

Signed-off-by: Johannes Sixt <j6t@kdbg.org>
Signed-off-by: Paul Mackerras <paulus@samba.org>
14 years agosvn: (cleanup) use predefined constant for rev_map_fmt
Eric Wong [Thu, 13 Aug 2009 05:20:02 +0000 (22:20 -0700)] 
svn: (cleanup) use predefined constant for rev_map_fmt

This makes life easier in case we ever need to change the
internal format of the rev_maps.

Signed-off-by: Eric Wong <normalperson@yhbt.net>
14 years agosvn: allow branches outside of refs/remotes
Adam Brewster [Wed, 12 Aug 2009 03:14:27 +0000 (23:14 -0400)] 
svn: allow branches outside of refs/remotes

It may be convenient for some users to store svn remote tracking
branches outside of the refs/remotes/ heirarchy.

To accomplish this feat, this patch includes the entire path to
the ref in $r->{'refname'} in &read_all_remotes and tries to change
references to this entry so the new value makes sense.

[ew: fixed backwards compatibility, long lines]

Signed-off-by: Adam Brewster <adambrewster@gmail.com>
Signed-off-by: Eric Wong <normalperson@yhbt.net>
14 years agosvn: initial "master" points to trunk if possible
Eric Wong [Wed, 12 Aug 2009 23:01:59 +0000 (16:01 -0700)] 
svn: initial "master" points to trunk if possible

Since "trunk" is a convention for the main development branch in
the SVN world, try to make that the master branch upon initial
checkout if it exists.  This is probably less surprising based
on user requests.

t9135 was the only test which relied on the previous behavior
and thus needed to be modified.

Signed-off-by: Eric Wong <normalperson@yhbt.net>
14 years agoMerge branch 'master' into next
Junio C Hamano [Wed, 12 Aug 2009 23:42:33 +0000 (16:42 -0700)] 
Merge branch 'master' into next

* master:
  push: point to 'git pull' and 'git push --force' in case of non-fast forward
  Documentation: add: <filepattern>... is optional
  Change mentions of "git programs" to "git commands"
  Documentation: merge: one <remote> is required
  help.c: give correct structure's size to memset()
  allow pull --rebase on branch yet to be born

14 years agoMerge branch 'jc/shortstatus' (early part) into next
Junio C Hamano [Wed, 12 Aug 2009 23:42:27 +0000 (16:42 -0700)] 
Merge branch 'jc/shortstatus' (early part) into next

* 'jc/shortstatus' (early part):
  wt-status: collect untracked files in a separate "collect" phase
  Make git_status_config() file scope static to builtin-commit.c
  wt-status: move wt_status_colors[] into wt_status structure
  wt-status: move many global settings to wt_status structure
  commit: --dry-run

14 years agoMerge branch 'lt/block-sha1' into next
Junio C Hamano [Wed, 12 Aug 2009 23:42:27 +0000 (16:42 -0700)] 
Merge branch 'lt/block-sha1' into next

* lt/block-sha1:
  block-sha1: support for architectures with memory alignment restrictions
  block-sha1: split the different "hacks" to be individually selected
  block-sha1: move code around

14 years agoMerge branch 'maint'
Junio C Hamano [Wed, 12 Aug 2009 23:36:04 +0000 (16:36 -0700)] 
Merge branch 'maint'

* maint:
  push: point to 'git pull' and 'git push --force' in case of non-fast forward
  Documentation: add: <filepattern>... is optional
  Change mentions of "git programs" to "git commands"
  Documentation: merge: one <remote> is required
  help.c: give correct structure's size to memset()

14 years agoMerge branch 'maint-1.6.3' into maint
Junio C Hamano [Wed, 12 Aug 2009 23:15:55 +0000 (16:15 -0700)] 
Merge branch 'maint-1.6.3' into maint

* maint-1.6.3:
  Change mentions of "git programs" to "git commands"
  Documentation: merge: one <remote> is required
  help.c: give correct structure's size to memset()

14 years agopush: point to 'git pull' and 'git push --force' in case of non-fast forward
Matthieu Moy [Sat, 8 Aug 2009 07:51:08 +0000 (09:51 +0200)] 
push: point to 'git pull' and 'git push --force' in case of non-fast forward

'git push' failing because of non-fast forward is a very common situation,
and a beginner does not necessarily understand "fast forward" immediately.

Add a new section to the git-push documentation and refer them to it.

Signed-off-by: Matthieu Moy <Matthieu.Moy@imag.fr>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
Signed-off-by: Nanako Shiraishi <nanako3@lavabit.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
14 years agoDocumentation: add: <filepattern>... is optional
Paul Bolle [Tue, 11 Aug 2009 13:03:10 +0000 (15:03 +0200)] 
Documentation: add: <filepattern>... is optional

<filepattern>... is optional (e.g. when the --all or --update
options are used) so use square brackets in the synopsis.

Signed-off-by: Paul Bolle <pebolle@tiscali.nl>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
14 years agoChange 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>
14 years agoDocumentation: merge: one <remote> is required
Paul 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>
14 years agohelp.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>
14 years agoallow pull --rebase on branch yet to be born
Jeff King [Wed, 12 Aug 2009 03:27:40 +0000 (23:27 -0400)] 
allow pull --rebase on branch yet to be born

When doing a "pull --rebase", we check to make sure that the index and
working tree are clean. The index-clean check compares the index against
HEAD. The test erroneously reports dirtiness if we don't have a HEAD yet.

In such an "unborn branch" case, by definition, a non-empty index won't
be based on whatever we are pulling down from the remote, and will lose
the local change.  Just check if $GIT_DIR/index exists and error out.

Signed-off-by: Jeff King <peff@peff.net>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
14 years agoblock-sha1: support for architectures with memory alignment restrictions
Nicolas Pitre [Wed, 12 Aug 2009 19:47:55 +0000 (15:47 -0400)] 
block-sha1: support for architectures with memory alignment restrictions

This is needed on architectures with poor or non-existent unaligned memory
support and/or no fast byte swap instruction (such as ARM) by using byte
accesses to memory and shifting the result together.

This also makes the code portable, therefore the byte access methods are
the defaults.  Any architecture that properly supports unaligned word
accesses in hardware simply has to enable the alternative methods.

Signed-off-by: Nicolas Pitre <nico@cam.org>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
14 years agoblock-sha1: split the different "hacks" to be individually selected
Nicolas Pitre [Wed, 12 Aug 2009 19:46:41 +0000 (15:46 -0400)] 
block-sha1: split the different "hacks" to be individually selected

This is to make it easier for them to be selected individually depending
on the architecture instead of the other way around i.e. having each
architecture select a list of hacks up front.  That makes for clearer
documentation as well.

Signed-off-by: Nicolas Pitre <nico@cam.org>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
14 years agoblock-sha1: move code around
Nicolas Pitre [Wed, 12 Aug 2009 19:45:48 +0000 (15:45 -0400)] 
block-sha1: move code around

Move the code around so specific architecture hacks are defined first.
Also make one line comments actually one line.  No code change.

Signed-off-by: Nicolas Pitre <nico@cam.org>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
14 years agoMerge branch 'bc/maint-am-email' into next
Junio C Hamano [Tue, 11 Aug 2009 05:30:45 +0000 (22:30 -0700)] 
Merge branch 'bc/maint-am-email' into next

* bc/maint-am-email:
  git-am: print fair error message when format detection fails
  am: allow individual e-mail files as input

14 years agoMerge branch 'js/maint-cover-letter-non-ascii' into next
Junio C Hamano [Tue, 11 Aug 2009 05:30:45 +0000 (22:30 -0700)] 
Merge branch 'js/maint-cover-letter-non-ascii' into next

* js/maint-cover-letter-non-ascii:
  Correctly mark cover letters' encodings if they are not pure ASCII
  Expose the has_non_ascii() function

14 years agoMerge branch 'jc/verify-pack-stat' into next
Junio C Hamano [Tue, 11 Aug 2009 05:28:55 +0000 (22:28 -0700)] 
Merge branch 'jc/verify-pack-stat' into next

* jc/verify-pack-stat:
  verify-pack --stat-only: show histogram without verifying

14 years agoMerge branch 'jc/maint-clean-nested-dir-safety' into next
Junio C Hamano [Tue, 11 Aug 2009 05:28:55 +0000 (22:28 -0700)] 
Merge branch 'jc/maint-clean-nested-dir-safety' into next

* jc/maint-clean-nested-dir-safety:
  clean: require double -f options to nuke nested git repository and work tree

14 years agoMerge branch 'lt/block-sha1' into next
Junio C Hamano [Tue, 11 Aug 2009 05:24:55 +0000 (22:24 -0700)] 
Merge branch 'lt/block-sha1' into next

* lt/block-sha1:
  block-sha1: improve code on large-register-set machines
  block-sha1: improved SHA1 hashing
  block-sha1: perform register rotation using cpp

14 years agoMerge branch 'master' into next
Junio C Hamano [Tue, 11 Aug 2009 05:24:44 +0000 (22:24 -0700)] 
Merge branch 'master' into next

* master:
  Fix typos in git-remote.txt and git-symbolic-ref.txt
  Check return value of ftruncate call in http.c
  http.c: replace usage of temporary variable for urls
  http.c: free preq when aborting
  git-svn: ignore leading blank lines in svn:ignore
  svn: Honor --prefix option in init without --stdlayout
  svn: Add && to t9107-git-svn-migrate.sh
  git-instaweb: fix mod_perl detection for apache2
  Document 'stash clear' recovery via unreachable commits

14 years agoMerge branch 'maint'
Junio C Hamano [Tue, 11 Aug 2009 05:23:59 +0000 (22:23 -0700)] 
Merge branch 'maint'

* maint:
  Fix typos in git-remote.txt and git-symbolic-ref.txt
  git-instaweb: fix mod_perl detection for apache2

14 years agoMerge branch 'maint-1.6.3' into maint
Junio C Hamano [Tue, 11 Aug 2009 05:23:48 +0000 (22:23 -0700)] 
Merge branch 'maint-1.6.3' into maint

* maint-1.6.3:
  Fix typos in git-remote.txt and git-symbolic-ref.txt

14 years agoMerge branch 'jk/push-quiet'
Junio C Hamano [Tue, 11 Aug 2009 05:18:21 +0000 (22:18 -0700)] 
Merge branch 'jk/push-quiet'

* jk/push-quiet:
  transport: don't show push status if --quiet is given
  transport: pass "quiet" flag to pack-objects
  push: add --quiet flag

14 years agoMerge branch 'jc/maint-merge-recursive-fix'
Junio C Hamano [Tue, 11 Aug 2009 05:17:01 +0000 (22:17 -0700)] 
Merge branch 'jc/maint-merge-recursive-fix'

* jc/maint-merge-recursive-fix:
  merge-recursive: don't segfault while handling rename clashes

14 years agoMerge branch 'zf/maint-gitweb-acname'
Junio C Hamano [Tue, 11 Aug 2009 05:16:47 +0000 (22:16 -0700)] 
Merge branch 'zf/maint-gitweb-acname'

* zf/maint-gitweb-acname:
  gitweb: parse_commit_text encoding fix

14 years agoMerge branch 'ns/am-raw-email'
Junio C Hamano [Tue, 11 Aug 2009 05:16:42 +0000 (22:16 -0700)] 
Merge branch 'ns/am-raw-email'

* ns/am-raw-email:
  git-am: print fair error message when format detection fails
  am: allow individual e-mail files as input

14 years agoMerge branch 'np/maint-limit-delta-cache'
Junio C Hamano [Tue, 11 Aug 2009 05:16:09 +0000 (22:16 -0700)] 
Merge branch 'np/maint-limit-delta-cache'

* np/maint-limit-delta-cache:
  don't let the delta cache grow unbounded in 'git repack'

14 years agoMerge branch 'jp/symlink-dirs'
Junio C Hamano [Tue, 11 Aug 2009 05:15:41 +0000 (22:15 -0700)] 
Merge branch 'jp/symlink-dirs'

* jp/symlink-dirs:
  t6035-merge-dir-to-symlink depends on SYMLINKS prerequisite
  git-checkout: be careful about untracked symlinks
  lstat_cache: guard against full match of length of 'name' parameter
  Demonstrate bugs when a directory is replaced with a symlink

14 years agoMerge branch 'mk/grep-max-depth'
Junio C Hamano [Tue, 11 Aug 2009 05:15:12 +0000 (22:15 -0700)] 
Merge branch 'mk/grep-max-depth'

* mk/grep-max-depth:
  grep: Add --max-depth option.

14 years agoMerge branch 'js/run-command-updates'
Junio C Hamano [Tue, 11 Aug 2009 05:14:57 +0000 (22:14 -0700)] 
Merge branch 'js/run-command-updates'

* js/run-command-updates:
  api-run-command.txt: describe error behavior of run_command functions
  run-command.c: squelch a "use before assignment" warning
  receive-pack: remove unnecessary run_status report
  run_command: report failure to execute the program, but optionally don't
  run_command: encode deadly signal number in the return value
  run_command: report system call errors instead of returning error codes
  run_command: return exit code as positive value
  MinGW: simplify waitpid() emulation macros

14 years agoFix 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>
14 years agoblock-sha1: improve code on large-register-set machines
Linus Torvalds [Mon, 10 Aug 2009 23:52:07 +0000 (16:52 -0700)] 
block-sha1: improve code on large-register-set machines

For x86 performance (especially in 32-bit mode) I added that hack to write
the SHA1 internal temporary hash using a volatile pointer, in order to get
gcc to not try to cache the array contents. Because gcc will do all the
wrong things, and then spill things in insane random ways.

But on architectures like PPC, where you have 32 registers, it's actually
perfectly reasonable to put the whole temporary array[] into the register
set, and gcc can do so.

So make the 'volatile unsigned int *' cast be dependent on a
SMALL_REGISTER_SET preprocessor symbol, and enable it (currently) on just
x86 and x86-64.  With that, the routine is fairly reasonable even when
compared to the hand-scheduled PPC version. Ben Herrenschmidt reports on
a G5:

 * Paulus asm version:       about 3.67s
 * Yours with no change:     about 5.74s
 * Yours without "volatile": about 3.78s

so with this the C version is within about 3% of the asm one.

And add a lot of commentary on what the heck is going on.

Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
14 years agogit-am: print fair error message when format detection fails
Nicolas Sebrecht [Fri, 7 Aug 2009 01:08:13 +0000 (20:08 -0500)] 
git-am: print fair error message when format detection fails

Avoid git ending with this message:
"Patch format  is not supported."

With improved error message in the format detection failure case by
Giuseppe Bilotta.

Signed-off-by: Nicolas Sebrecht <ni.s@laposte.net>
Signed-off-by: Brandon Casey <drafnel@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
14 years agoam: allow individual e-mail files as input
Junio C Hamano [Fri, 7 Aug 2009 01:08:12 +0000 (20:08 -0500)] 
am: allow individual e-mail files as input

We traditionally allowed a mbox file or a directory name of a maildir (but
never an individual file inside a maildir) to be given to "git am".  Even
though an individual file in a maildir (or more generally, a piece of
RFC2822 e-mail) is not a mbox file, it contains enough information to
create a commit out of it, so there is no reason to reject one.  Running
mailsplit on such a file feels stupid, but it does not hurt.

This builds on top of a5a6755 (git-am foreign patch support: introduce
patch_format, 2009-05-27) that introduced mailbox format detection.  The
codepath to deal with a mbox requires it to begin with "From " line and
also allows it to begin with "From: ", but a random piece of e-mail can
and often do begin with any valid RFC2822 header lines.

Instead of checking the first line, we extract all the lines up to the
first empty line, and make sure they look like e-mail headers.

A test is added to t4150 to demonstrate this feature.

Signed-off-by: Junio C Hamano <gitster@pobox.com>
Signed-off-by: Brandon Casey <drafnel@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
14 years agoCorrectly mark cover letters' encodings if they are not pure ASCII
Johannes Schindelin [Mon, 10 Aug 2009 16:22:22 +0000 (18:22 +0200)] 
Correctly mark cover letters' encodings if they are not pure ASCII

If your name is, say, Üwë, you want your cover letters to appear
correctly.  Convince format-patch to mark it as 8-bit.

Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
14 years agoExpose the has_non_ascii() function
Johannes Schindelin [Mon, 10 Aug 2009 16:22:18 +0000 (18:22 +0200)] 
Expose the has_non_ascii() function

This function is useful outside of log-tree.c, too.

Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
14 years agogit-p4: stream from perforce to speed up clones
Luke Diamand [Wed, 29 Jul 2009 23:13:46 +0000 (00:13 +0100)] 
git-p4: stream from perforce to speed up clones

Change commit() to stream data from Perforce and into fast-import
rather than reading into memory first, and then writing out. This
hugely reduces the memory requirements when cloning non-incrementally.

Signed-off-by: Luke Diamand <luke@diamand.org>
Signed-off-by: Pete Wyckoff <pw@padd.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
14 years agoCheck return value of ftruncate call in http.c
Jeff Lasslett [Mon, 10 Aug 2009 16:05:06 +0000 (00:05 +0800)] 
Check return value of ftruncate call in http.c

In new_http_object_request(), check ftruncate() call return value and
handle possible errors.

Signed-off-by: Jeff Lasslett <jeff.lasslett@gmail.com>
Signed-off-by: Tay Ray Chuan <rctay89@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
14 years agohttp.c: replace usage of temporary variable for urls
Tay Ray Chuan [Mon, 10 Aug 2009 15:59:55 +0000 (23:59 +0800)] 
http.c: replace usage of temporary variable for urls

Use preq->url in new_http_pack_request and freq->url in
new_http_object_request when calling curl_setopt(CURLOPT_URL), instead
of using an intermediate variable, 'url'.

Signed-off-by: Tay Ray Chuan <rctay89@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
14 years agohttp.c: free preq when aborting
Tay Ray Chuan [Mon, 10 Aug 2009 15:55:48 +0000 (23:55 +0800)] 
http.c: free preq when aborting

Free preq in new_http_pack_request when aborting. preq was allocated
before jumping to the 'abort' label so this is safe.

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