git.git
16 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.

16 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

16 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 <redacted>
Signed-off-by: Junio C Hamano <redacted>
16 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 <redacted>
Signed-off-by: Junio C Hamano <redacted>
16 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 <redacted>
Signed-off-by: Brandon Casey <redacted>
Signed-off-by: Junio C Hamano <redacted>
16 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 <redacted>
Signed-off-by: Brandon Casey <redacted>
Signed-off-by: Junio C Hamano <redacted>
16 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 <redacted>
Signed-off-by: Junio C Hamano <redacted>
16 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 <redacted>
Signed-off-by: Junio C Hamano <redacted>
16 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 <redacted>
Signed-off-by: Pete Wyckoff <redacted>
Signed-off-by: Junio C Hamano <redacted>
16 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 <redacted>
Signed-off-by: Tay Ray Chuan <redacted>
Signed-off-by: Junio C Hamano <redacted>
16 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 <redacted>
Signed-off-by: Junio C Hamano <redacted>
16 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 <redacted>
Signed-off-by: Junio C Hamano <redacted>
16 years agoMerge branch 'master' of git://git.bogomips.org/git-svn
Junio C Hamano [Mon, 10 Aug 2009 20:22:33 +0000 (13:22 -0700)]
Merge branch 'master' of git://git.bogomips.org/git-svn

* 'master' of git://git.bogomips.org/git-svn:
  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

16 years agowt-status: collect untracked files in a separate "collect" phase
Junio C Hamano [Mon, 10 Aug 2009 07:36:33 +0000 (00:36 -0700)]
wt-status: collect untracked files in a separate "collect" phase

In a way similar to updated and locally modified files are collected.

Signed-off-by: Junio C Hamano <redacted>
16 years agoMake git_status_config() file scope static to builtin-commit.c
Junio C Hamano [Mon, 10 Aug 2009 06:12:19 +0000 (23:12 -0700)]
Make git_status_config() file scope static to builtin-commit.c

Signed-off-by: Junio C Hamano <redacted>
16 years agowt-status: move wt_status_colors[] into wt_status structure
Junio C Hamano [Mon, 10 Aug 2009 06:08:40 +0000 (23:08 -0700)]
wt-status: move wt_status_colors[] into wt_status structure

The benefit of this one alone is somewhat iffy, but for completeness this
moves the wt_status_colors[] color palette to the wt_status structure to
complete the libification started by the previous commit.

Signed-off-by: Junio C Hamano <redacted>
16 years agowt-status: move many global settings to wt_status structure
Junio C Hamano [Mon, 10 Aug 2009 04:59:30 +0000 (21:59 -0700)]
wt-status: move many global settings to wt_status structure

Turn four global variables (wt_status_use_color, show_tracked_files,
wt_status_relative_paths, and wt_status_submodule_summary) into fields of
wt_status structure.  They can also lose "wt_status_" prefix.

Get rid of "untracked" field that was used only to keep track of otherwise
available information redundantly.

Signed-off-by: Junio C Hamano <redacted>
16 years agogit-gui: remove warning when deleting correctly merged remote branch
Heiko Voigt [Mon, 15 Jun 2009 21:19:56 +0000 (23:19 +0200)]
git-gui: remove warning when deleting correctly merged remote branch

If the user wants to delete a remote branch and selects the correct
"merged into" we should not warn that "Recovering deleted branches is
difficult". For local branches we do the same already.

Signed-off-by: Heiko Voigt <redacted>
Signed-off-by: Shawn O. Pearce <redacted>
16 years agogit-gui: Added Greek translation & glossary
Jimmy Angelakos [Tue, 23 Jun 2009 18:35:35 +0000 (21:35 +0300)]
git-gui: Added Greek translation & glossary

Signed-off-by: Shawn O. Pearce <redacted>
16 years agogit-gui: display summary when showing diff of a submodule
Jens Lehmann [Tue, 21 Jul 2009 17:32:31 +0000 (19:32 +0200)]
git-gui: display summary when showing diff of a submodule

As it is hard to say what changed in a submodule by looking at the hashes,
let's show the colored submodule summary instead.

Signed-off-by: Jens Lehmann <redacted>
Signed-off-by: Shawn O. Pearce <redacted>
16 years agogit-svn: ignore leading blank lines in svn:ignore
Michael Haggerty [Fri, 7 Aug 2009 19:21:21 +0000 (21:21 +0200)]
git-svn: ignore leading blank lines in svn:ignore

Subversion ignores all blank lines in svn:ignore properties.  The old
git-svn code ignored blank lines everywhere except for the first line
of the svn:ignore property.  This patch makes the "git svn
show-ignore" and "git svn create-ignore" commands ignore leading blank
lines, too.

Also include leading blank lines in the test suite.

Signed-off-by: Michael Haggerty <redacted>
Acked-by: Eric Wong <redacted>
16 years agosvn: Honor --prefix option in init without --stdlayout
Adam Brewster [Tue, 4 Aug 2009 01:40:38 +0000 (21:40 -0400)]
svn: Honor --prefix option in init without --stdlayout

Most users who type

  git svn init file:///tmp/repo --prefix=my-svn/

would expect the root of the svn repository to be tracked by
refs/remotes/my-svn/git-svn.

Acked-by: Eric Wong <redacted>
16 years agosvn: Add && to t9107-git-svn-migrate.sh
Adam Brewster [Tue, 4 Aug 2009 01:40:37 +0000 (21:40 -0400)]
svn: Add && to t9107-git-svn-migrate.sh

It was probably intended for the test to fail unless all of the
commands succeed.

[ew: fixed tests to actually work]

