Commit Graph

4820 Commits

Author SHA1 Message Date
Junio C Hamano
5c87a8c560 Merge branch 'maint'
* maint:
  merge-base: Clarify the comments on post processing.
  Update the documentation for git-merge-base
2006-05-16 17:21:02 -07:00
Junio C Hamano
0fa6417c49 Merge branch 'np/pack'
* np/pack:
  improve depth heuristic for maximum delta size
  pack-object: slightly more efficient
  simple euristic for further free packing improvements
2006-05-16 17:20:24 -07:00
Junio C Hamano
c82a22c39c merge-base: Clarify the comments on post processing.
The comment fooled myself believing that we still had an
unsolved horizon effect.

Signed-off-by: Junio C Hamano <junkio@cox.net>
2006-05-16 17:18:22 -07:00
Junio C Hamano
00dd7422db Merge branch 'np/pack' into next
* np/pack:
  improve depth heuristic for maximum delta size
2006-05-16 14:50:26 -07:00
Nicolas Pitre
c3b06a69ff improve depth heuristic for maximum delta size
This provides a linear decrement on the penalty related to delta depth
instead of being an 1/x function.  With this another 5% reduction is
observed on packs for both the GIT repo and the Linux kernel repo, as
well as fixing a pack size regression in another sample repo I have.

Signed-off-by: Nicolas Pitre <nico@cam.org>
Signed-off-by: Junio C Hamano <junkio@cox.net>
2006-05-16 13:35:46 -07:00
Junio C Hamano
94cdb38258 Merge branch 'se/tag'
* se/tag:
  Strip useless "tags/" prefix from git-tag -l output
2006-05-15 23:43:27 -07:00
Junio C Hamano
3aece89fa2 Merge branch 'se/rev-parse'
* se/rev-parse:
  Add "--branches", "--tags" and "--remotes" options to git-rev-parse.
2006-05-15 23:43:23 -07:00
Junio C Hamano
638684824c Merge branch 'se/diff'
* se/diff:
  Convert some "apply --summary" users to "diff --summary".
  Add "--summary" option to git diff.
2006-05-15 23:42:37 -07:00
Junio C Hamano
3b4fd63f72 Merge branch 'se/rebase'
* se/rebase:
  Make git rebase interactive help match documentation.
2006-05-15 23:35:24 -07:00
Fredrik Kuivinen
2aa839614e Update the documentation for git-merge-base
Signed-off-by: Fredrik Kuivinen <freku045@student.liu.se>
Signed-off-by: Junio C Hamano <junkio@cox.net>
2006-05-15 23:19:46 -07:00
Junio C Hamano
70bde2bc31 Merge branch 'jc/diff' into next
* jc/diff:
  builtin-diff: fix comparison between two blobs.
2006-05-15 19:06:06 -07:00
Junio C Hamano
e4e23f3a1c builtin-diff: fix comparison between two blobs.
The code forgot that setup_revisions() leaves parsed object
names in reverse in the list.

Signed-off-by: Junio C Hamano <junkio@cox.net>
2006-05-15 19:05:50 -07:00
Junio C Hamano
35702a983e Merge branch 'master' into next
* master:
  Fix silly typo in new builtin grep
  Fix pack-index issue on 64-bit platforms a bit more portably.
  Install git-send-email by default
  Fix compilation on newer NetBSD systems
2006-05-15 18:26:34 -07:00
Junio C Hamano
8701ea0f62 Merge branch 'lt/oneway'
* lt/oneway:
  read-tree --reset -u fix.
  read-tree -u one-way merge fix to check out locally modified paths.
  Simplify "git reset --hard"
  Allow one-way tree merge to remove old files
2006-05-15 18:15:26 -07:00
Junio C Hamano
63166cd64f Merge branch 'ew/send-email'
* ew/send-email:
  send-email: quiet some warnings, reject invalid addresses
  send-email: allow sendmail binary to be used instead of SMTP