Signed-off-by: Eric Wong <redacted>
16 years agogit-instaweb: fix mod_perl detection for apache2
Mark A Rada [Sat, 8 Aug 2009 22:24:02 +0000 (18:24 -0400)]
git-instaweb: fix mod_perl detection for apache2

The script was looking for something that matched the '^our $gitbin'
regex, which no longer exists in gitweb.cgi.

Now it looks for 'MOD_PERL', which should be on the line that checks
to see if the script is running in a mod_perl environment.

Signed-off-by: Mark Rada <redacted>
Signed-off-by: Junio C Hamano <redacted>
16 years agoDocument 'stash clear' recovery via unreachable commits
Thomas Rast [Sun, 9 Aug 2009 00:47:36 +0000 (02:47 +0200)]
Document 'stash clear' recovery via unreachable commits

Add an example to the stash documentation that shows how to quickly
find candidate commits among the 'git fsck --unreachable' output.
Unless you have merges of branch names containing WIP, or edit your
merge messages to say WIP, there will be no false positives.

Snippet written by Björn "doener" Steinbrink and me after zepolen_
asked on IRC.

Signed-off-by: Thomas Rast <redacted>
Signed-off-by: Junio C Hamano <redacted>
16 years agomerge: indicate remote tracking branches in merge message
Jeff King [Sun, 9 Aug 2009 10:02:51 +0000 (06:02 -0400)]
merge: indicate remote tracking branches in merge message

Previously when merging directly from a local tracking
branch like:

  git merge origin/master

The merge message said:

   Merge commit 'origin/master'

     * commit 'origin/master':
       ...

Instead, let's be more explicit about what we are merging:

   Merge remote branch 'origin/master'

     * origin/master:
       ...

We accomplish this by recognizing remote tracking branches
in git-merge when we build the simulated FETCH_HEAD output
that we feed to fmt-merge-msg.

In addition to a new test in t7608, we have to tweak the
expected output of t3409, which does such a merge.

Signed-off-by: Jeff King <redacted>
Signed-off-by: Junio C Hamano <redacted>
16 years agomerge: fix incorrect merge message for ambiguous tag/branch
Jeff King [Sun, 9 Aug 2009 10:02:24 +0000 (06:02 -0400)]
merge: fix incorrect merge message for ambiguous tag/branch

If we have both a tag and a branch named "foo", then calling
"git merge foo" will warn about the ambiguous ref, but merge
the tag.

When generating the commit message, though, we simply
checked whether "refs/heads/foo" existed, and if it did,
assumed it was a branch. This led to the statement "Merge
branch 'foo'" in the commit message, which is quite wrong.

Instead, we should use dwim_ref to find the actual ref used,
and describe it appropriately.

In addition to the test in t7608, we must also tweak the
expected output of t4202, which was accidentally triggering
this bug.

Signed-off-by: Jeff King <redacted>
Signed-off-by: Junio C Hamano <redacted>
16 years agoadd tests for merge message headings
Jeff King [Sun, 9 Aug 2009 10:01:48 +0000 (06:01 -0400)]
add tests for merge message headings

When calling "git merge $X", we automatically generate a
commit message containing something like "Merge branch
'$X'". This test script checks that those messages say what
they should, and exposes a failure when merging a refname
that is ambiguous between a tag and a branch.

Signed-off-by: Jeff King <redacted>
Signed-off-by: Junio C Hamano <redacted>
16 years agot/Makefile: include config.mak
Jeff King [Sun, 9 Aug 2009 08:50:37 +0000 (04:50 -0400)]
t/Makefile: include config.mak

This is useful if you want to specify GIT_TEST_OPTS that you
always use.

Signed-off-by: Jeff King <redacted>
Signed-off-by: Junio C Hamano <redacted>
16 years agotests: allow user to specify trash directory location
Jeff King [Sun, 9 Aug 2009 08:39:45 +0000 (04:39 -0400)]
tests: allow user to specify trash directory location

The tests generate a large amount of I/O activity creating
and destroying repositories and files. We can improve the
time it takes to run the test suite by creating trash
directories on filesystems with better performance
characteristic, even though we may not want the rest of the
git repository on those filesystems (e.g., because they are
not network connected, or because they are temporary
ramdisks).

For example, on a dual processor system:

  $ cd t && time make -j32
  real    1m51.562s
  user    0m59.260s
  sys     1m20.933s

  # /dev/shm is tmpfs
  $ cd t && time make -j32 GIT_TEST_OPTS="--root=/dev/shm"
  real    1m1.484s
  user    0m53.555s
  sys     1m5.264s

We almost halve the wall clock time, and we utilize the
dual processors much better.

Signed-off-by: Jeff King <redacted>
Signed-off-by: Junio C Hamano <redacted>
16 years agotests: provide $TRASH_DIRECTORY variable
Jeff King [Sun, 9 Aug 2009 08:38:11 +0000 (04:38 -0400)]
tests: provide $TRASH_DIRECTORY variable

Most scripts don't care about the absolute path to the trash
directory. The one exception was t4014 script, which pieced
together $TEST_DIRECTORY and $test itself to get an absolute
directory.

Instead, let's provide a $TRASH_DIRECTORY which specifies
the same thing. This keeps the $test variable internal to
test-lib.sh and paves the way for trash directories in other
locations.

Signed-off-by: Jeff King <redacted>
Signed-off-by: Junio C Hamano <redacted>
16 years agotests: use "$TEST_DIRECTORY" instead of ".."
Jeff King [Sun, 9 Aug 2009 08:37:52 +0000 (04:37 -0400)]
tests: use "$TEST_DIRECTORY" instead of ".."

The $TEST_DIRECTORY variable allows tests to find the
top-level test directory regardless of the current working
directory.