2006-05-15 18:15:03 -07:00
Junio C Hamano
3adac0afe2 Merge branch 'lt/config'
* lt/config:
2006-05-15 18:12:57 -07:00
Junio C Hamano
efca578eec Merge branch 'jc/grep'
* jc/grep: (22 commits)
  Fix silly typo in new builtin grep
  builtin-grep: unparse more command line options.
  builtin-grep: use external grep when we can take advantage of it
  builtin-grep: -F (--fixed-strings)
  builtin-grep: -w fix
  builtin-grep: typofix
  builtin-grep: tighten argument parsing.
  builtin-grep: documentation
  Teach -f <file> option to builtin-grep.
  builtin-grep: -L (--files-without-match).
  builtin-grep: binary files -a and -I
  builtin-grep: terminate correctly at EOF
  builtin-grep: tighten path wildcard vs tree traversal.
  builtin-grep: support -w (--word-regexp).
  builtin-grep: support -c (--count).
  builtin-grep: allow more than one patterns.
  builtin-grep: allow -<n> and -[ABC]<n> notation for context lines.
  builtin-grep: printf %.*s length is int, not ptrdiff_t.
  builtin-grep: do not use setup_revisions()
  builtin-grep: support '-l' option.
  ...
2006-05-15 18:12:06 -07:00
Junio C Hamano
05f743f328 Merge branch 'lt/diff'
* lt/diff:
  git diff: support "-U" and "--unified" options properly
2006-05-15 18:09:15 -07:00
Linus Torvalds
f66475199c Fix silly typo in new builtin grep
The "-F" flag apparently got mis-translated due to some over-eager
copy-paste work into a duplicate "-H" when using the external grep.

Signed-off-by: Linus Torvalds <torvalds@osdl.org>
Signed-off-by: Junio C Hamano <junkio@cox.net>
2006-05-15 18:06:18 -07:00
Junio C Hamano
4cb0e688d8 Merge branch 'jc/apply' into next
* jc/apply:
  git-am: use apply --cached
  apply --cached: apply a patch without using working tree.
2006-05-15 17:58:02 -07:00
Junio C Hamano
b7627278e2 git-am: use apply --cached
Now 'git apply' can apply patch without working tree, preparation
of pristine preimage and postimage trees that are done when falling
back on 3-way merge by "git am" can do so without temporary files.

Signed-off-by: Junio C Hamano <junkio@cox.net>
2006-05-15 17:57:01 -07:00
Junio C Hamano
04e4888e5a apply --cached: apply a patch without using working tree.
A new flag "--cached" takes the cached data, applies the patch
and stores the result in the index, without using the working
tree.

Signed-off-by: Junio C Hamano <junkio@cox.net>
2006-05-15 17:56:53 -07:00
Junio C Hamano
baee9207b9 Merge branch 'jc/grep' into next
* jc/grep:
  builtin-grep: unparse more command line options.
2006-05-15 13:51:35 -07:00
Junio C Hamano
440f869d65 Merge branch 'ew/send-email' into next
* ew/send-email:
  send-email: quiet some warnings, reject invalid addresses
  send-email: allow sendmail binary to be used instead of SMTP
2006-05-15 13:51:23 -07:00
Junio C Hamano
8dd84b0169 Merge branch 'np/pack' into next
* np/pack:
  pack-object: slightly more efficient
  simple euristic for further free packing improvements
2006-05-15 13:51:09 -07:00
Junio C Hamano
f6fb133b84 Merge branch 'lt/oneway' into next
* lt/oneway:
  read-tree --reset -u fix.
2006-05-15 13:51:07 -07:00
Junio C Hamano
d55aaefa3e Merge branch 'fix'
* fix:
  Fix pack-index issue on 64-bit platforms a bit more portably.
  Install git-send-email by default
  Fix compilation on newer NetBSD systems
  git config syntax updates
  Another config file parsing fix.
  checkout: use --aggressive when running a 3-way merge (-m).
2006-05-15 13:48:22 -07:00
Junio C Hamano
ffa0a7ab36 builtin-grep: unparse more command line options.
The earlier one to use external grep missed some often used options.

Signed-off-by: Junio C Hamano <junkio@cox.net>
2006-05-15 13:28:01 -07:00
Junio C Hamano
1b9bc5a7b7 Fix pack-index issue on 64-bit platforms a bit more portably.
Apparently <stdint.h> is not enough for uint32_t on OpenBSD; use
"unsigned int" -- hopefully that would stay 32-bit on every
platform we care about, at least until we update the pack-index
file format.

Our sha1 routines optimized for architectures use uint32_t and
expects '#include <stdint.h>' to be enough, so OpenBSD on arm or
ppc might have similar issues down the road, I dunno.

Signed-off-by: Junio C Hamano <junkio@cox.net>
2006-05-15 13:01:37 -07:00
Eric Wong
f3dd5eae58 Install git-send-email by default
After 567ffeb772 and
4bc87a28be, git-send-email no
longer requires any non-standard Perl modules, so there's no
reason to special-case it.