In the past, this has been used to accomodate tests which
change directories, but it is also the first step to being
able to move trash directories outside of the
$TEST_DIRECTORY hierarchy.

Signed-off-by: Jeff King <redacted>
Signed-off-by: Junio C Hamano <redacted>
16 years agot0001-init: split the existence test from the permission test
Johannes Sixt [Sun, 9 Aug 2009 16:02:55 +0000 (18:02 +0200)]
t0001-init: split the existence test from the permission test

The test for correct permissions after init created a deep directory
must be guarded by POSIXPERM. But testing that the deep dirctory exists
is good even on platforms that do not provide the POSIXPERM prerequiste.

Signed-off-by: Johannes Sixt <redacted>
Signed-off-by: Junio C Hamano <redacted>
16 years agot0001-init: fix a file name
Johannes Sixt [Sun, 9 Aug 2009 15:38:04 +0000 (17:38 +0200)]
t0001-init: fix a file name

Without this change, grep fails because it does not find the file
instead of because it does not find the text in the file.

Signed-off-by: Johannes Sixt <redacted>
Signed-off-by: Junio C Hamano <redacted>
16 years agot6035-merge-dir-to-symlink depends on SYMLINKS prerequisite
Johannes Sixt [Sun, 9 Aug 2009 15:35:02 +0000 (17:35 +0200)]
t6035-merge-dir-to-symlink depends on SYMLINKS prerequisite

Signed-off-by: Johannes Sixt <redacted>
Signed-off-by: Junio C Hamano <redacted>
16 years agoapi-run-command.txt: describe error behavior of run_command functions
Johannes Sixt [Sat, 8 Aug 2009 20:44:20 +0000 (22:44 +0200)]
api-run-command.txt: describe error behavior of run_command functions

Signed-off-by: Johannes Sixt <redacted>
Signed-off-by: Junio C Hamano <redacted>
16 years agocommit: --dry-run
Junio C Hamano [Sat, 8 Aug 2009 06:03:36 +0000 (23:03 -0700)]
commit: --dry-run

This teaches --dry-run option to "git commit".

It is the same as "git status", but in the longer term we would want to
change the semantics of "git status" not to be the preview of commit, and
this is the first step for doing so.

Signed-off-by: Junio C Hamano <redacted>
16 years agoMerge branch 'maint'
Junio C Hamano [Sat, 8 Aug 2009 05:35:17 +0000 (22:35 -0700)]
Merge branch 'maint'

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

16 years agoblock-sha1: improved SHA1 hashing
Linus Torvalds [Sat, 8 Aug 2009 04:16:46 +0000 (21:16 -0700)]
block-sha1: improved SHA1 hashing

I think I have found a way to avoid the gcc crazyness.

Lookie here:

#             TIME[s] SPEED[MB/s]
rfc3174         5.094       119.8
rfc3174         5.098       119.7
linus           1.462       417.5
linusas         2.008         304
linusas2        1.878         325
mozilla         5.566       109.6
mozillaas       5.866       104.1
openssl         1.609       379.3
spelvin         1.675       364.5
spelvina        1.601       381.3
nettle          1.591       383.6

notice? I outperform all the hand-tuned asm on 32-bit too. By quite a
margin, in fact.

Now, I didn't try a P4, and it's possible that it won't do that there, but
the 32-bit code generation sure looks impressive on my Nehalem box. The
magic? I force the stores to the 512-bit hash bucket to be done in order.
That seems to help a lot.

The diff is trivial (on top of the "rename registers with cpp" patch), as
appended. And it does seem to fix the P4 issues too, although I can
obviously (once again) only test Prescott, and only in 64-bit mode:

#             TIME[s] SPEED[MB/s]
rfc3174         1.662       36.73
rfc3174          1.64       37.22
linus          0.2523       241.9
linusas        0.4367       139.8
linusas2       0.4487         136
mozilla        0.9704        62.9
mozillaas      0.9399       64.94

that's some really impressive improvement. All from just saying "do the
stores in the order I told you to, dammit!" to the compiler.

Signed-off-by: Linus Torvalds <redacted>
Signed-off-by: Junio C Hamano <redacted>
16 years agoblock-sha1: perform register rotation using cpp
Linus Torvalds [Thu, 6 Aug 2009 19:41:00 +0000 (12:41 -0700)]
block-sha1: perform register rotation using cpp

Instead of letting the compiler to figure out the optimal way to rotate
register usage, explicitly rotate the register names with cpp.

Signed-off-by: Linus Torvalds <redacted>
Signed-off-by: Junio C Hamano <redacted>
16 years agoverify-pack --stat-only: show histogram without verifying
Junio C Hamano [Fri, 7 Aug 2009 22:45:30 +0000 (15:45 -0700)]
verify-pack --stat-only: show histogram without verifying

When this option is given, the command does not verify the pack contents,
but shows the delta chain histogram.  If used with --verbose, the usual
list of objects is also shown.

Signed-off-by: Junio C Hamano <redacted>
16 years agoMerge branch 'maint' into jc/verify-pack-stat
Junio C Hamano [Sat, 8 Aug 2009 03:44:49 +0000 (20:44 -0700)]
Merge branch 'maint' into jc/verify-pack-stat

* maint: (95 commits)
  verify-pack -v: do not report "chain length 0"
  t5510: harden the way verify-pack is used
  gitweb/README: Document $base_url
  Documentation: git submodule: add missing options to synopsis
  Better usage string for reflog.
  hg-to-git: don't import the unused popen2 module
  send-email: remove debug trace
  config: Keep inner whitespace verbatim
  GIT 1.6.4
  GIT 1.6.3.4
  config.txt: document add.ignore-errors
  request-pull: allow ls-remote to notice remote.$nickname.uploadpack
  Update the documentation of the raw diff output format
  git-rerere.txt: Clarify ambiguity of the config variable
  t9143: do not fail if Compress::Zlib is missing
  Trivial path quoting fixes in git-instaweb
  GIT 1.6.4-rc3
  Documentation/config.txt: a variable can be defined on the section header line
  git svn: make minimize URL more reliable over http(s)
  Disable asciidoc 8.4.1+ semantics for `{plus}` and friends
  ...

16 years agoMerge branch 'maint-1.6.3' into maint
Junio C Hamano [Sat, 8 Aug 2009 03:44:26 +0000 (20:44 -0700)]
Merge branch 'maint-1.6.3' into maint

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

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

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

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

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

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

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

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

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

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

Signed-off-by: Junio C Hamano <redacted>
16 years agot5510: harden the way verify-pack is used
Junio C Hamano [Sat, 8 Aug 2009 03:12:13 +0000 (20:12 -0700)]
t5510: harden the way verify-pack is used

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

Signed-off-by: Junio C Hamano <redacted>
16 years agoShow usage string for 'git log -h', 'git show -h' and 'git diff -h'
Matthieu Moy [Thu, 6 Aug 2009 10:47:21 +0000 (12:47 +0200)]
Show usage string for 'git log -h', 'git show -h' and 'git diff -h'

Signed-off-by: Matthieu Moy <redacted>
Signed-off-by: Junio C Hamano <redacted>
16 years agoMakefile: install hardlinks for git-remote-<scheme> supported by libcurl if possible
Junio C Hamano [Fri, 7 Aug 2009 19:09:29 +0000 (12:09 -0700)]
Makefile: install hardlinks for git-remote-<scheme> supported by libcurl if possible

Instead of installing/copying three programs separately, just install one
and try to make hardlinks to the other two.

Signed-off-by: Junio C Hamano <redacted>
16 years agoMakefile: do not link three copies of git-remote-* programs
Junio C Hamano [Fri, 7 Aug 2009 05:08:09 +0000 (22:08 -0700)]
Makefile: do not link three copies of git-remote-* programs

Instead, link only one and make the rest hardlinks/copies, like we do for
the built-ins.

Signed-off-by: Junio C Hamano <redacted>
16 years agoMakefile: git-http-fetch does not need expat
Jeff King [Fri, 7 Aug 2009 04:21:33 +0000 (00:21 -0400)]
Makefile: git-http-fetch does not need expat

This appears to be a bad cut-and-paste in commit 1088261f.

Signed-off-by: Jeff King <redacted>
Signed-off-by: Junio C Hamano <redacted>
16 years agostatus: show worktree status of conflicted paths separately
Junio C Hamano [Wed, 5 Aug 2009 07:04:51 +0000 (00:04 -0700)]
status: show worktree status of conflicted paths separately

When a path is unmerged in the index, we used to always say "unmerged" in
the "Changed but not updated" section, even when the path was deleted in
the work tree.

Remove unmerged entries from the "Updated" section, and create a new
section "Unmerged paths".  Describe how the different stages conflict
in more detail in this new section.

Note that with the current 3-way merge policy (with or without recursive),
certain combinations of index stages should never happen.  For example,
having only stage #2 means that a path that did not exist in the common
ancestor was added by us while the other branch did not do anything to it,
which would have autoresolved to take our addition.  The code nevertheless
prepares for the possibility that future merge policies may leave a path
in such a state.

Signed-off-by: Junio C Hamano <redacted>
16 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 <redacted>
Signed-off-by: Brandon Casey <redacted>
Signed-off-by: Junio C Hamano <redacted>
16 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 <redacted>
Signed-off-by: Brandon Casey <redacted>
Signed-off-by: Junio C Hamano <redacted>
16 years agogitweb: add support for XZ compressed snapshots
Mark A Rada [Thu, 6 Aug 2009 14:28:25 +0000 (10:28 -0400)]
gitweb: add support for XZ compressed snapshots

The XZ compression format uses the LZMA2 compression algorithm, which
often yields higher compression ratios than both GZip and BZip2 at the
cost of using more CPU time and RAM. XZ is the slowest for compression,
but still much faster than BZip2 for decompression, almost comparable
to GZip (see benchmarks below).

Some simple benchmarks show the pros and cons of using XZ compression;
starting with an already tarball'd archive of the repos listed below.
Memory usage seemed to be consistent for any given algorithm at their
respective default compression levels.

CPU: AMD Sempron 3400+ (1 core @ 1.8GHz with 256K L2 cache)
Virtual Memory Usage
       GZip: 4152K        BZip2: 13352K        XZ: 102M

Linux 2.6 series (f5886c7f96f2542382d3a983c5f13e03d7fc5259)  349M
gzip    23.70s user   0.47s system  99% cpu   24.227 total    76M
gunzip  3.74s user    0.74s system  94% cpu   4.741 total
bzip2   130.96s user  0.53s system  99% cpu   2:11.97 total   59M
bunzip2 31.05s user   1.02s system  99% cpu   32.355 total
xz      448.78s user  0.91s system  99% cpu   7:31.28 total   51M
unxz    7.67s user    0.80s system  98% cpu   8.607 total

Git (0a53e9ddeaddad63ad106860237bbf53411d11a7)                11M
gzip    0.77s user    0.03s system  99% cpu   0.792 total    2.5M
gunzip  0.12s user    0.02s system  98% cpu   0.142 total
bzip2   3.42s user    0.02s system  99% cpu   3.454 total    2.1M
bunzip2 0.95s user    0.03s system  99% cpu   0.984 total
xz      12.88s user   0.14s system  98% cpu   13.239 total   1.9M
unxz    0.27s user    0.03s system  99% cpu   0.298 total