Signed-off-by: Eric Wong <normalperson@yhbt.net>
Signed-off-by: Junio C Hamano <junkio@cox.net>
2006-05-15 13:00:28 -07:00
Dennis Stosberg
e88856b485 Fix compilation on newer NetBSD systems
NetBSD >=2.0 has iconv() in libc.  A libiconv is not required and
does not exist.

See: http://netbsd.gw.com/cgi-bin/man-cgi?iconv+3+NetBSD-2.0

[jc: with a bit of simplification later discussed on the list.]

Signed-off-by: Dennis Stosberg <dennis@stosberg.net>
Signed-off-by: Junio C Hamano <junkio@cox.net>
2006-05-15 13:00:01 -07:00
Nicolas Pitre
ff45715ce5 pack-object: slightly more efficient
Avoid creating a delta index for objects with maximum depth since they
are not going to be used as delta base anyway.  This also reduce peak
memory usage slightly as the current object's delta index is not useful
until the next object in the loop is considered for deltification. This
saves a bit more than 1% on CPU usage.

Signed-off-by: Nicolas Pitre <nico@cam.org>
Signed-off-by: Junio C Hamano <junkio@cox.net>
2006-05-15 12:32:13 -07:00
Nicolas Pitre
4e8da19581 simple euristic for further free packing improvements
Given that the early eviction of objects with maximum delta depth
may exhibit bad packing on its own, why not considering a bias against
deep base objects in try_delta() to mitigate that bad behavior.

This patch adjust the MAX_size allowed for a delta based on the depth of
the base object as well as enabling the early eviction of max depth
objects from the object window.  When used separately, those two things
produce slightly better and much worse results respectively.  But their
combined effect is a surprising significant packing improvement.

With this really simple patch the GIT repo gets nearly 15% smaller, and
the Linux kernel repo about 5% smaller, with no significantly measurable
CPU usage difference.

Signed-off-by: Nicolas Pitre <nico@cam.org>
Signed-off-by: Junio C Hamano <junkio@cox.net>
2006-05-15 12:31:21 -07:00
Linus Torvalds
6d6776cb49 read-tree --reset -u fix.
The previous commit makes -u to mean "I do want to remove the
local changes, just update it from the read tree" only for
one-way merge.  It makes sense to have it depend on the
"--reset" flag instead.

Signed-off-by: Linus Torvalds <torvalds@osdl.org>
Signed-off-by: Junio C Hamano <junkio@cox.net>
2006-05-15 12:23:04 -07:00
Eric Wong
db3106b274 send-email: quiet some warnings, reject invalid addresses
I'm not sure why we never actually rejected invalid addresses in
the first place.  We just seemed to be using our email validity
checkers to kill duplicates.

Now we just drop invalid email addresses completely and warn
the user about it.

Since we support local sendmail, we'll also accept username-only
addresses.

Signed-off-by: Eric Wong <normalperson@yhbt.net>
Signed-off-by: Junio C Hamano <junkio@cox.net>
2006-05-15 12:14:22 -07:00
Eric Wong
aca7ad7628 send-email: allow sendmail binary to be used instead of SMTP
This should make local mailing possible for machines without
a connection to an SMTP server.

It'll default to using /usr/sbin/sendmail or /usr/lib/sendmail
if no SMTP server is specified (the default).  If it can't find
either of those paths, it'll fall back to connecting to an SMTP
server on localhost.

Signed-off-by: Eric Wong <normalperson@yhbt.net>
Signed-off-by: Junio C Hamano <junkio@cox.net>
2006-05-15 12:13:57 -07:00
Junio C Hamano
cee1b9549b Merge branch 'se/tag' into next
* se/tag:
  Strip useless "tags/" prefix from git-tag -l output
2006-05-15 00:55:31 -07:00
Sean
e6ebb8a3fb Strip useless "tags/" prefix from git-tag -l output 2006-05-15 00:54:31 -07:00
Junio C Hamano
a5954eccdd Merge branch 'jc/grep' into next
* jc/grep:
  builtin-grep: use external grep when we can take advantage of it
2006-05-15 00:52:20 -07:00
Junio C Hamano
64c6f100c4 Merge branch 'jc/apply' into next
* jc/apply:
  apply --numstat: show new name, not old name.
  Ensure author & committer before asking for commit message.
  Install git-send-email by default
  send-email: address expansion for common mailers
  diffstat rename squashing fix.