XZ (669413bb2db954bbfde3c4542fddbbab53891eb4)                1.8M
gzip    0.12s user    0.00s system  95% cpu   0.132 total    442K
gunzip  0.02s user    0.00s system  97% cpu   0.027 total
bzip2   1.28s user    0.01s system  99% cpu   1.298 total    363K
bunzip2 0.15s user    0.01s system  100% cpu  0.157 total
xz      1.62s user    0.03s system  99% cpu   1.652 total    347K
unxz    0.05s user    0.00s system  99% cpu   0.058 total

From a time and memory perspective, nothing compares to GZip, but if
given an average upload speed of 20KB/s, it would take ~400 seconds
longer to transfer the BZip2'd kernel snapshot than the XZ snapshot;
the transfer time difference is even greater between GZip and XZ. The
real time savings are relatively the same for all test cases, but less
dramatic for smaller repositories.

XZ decompresses ~1.8-2 times slower than GZip, and ~2.7-3.75 times
faster than BZip2; XZ gets relatively faster as snapshots get larger.
However, XZ takes relatively longer to compress as snapshots get larger.

The downside for XZ'd snapshots is the large CPU and memory load put on
the server to generate the compressed snapshot, though XZ will
eventually
have threading support, and the real clock time for making XZ'd
snapshots
would decrease if the server had a beefy multi-core CPU.

XZ compression is disabled by default to allow upgrades to take place
without any surprises, as the CPU and memory requirements will be an
issue for high load or lightweight servers. Also, the XZ format is still
new (format declared stable ~6 months ago), and there have been no
"stable" releases of the utils yet.

Signed-off-by: Mark Rada <redacted>
Signed-off-by: Junio C Hamano <redacted>
16 years agogitweb: update INSTALL regarding specific snapshot settings
Mark A Rada [Thu, 6 Aug 2009 14:27:26 +0000 (10:27 -0400)]
gitweb: update INSTALL regarding specific snapshot settings

This includes instructions on how to disable a snapshot format and how
to add options to a snapshot format (e.g. setting the compression
level).

Signed-off-by: Mark Rada <redacted>
Signed-off-by: Junio C Hamano <redacted>
16 years agogitweb: support to globally disable a snapshot format
Mark A Rada [Thu, 6 Aug 2009 14:25:39 +0000 (10:25 -0400)]
gitweb: support to globally disable a snapshot format

Allow Gitweb administrators to set a 'disabled' key in the
%known_snapshot_formats hash to disable a specific snapshot format.

All formats are enabled by default to maintain backwards compatibility.

Signed-off-by: Mark Rada <redacted>
Signed-off-by: Junio C Hamano <redacted>
16 years agogit-ls-files.txt: clarify what "other files" mean for --other
Matthieu Moy [Thu, 6 Aug 2009 15:11:48 +0000 (17:11 +0200)]
git-ls-files.txt: clarify what "other files" mean for --other

Signed-off-by: Matthieu Moy <redacted>
Signed-off-by: Junio C Hamano <redacted>
16 years agoblock-sha1: get rid of redundant 'lenW' context
Linus Torvalds [Thu, 6 Aug 2009 14:45:46 +0000 (07:45 -0700)]
block-sha1: get rid of redundant 'lenW' context

.. and simplify the ctx->size logic.

We now count the size in bytes, which means that 'lenW' was always just
the low 6 bits of the total size, so we don't carry it around separately
any more.  And we do the 'size in bits' shift at the end.

Suggested by Nicolas Pitre and linux@horizon.com.

Signed-off-by: Linus Torvalds <redacted>
Signed-off-by: Junio C Hamano <redacted>
16 years agoblock-sha1: Use '(B&C)+(D&(B^C))' instead of '(B&C)|(D&(B|C))' in round 3
Linus Torvalds [Thu, 6 Aug 2009 14:27:57 +0000 (07:27 -0700)]
block-sha1: Use '(B&C)+(D&(B^C))' instead of '(B&C)|(D&(B|C))' in round 3

It's an equivalent expression, but the '+' gives us some freedom in
instruction selection (for example, we can use 'lea' rather than 'add'),
and associates with the other additions around it to give some minor
scheduling freedom.

Suggested-by: linux@horizon.com
Signed-off-by: Linus Torvalds <redacted>
Signed-off-by: Junio C Hamano <redacted>
16 years agoblock-sha1: macroize the rounds a bit further
Linus Torvalds [Thu, 6 Aug 2009 14:20:54 +0000 (07:20 -0700)]
block-sha1: macroize the rounds a bit further

Avoid repeating the shared parts of the different rounds by adding a
macro layer or two. It was already more cpp than C.

Signed-off-by: Linus Torvalds <redacted>
Signed-off-by: Junio C Hamano <redacted>
16 years agoblock-sha1: re-use the temporary array as we calculate the SHA1
Linus Torvalds [Thu, 6 Aug 2009 03:49:41 +0000 (20:49 -0700)]
block-sha1: re-use the temporary array as we calculate the SHA1

The mozilla-SHA1 code did this 80-word array for the 80 iterations.  But
the SHA1 state is really just 512 bits, and you can actually keep it in
a kind of "circular queue" of just 16 words instead.

This requires us to do the xor updates as we go along (rather than as a
pre-phase), but that's really what we want to do anyway.

This gets me really close to the OpenSSL performance on my Nehalem.
Look ma, all C code (ok, there's the rol/ror hack, but that one doesn't
strictly even matter on my Nehalem, it's just a local optimization).

Signed-off-by: Linus Torvalds <redacted>
Signed-off-by: Junio C Hamano <redacted>
16 years agoblock-sha1: make the 'ntohl()' part of the first SHA1 loop
Linus Torvalds [Thu, 6 Aug 2009 03:28:07 +0000 (20:28 -0700)]
block-sha1: make the 'ntohl()' part of the first SHA1 loop

This helps a teeny bit.  But what I -really- want to do is to avoid the
whole 80-array loop, and do the xor updates as I go along..

Signed-off-by: Linus Torvalds <redacted>
Signed-off-by: Junio C Hamano <redacted>
16 years agoblock-sha1: minor fixups
Junio C Hamano [Thu, 6 Aug 2009 20:52:58 +0000 (13:52 -0700)]
block-sha1: minor fixups

Bert Wesarg noticed non-x86 version of SHA_ROT() had a typo.
Also spell in-line assembly as __asm__(), otherwise I seem to get
error: implicit declaration of function 'asm' from my compiler.

Signed-off-by: Junio C Hamano <redacted>
16 years agoblock-sha1: try to use rol/ror appropriately
Linus Torvalds [Thu, 6 Aug 2009 02:42:15 +0000 (19:42 -0700)]
block-sha1: try to use rol/ror appropriately

Use the one with the smaller constant.  It _can_ generate slightly
smaller code (a constant of 1 is special), but perhaps more importantly
it's possibly faster on any uarch that does a rotate with a loop.

Signed-off-by: Linus Torvalds <redacted>
Signed-off-by: Junio C Hamano <redacted>
16 years agoblock-sha1: undo ctx->size change
Junio C Hamano [Thu, 6 Aug 2009 20:56:19 +0000 (13:56 -0700)]
block-sha1: undo ctx->size change

Undo the change I picked up from the mailing list discussion suggested
by Nico, not because it is wrong, but it will be done at the end of the
follow-up series.

Signed-off-by: Junio C Hamano <redacted>
16 years agohttp-fetch: Fix Makefile dependancies
Mike Ralphson [Thu, 6 Aug 2009 13:14:45 +0000 (14:14 +0100)]
http-fetch: Fix Makefile dependancies

Specify git-http-fetch's dependancies explicitly rather than inheriting from
git-http-push, as that may not be built if the libcurl version is too old or
NO_EXPAT is defined

Signed-off-by: Mike Ralphson <redacted>
Signed-off-by: Junio C Hamano <redacted>
16 years agoAdd transport native helper executables to .gitignore
Mike Ralphson [Thu, 6 Aug 2009 13:14:44 +0000 (14:14 +0100)]
Add transport native helper executables to .gitignore

Signed-off-by: Mike Ralphson <redacted>
Signed-off-by: Junio C Hamano <redacted>
16 years agogit-describe: Die early if there are no possible descriptions
Björn Steinbrink [Thu, 6 Aug 2009 12:15:14 +0000 (14:15 +0200)]
git-describe: Die early if there are no possible descriptions

If we find no refs that may be used for git-describe with the current
options, then die early instead of pointlessly walking the whole
history.

In git.git with all the tags dropped, this makes "git describe" go down
from 0.244 to 0.003 seconds for me. This is especially noticeable with
"git submodule status" which calls describe with increasing levels of
allowed refs to be matched. For a submodule without tags, this means
that it walks the whole history in the submodule twice (first annotated,
then plain tags), just to find out that it can't describe the commit
anyway.

Signed-off-by: Björn Steinbrink <redacted>
Signed-off-by: Junio C Hamano <redacted>
16 years agorebase: consistent error messages for staged and unstaged changes.
Matthieu Moy [Wed, 5 Aug 2009 14:56:25 +0000 (16:56 +0200)]
rebase: consistent error messages for staged and unstaged changes.

Previous version expose the output of the plumbing update-index to the
user, which novice users have difficulty to understand.

We still need to run update-index to refresh the cache (if
diff.autorefreshindex is false, git diff won't do it).

Signed-off-by: Matthieu Moy <redacted>
Signed-off-by: Junio C Hamano <redacted>
16 years agogit-tag(1): Refer to git-check-ref-format(1) for <name>
Jari Aalto [Wed, 5 Aug 2009 21:20:32 +0000 (00:20 +0300)]
git-tag(1): Refer to git-check-ref-format(1) for <name>

Explain briefly what characters are prohibited in tag <name>
and point to git-check-ref-format(1) manual page for
further information.

Signed-off-by: Jari Aalto <redacted>
Signed-off-by: Junio C Hamano <redacted>
16 years agogit-rev-list.txt: Clarify the use of multiple revision arguments
Junio C Hamano [Wed, 5 Aug 2009 16:42:33 +0000 (09:42 -0700)]
git-rev-list.txt: Clarify the use of multiple revision arguments

If one thinks of a revision as the set of commits which can be reached
from the rev, and of ^rev as the complement, then multiple arguments to
git rev-list can be neither understood as the intersection nor the union
of the individual sets.

But set language is the natural as well as logical language in which to
phrase this. So, add a paragraph which explains multiple arguments using
set language.

Suggested-by: Michael J Gruber <redacted>
Signed-off-by: Junio C Hamano <redacted>
16 years agogit.el: Clarify documentation of git-commit-tree
David Kågedal [Fri, 31 Jul 2009 07:23:09 +0000 (09:23 +0200)]
git.el: Clarify documentation of git-commit-tree

Signed-off-by: David Kågedal <redacted>
Signed-off-by: Junio C Hamano <redacted>
16 years agowt-status.c: rework the way changes to the index and work tree are summarized
Junio C Hamano [Wed, 5 Aug 2009 06:49:33 +0000 (23:49 -0700)]
wt-status.c: rework the way changes to the index and work tree are summarized

Introduce a new infrastructure to find and summarize changes in a single
string list, and rewrite wt_status_print_{updated,changed} functions using
it.

The goal of this change is to give more information on conflicted paths in
the status output.

Signed-off-by: Junio C Hamano <redacted>
16 years agodon't let the delta cache grow unbounded in 'git repack'
Nicolas Pitre [Wed, 5 Aug 2009 20:55:07 +0000 (16:55 -0400)]
don't let the delta cache grow unbounded in 'git repack'

I have 4GB of RAM on my system which should, in theory, be quite enough
to repack a 600 MB repository.  However the unbounded delta cache size
always pushes it into swap, at which point everything virtually comes to
a halt.  So unbounded caches are never a good idea.

A default of 256MB should be a good compromize between memory usage and
speed where medium sized repositories are still likely to fit in the
cache with a reasonable memory usage, and larger repositories are going
to take quite some time to repack already anyway.

While at it, clarify the associated config variable documentation
entries a bit.

Signed-off-by: Nicolas Pitre <redacted>
Signed-off-by: Junio C Hamano <redacted>
16 years agotransport: don't show push status if --quiet is given
Jeff King [Wed, 5 Aug 2009 20:23:26 +0000 (16:23 -0400)]
transport: don't show push status if --quiet is given

When --quiet is given, the user generally only wants to see
errors. So let's suppress printing the ref status table
unless there is an error, in which case we print out the
whole table.

Signed-off-by: Jeff King <redacted>
Signed-off-by: Junio C Hamano <redacted>
16 years agotransport: pass "quiet" flag to pack-objects
Jeff King [Wed, 5 Aug 2009 20:22:36 +0000 (16:22 -0400)]
transport: pass "quiet" flag to pack-objects

When pushing over the git protocol, pack-objects gives
progress reports about the pack being sent. If "push" is
given the --quiet flag, it now passes "-q" to pack-objects,
suppressing this output.

Signed-off-by: Jeff King <redacted>
Signed-off-by: Junio C Hamano <redacted>
16 years agopush: add --quiet flag
Jeff King [Wed, 5 Aug 2009 20:22:19 +0000 (16:22 -0400)]
push: add --quiet flag

Some transports produce output even without "--verbose"
turned on. This provides a way to tell them to be more
quiet (whereas simply redirecting might lose error
messages).

Signed-off-by: Jeff King <redacted>
Signed-off-by: Junio C Hamano <redacted>
16 years agoAdd new optimized C 'block-sha1' routines
Linus Torvalds [Wed, 5 Aug 2009 23:13:20 +0000 (16:13 -0700)]
Add new optimized C 'block-sha1' routines

Based on the mozilla SHA1 routine, but doing the input data accesses a
word at a time and with 'htonl()' instead of loading bytes and shifting.

It requires an architecture that is ok with unaligned 32-bit loads and a
fast htonl().

Signed-off-by: Linus Torvalds <redacted>
Signed-off-by: Junio C Hamano <redacted>
16 years agogit-http-fetch: not a builtin
Linus Torvalds [Wed, 5 Aug 2009 05:01:59 +0000 (01:01 -0400)]
git-http-fetch: not a builtin

This splits up git-http-fetch so that it isn't built-in.

It also removes the general dependency on curl, because it is no
longer used by any built-in code. Because they are no longer LIB_OBJS,
add LIB_H to the dependencies of http-related object files, and remove
http.h from the dependencies of transport.o

Signed-off-by: Linus Torvalds <redacted>
Signed-off-by: Daniel Barkalow <redacted>
Signed-off-by: Junio C Hamano <redacted>
16 years agoMerge branch 'sb/read-tree'
Junio C Hamano [Wed, 5 Aug 2009 19:40:07 +0000 (12:40 -0700)]
Merge branch 'sb/read-tree'

* sb/read-tree:
  read-tree: migrate to parse-options
  read-tree: convert unhelpful usage()'s to helpful die()'s

16 years agoMerge branch 'jc/apply-epoch-patch'
Junio C Hamano [Wed, 5 Aug 2009 19:40:00 +0000 (12:40 -0700)]
Merge branch 'jc/apply-epoch-patch'

* jc/apply-epoch-patch:
  apply: notice creation/removal patches produced by GNU diff

16 years agoMerge branch 'sb/parse-options'
Junio C Hamano [Wed, 5 Aug 2009 19:39:37 +0000 (12:39 -0700)]
Merge branch 'sb/parse-options'

* sb/parse-options:
  prune-packed: migrate to parse-options
  verify-pack: migrate to parse-options
  verify-tag: migrate to parse-options
  write-tree: migrate to parse-options

16 years agoMerge branch 'ns/init-mkdir'
Junio C Hamano [Wed, 5 Aug 2009 19:39:33 +0000 (12:39 -0700)]
Merge branch 'ns/init-mkdir'

* ns/init-mkdir:
  git init: optionally allow a directory argument

Conflicts:
builtin-init-db.c

16 years agoMerge branch 'mk/init-db-parse-options'
Junio C Hamano [Wed, 5 Aug 2009 19:39:06 +0000 (12:39 -0700)]
Merge branch 'mk/init-db-parse-options'

* mk/init-db-parse-options:
  init-db: migrate to parse-options

16 years agoMerge branch 'jk/maint-show-tag'
Junio C Hamano [Wed, 5 Aug 2009 19:38:54 +0000 (12:38 -0700)]
Merge branch 'jk/maint-show-tag'

* jk/maint-show-tag:
  show: add space between multiple items
  show: suppress extra newline when showing annotated tag

16 years agoMerge branch 'sb/maint-pull-rebase'
Junio C Hamano [Wed, 5 Aug 2009 19:38:39 +0000 (12:38 -0700)]
Merge branch 'sb/maint-pull-rebase'

* sb/maint-pull-rebase:
  pull: support rebased upstream + fetch + pull --rebase
  t5520-pull: Test for rebased upstream + fetch + pull --rebase

16 years agoMerge branch 'ne/futz-upload-pack'
Junio C Hamano [Wed, 5 Aug 2009 19:38:29 +0000 (12:38 -0700)]
Merge branch 'ne/futz-upload-pack'

* ne/futz-upload-pack:
  Shift object enumeration out of upload-pack

Conflicts:
upload-pack.c

16 years agoMerge branch 'maint'
Junio C Hamano [Wed, 5 Aug 2009 19:37:40 +0000 (12:37 -0700)]
Merge branch 'maint'

* maint:
  gitweb/README: Document $base_url
  Documentation: git submodule: add missing options to synopsis
  Better usage string for reflog.
  hg-to-git: don't import the unused popen2 module
  send-email: remove debug trace
  config: Keep inner whitespace verbatim

16 years agoMerge branch 'maint-1.6.3' into maint
Junio C Hamano [Wed, 5 Aug 2009 19:37:24 +0000 (12:37 -0700)]
Merge branch 'maint-1.6.3' into maint

* maint-1.6.3:
  Better usage string for reflog.
  hg-to-git: don't import the unused popen2 module
  send-email: remove debug trace
  config: Keep inner whitespace verbatim

16 years agogitweb: parse_commit_text encoding fix
Zoltán Füzesi [Sun, 2 Aug 2009 07:42:24 +0000 (09:42 +0200)]
gitweb: parse_commit_text encoding fix

Call to_utf8 when parsing author and committer names, otherwise they will appear
with bad encoding if they written by using chop_and_escape_str.

Signed-off-by: Zoltán Füzesi <redacted>
Signed-off-by: Junio C Hamano <redacted>
16 years agogitweb/README: Document $base_url
Jakub Narebski [Tue, 4 Aug 2009 15:54:32 +0000 (17:54 +0200)]
gitweb/README: Document $base_url

Signed-off-by: Jakub Narebski <redacted>
Signed-off-by: Junio C Hamano <redacted>
16 years agoDocumentation: git submodule: add missing options to synopsis
Jens Lehmann [Sat, 1 Aug 2009 18:49:47 +0000 (20:49 +0200)]
Documentation: git submodule: add missing options to synopsis

The option --merge was missing for submodule update and --cached for
submodule summary.

Signed-off-by: Jens Lehmann <redacted>
Signed-off-by: Junio C Hamano <redacted>
16 years agoAllow mailsplit (and hence git-am) to handle mails with CRLF line-endings
Junio C Hamano [Wed, 5 Aug 2009 03:31:59 +0000 (22:31 -0500)]
Allow mailsplit (and hence git-am) to handle mails with CRLF line-endings

It is not that uncommon to have mails with DOS line-ending, notably
Thunderbird and web mailers like Gmail (when saving what they call
"original" message).  So modify mailsplit to convert CRLF line-endings to
just LF.

Since git-rebase is built on top of git-am, add an option to mailsplit to
be used by git-am when it is acting on behalf of git-rebase, to refrain
from doing this conversion.

And add a test to make sure that rebase still works.

Signed-off-by: Brandon Casey <redacted>
Signed-off-by: Junio C Hamano <redacted>
16 years agobuiltin-mailsplit.c: remove read_line_with_nul() since it is no longer used
Brandon Casey [Wed, 5 Aug 2009 03:31:58 +0000 (22:31 -0500)]
builtin-mailsplit.c: remove read_line_with_nul() since it is no longer used

Signed-off-by: Brandon Casey <redacted>
Signed-off-by: Junio C Hamano <redacted>
16 years agobuiltin-mailinfo,builtin-mailsplit: use strbufs
Brandon Casey [Wed, 5 Aug 2009 03:31:57 +0000 (22:31 -0500)]
builtin-mailinfo,builtin-mailsplit: use strbufs

There should be no functional change.  Just the necessary changes and
simplifications associated with calling strbuf_getwholeline() rather
than an internal function or fgets.

Signed-off-by: Brandon Casey <redacted>
Signed-off-by: Junio C Hamano <redacted>
16 years agostrbuf: add new function strbuf_getwholeline()
Brandon Casey [Wed, 5 Aug 2009 03:31:56 +0000 (22:31 -0500)]
strbuf: add new function strbuf_getwholeline()

This function is just like strbuf_getline() except it retains the
line-termination character.  This function will be used by the mailinfo
and mailsplit builtins which require the entire line for parsing.

Signed-off-by: Brandon Casey <redacted>
Signed-off-by: Junio C Hamano <redacted>
16 years agogit apply: option to ignore whitespace differences
Giuseppe Bilotta [Tue, 4 Aug 2009 11:16:49 +0000 (13:16 +0200)]
git apply: option to ignore whitespace differences

Introduce --ignore-whitespace option and corresponding config bool to
ignore whitespace differences while applying patches, akin to the
'patch' program.

'git am', 'git rebase' and the bash git completion are made aware of
this option.

Signed-off-by: Giuseppe Bilotta <redacted>
Signed-off-by: Junio C Hamano <redacted>
16 years agoUse an external program to implement fetching with curl
Daniel Barkalow [Wed, 5 Aug 2009 05:01:56 +0000 (01:01 -0400)]
Use an external program to implement fetching with curl

Use the transport native helper mechanism to fetch by http (and ftp, etc).

Signed-off-by: Daniel Barkalow <redacted>
Signed-off-by: Junio C Hamano <redacted>
git clone https://git.99rst.org/PROJECT