2006-05-15 00:52:20 -07:00
Junio C Hamano
49e3343c9f apply --numstat: show new name, not old name.
Somehow --stat showed the new name but --numstat showed the old
name for renamed/copied paths.

Signed-off-by: Junio C Hamano <junkio@cox.net>
2006-05-15 00:51:51 -07:00
Junio C Hamano
de1d4fa2a1 Merge branch 'fix'
* fix:
  Ensure author & committer before asking for commit message.
2006-05-15 00:51:37 -07:00
Junio C Hamano
c8df633b4e Merge branch 'fix' into maint
* fix:
  Ensure author & committer before asking for commit message.
2006-05-15 00:49:25 -07:00
Junio C Hamano
e8efc9036f Merge branch 'lt/oneway' into next
* lt/oneway:
  read-tree -u one-way merge fix to check out locally modified paths.
2006-05-15 00:48:00 -07:00
Junio C Hamano
613f02739a read-tree -u one-way merge fix to check out locally modified paths.
The "-u" flag means "update the working tree files", but to
other types of merges, it also implies "I want to keep my local
changes" -- because they prevent local changes from getting lost
by using verify_uptodate.  The one-way merge is different from
other merges in that its purpose is opposite of doing something
else while keeping unrelated local changes.  The point of
one-way merge is to nuke local changes.  So while it feels
somewhat wrong that this actively loses local changes, it is the
right thing to do.

Signed-off-by: Junio C Hamano <junkio@cox.net>
2006-05-15 00:46:57 -07:00
Eric Wong
15739c89fb Install git-send-email by default
After 567ffeb772 and
4bc87a28be, git-send-email no
longer requires any non-standard Perl modules, so there's no
reason to special-case it.

Signed-off-by: Eric Wong <normalperson@yhbt.net>
Signed-off-by: Junio C Hamano <junkio@cox.net>
2006-05-14 22:37:00 -07:00
Eric Wong
994d6c66d3 send-email: address expansion for common mailers
mutt, gnus, pine, mailrc formats should be supported.

Testing and feedback for correctness and completeness of all formats
and support for additional formats would be good.

Nested expansions are also supported.

More than one alias file to be used.

All alias file formats must still of be the same type, though.

Two git repo-config keys are required for this
(as suggested by Ryan Anderson):

    sendemail.aliasesfile = <filename of aliases file>
    sendemail.aliasfiletype = (mutt|gnus|pine|mailrc)

Signed-off-by: Eric Wong <normalperson@yhbt.net>
Acked-by: Ryan Anderson <ryan@michonline.com>
Signed-off-by: Junio C Hamano <junkio@cox.net>
2006-05-14 22:36:27 -07:00
Linus Torvalds
1e2398d7fa builtin-grep: use external grep when we can take advantage of it
It's not perfect, but it gets the "git grep some-random-string" down to
the good old half-a-second range for the kernel.

It should convert more of the argument flags for "grep", that should be
trivial to expand (I did a few just as an example). It should also bother
to try to return the right "hit" value (which it doesn't, right now - the
code is kind of there, but I didn't actually bother to do it _right_).

Also, right now it _just_ limits by number of arguments, but it should
also strictly speaking limit by total argument size (ie add up the length
of the filenames, and do the "exec_grep()" flush call if it's bigger than
some random value like 32kB).

But I think that it's _conceptually_ doing all the right things, and it
seems to work. So maybe somebody else can do some of the final polish.

Signed-off-by: Linus Torvalds <torvalds@osdl.org>
Signed-off-by: Junio C Hamano <junkio@cox.net>
2006-05-14 22:33:24 -07:00
Junio C Hamano
cc908b82a4 diffstat rename squashing fix.
When renaming leading/a/filename to leading/b/filename (and
"filename" is sufficiently long), we tried to squash the rename
to "leading/{a => b}/filename".  However, when "/a" or "/b" part
is empty, we underflowed and tried to print a substring of
length -1.

Signed-off-by: Junio C Hamano <junkio@cox.net>
2006-05-14 22:07:28 -07:00
Junio C Hamano
5fd51c77fa Merge branch 'se/diff' into next
* se/diff:
  Convert some "apply --summary" users to "diff --summary".
  Add "--summary" option to git diff.
2006-05-14 17:12:37 -07:00