gitweb.git
builtin-grep: -L (--files-without-match).Junio C Hamano Thu, 4 May 2006 04:46:29 +0000 (21:46 -0700)

builtin-grep: -L (--files-without-match).

Signed-off-by: Junio C Hamano <junkio@cox.net>

builtin-grep: binary files -a and -IJunio C Hamano Thu, 4 May 2006 04:05:29 +0000 (21:05 -0700)

builtin-grep: binary files -a and -I

Signed-off-by: Junio C Hamano <junkio@cox.net>

builtin-grep: terminate correctly at EOFJunio C Hamano Thu, 4 May 2006 04:03:25 +0000 (21:03 -0700)

builtin-grep: terminate correctly at EOF

It barfed and segfaulted with an incomplete line.

Signed-off-by: Junio C Hamano <junkio@cox.net>

builtin-grep: tighten path wildcard vs tree traversal.Junio C Hamano Wed, 3 May 2006 00:27:07 +0000 (17:27 -0700)

builtin-grep: tighten path wildcard vs tree traversal.

The earlier code descended into Documentation/technical when
given "Documentation/how*" as the pattern, which was too loose.

Signed-off-by: Junio C Hamano <junkio@cox.net>

builtin-grep: support -w (--word-regexp).Junio C Hamano Tue, 2 May 2006 22:40:49 +0000 (15:40 -0700)

builtin-grep: support -w (--word-regexp).

Signed-off-by: Junio C Hamano <junkio@cox.net>

builtin-grep: support -c (--count).Junio C Hamano Tue, 2 May 2006 22:40:49 +0000 (15:40 -0700)

builtin-grep: support -c (--count).

Signed-off-by: Junio C Hamano <junkio@cox.net>

builtin-grep: allow more than one patterns.Junio C Hamano Tue, 2 May 2006 22:40:49 +0000 (15:40 -0700)

builtin-grep: allow more than one patterns.

Signed-off-by: Junio C Hamano <junkio@cox.net>

builtin-grep: allow -<n> and -[ABC]<n> notation for... Junio C Hamano Tue, 2 May 2006 22:17:05 +0000 (15:17 -0700)

builtin-grep: allow -<n> and -[ABC]<n> notation for context lines.

Signed-off-by: Junio C Hamano <junkio@cox.net>

builtin-grep: printf %.*s length is int, not ptrdiff_t.Junio C Hamano Tue, 2 May 2006 08:28:02 +0000 (01:28 -0700)

builtin-grep: printf %.*s length is int, not ptrdiff_t.

Signed-off-by: Junio C Hamano <junkio@cox.net>

builtin-grep: do not use setup_revisions()Junio C Hamano Mon, 1 May 2006 22:58:29 +0000 (15:58 -0700)

builtin-grep: do not use setup_revisions()

Grep may want to grok multiple revisions, but it does not make
much sense to walk revisions while doing so. This stops calling
the code to parse parameters for the revision walker. The
parameter parsing for the optional "-e" option becomes a lot
simpler with it as well.

Signed-off-by: Junio C Hamano <junkio@cox.net>

builtin-grep: support '-l' option.Junio C Hamano Mon, 1 May 2006 19:39:21 +0000 (12:39 -0700)

builtin-grep: support '-l' option.

Signed-off-by: Junio C Hamano <junkio@cox.net>

builtin-grep: wildcard pathspec fixesJunio C Hamano Mon, 1 May 2006 19:27:56 +0000 (12:27 -0700)

builtin-grep: wildcard pathspec fixes

This tweaks the pathspec wildcard used in builtin-grep to match
that of ls-files. With this:

git grep -e DEBUG -- '*/Kconfig*'

would work like the shell script version, and you could even do:

git grep -e DEBUG --cached -- '*/Kconfig*' ;# from index
git grep -e DEBUG v2.6.12 -- '*/Kconfig*' ;# from rev

Signed-off-by: Junio C Hamano <junkio@cox.net>

built-in "git grep"Junio C Hamano Mon, 1 May 2006 06:28:15 +0000 (23:28 -0700)

built-in "git grep"

This attempts to set up built-in "git grep" to further reduce
our dependence on the shell, while at the same time optionally
allowing to run grep against object database. You could do
funky things like these:

git grep --cached -e pattern ;# grep from index
git grep -e pattern master ;# or in a rev
git grep -e pattern master next ;# or in multiple revs
git grep -e pattern pu^@ ;# even like this with an
;# extension from another topic ;-)
git grep -e pattern master..next ;# or even from rev ranges
git grep -e pattern master~20:Documentation
;# or an arbitrary tree
git grep -e pattern next:git-commit.sh
;# or an arbitrary blob

Right now, it does not understand and/or obey many options grep
should accept, and the pattern must be given with -e option due
to the way the parameter parser is structured, both of which
obviously need to be fixed for usability.

But this is going in the right direction. The shell script
version is one of the worst Portability offender in the git
barebone Porcelainish; it uses xargs -0 to pass paths around and
shell arrays to sift flags and parameters.

Signed-off-by: Junio C Hamano <junkio@cox.net>

Merge branch 'fix'Junio C Hamano Sun, 30 Apr 2006 07:59:10 +0000 (00:59 -0700)

Merge branch 'fix'

* fix:
git-format-patch: Use rfc2822 compliant date.

git-format-patch: Use rfc2822 compliant date.Huw Davies Sat, 29 Apr 2006 15:50:28 +0000 (15:50 +0000)

git-format-patch: Use rfc2822 compliant date.

Signed-off-by: Huw Davies <huw@codeweavers.com>
Signed-off-by: Junio C Hamano <junkio@cox.net>

Merge branch 'fix'Junio C Hamano Fri, 28 Apr 2006 23:57:32 +0000 (16:57 -0700)

Merge branch 'fix'

* fix:
Fix trivial typo in git-log man page.
Properly render asciidoc "callouts" in git man pages.
Fix up remaining man pages that use asciidoc "callouts".
Update the git-branch man page to include the "-r" option,
annotate: display usage information if no filename was given
annotate: fix warning about uninitialized scalar
git-am --resolved: more usable error message.

Fix trivial typo in git-log man page.Sean Estabrooks Fri, 28 Apr 2006 13:15:03 +0000 (09:15 -0400)

Fix trivial typo in git-log man page.

Signed-off-by: Sean Estabrooks <seanlkml@sympatico.ca>

Properly render asciidoc "callouts" in git man pages.Sean Estabrooks Fri, 28 Apr 2006 13:15:06 +0000 (09:15 -0400)

Properly render asciidoc "callouts" in git man pages.

Adds an xsl fragment to render docbook callouts when
converting to man page format. Update the Makefile
to have "xmlto" use it when generating man pages.

Signed-off-by: Sean Estabrooks <seanlkml@sympatico.ca>

Fix up remaining man pages that use asciidoc "callouts".Sean Estabrooks Fri, 28 Apr 2006 13:15:05 +0000 (09:15 -0400)

Fix up remaining man pages that use asciidoc "callouts".

Unfortunately docbook does not allow a callout to be
referenced from inside a callout list description.
Rewrite one paragraph in git-reset man page to work
around this limitation.

Signed-off-by: Sean Estabrooks <seanlkml@sympatico.ca>

Update the git-branch man page to include the "-r"... Sean Estabrooks Fri, 28 Apr 2006 13:15:04 +0000 (09:15 -0400)

Update the git-branch man page to include the "-r" option,

and fix up asciidoc "callouts"

Signed-off-by: Sean Estabrooks <seanlkml@sympatico.ca>

annotate: display usage information if no filename... Matthias Kestenholz Fri, 28 Apr 2006 08:41:19 +0000 (10:41 +0200)

annotate: display usage information if no filename was given

Signed-off-by: Matthias Kestenholz <matthias@spinlock.ch>

annotate: fix warning about uninitialized scalarMatthias Kestenholz Fri, 28 Apr 2006 08:42:28 +0000 (10:42 +0200)

annotate: fix warning about uninitialized scalar

Use of uninitialized value in scalar chomp at
./git-annotate.perl line 212, <$kid> chunk 4.

Signed-off-by: Matthias Kestenholz <matthias@spinlock.ch>

git-am --resolved: more usable error message.Junio C Hamano Fri, 28 Apr 2006 09:32:44 +0000 (02:32 -0700)

git-am --resolved: more usable error message.

After doing the hard work of hand resolving the conflicts in the
working tree, if the user forgets to run update-index to mark
the paths that have been resolved, the command gave an
unfriendly "fatal: git-write-tree: not able to write tree" error
message. Catch the situation early and give more meaningful
message and suggestion.

Noticed and suggested by Len Brown.

Signed-off-by: Junio C Hamano <junkio@cox.net>

Merge branch 'fix'Junio C Hamano Thu, 27 Apr 2006 22:42:32 +0000 (15:42 -0700)

Merge branch 'fix'

* fix:
verify-pack: check integrity in a saner order.

verify-pack: check integrity in a saner order.Junio C Hamano Thu, 27 Apr 2006 22:42:01 +0000 (15:42 -0700)

verify-pack: check integrity in a saner order.

Check internal integrity to report corrupt pack or idx, and
then check cross-integrity between idx and pack.

Signed-off-by: Linus Torvalds <torvalds@osdl.org>
Signed-off-by: Junio C Hamano <junkio@cox.net>

Merge branch 'pb/config'Junio C Hamano Thu, 27 Apr 2006 19:23:01 +0000 (12:23 -0700)

Merge branch 'pb/config'

* pb/config:
git-cvsserver: typofixes
Deprecate usage of git-var -l for getting config vars list
git-repo-config --list support

Merge branch 'jc/diffstat'Junio C Hamano Thu, 27 Apr 2006 18:58:33 +0000 (11:58 -0700)

Merge branch 'jc/diffstat'

* jc/diffstat:
diff --stat: show complete rewrites consistently.

Fix "git help -a" terminal autosizingLinus Torvalds Thu, 27 Apr 2006 16:02:54 +0000 (09:02 -0700)

Fix "git help -a" terminal autosizing

When I split out the builtin commands into their own files, I left the
include of <sys/ioctl.h> in git.c rather than moving it to the file that
needed it (builtin-help.c).

Nobody seems to have noticed, because everything still worked, but because
the TIOCGWINSZ macro was now no longer defined when compiling the
"term_columns()" function, it would no longer automatically notice the
terminal size unless your system used the ancient "COLUMNS" environment
variable approach.

Trivially fixed by just moving the header include to the file that
actually needs it.

Signed-off-by: Linus Torvalds <torvalds@osdl.org>
Signed-off-by: Junio C Hamano <junkio@cox.net>

diff-index: fix compilation warnings.Junio C Hamano Thu, 27 Apr 2006 08:59:00 +0000 (01:59 -0700)

diff-index: fix compilation warnings.

Signed-off-by: Junio C Hamano <junkio@cox.net>

t0000-basic: more commit-tree tests.Junio C Hamano Thu, 27 Apr 2006 01:25:15 +0000 (18:25 -0700)

t0000-basic: more commit-tree tests.

Signed-off-by: Junio C Hamano <junkio@cox.net>

Merge branch 'fix'Junio C Hamano Thu, 27 Apr 2006 00:08:00 +0000 (17:08 -0700)

Merge branch 'fix'

* fix:
commit-tree.c: check_valid() microoptimization.
Fix filename verification when in a subdirectory
rebase: typofix.
socksetup: don't return on set_reuse_addr() error

commit-tree.c: check_valid() microoptimization.Junio C Hamano Wed, 26 Apr 2006 23:55:25 +0000 (16:55 -0700)

commit-tree.c: check_valid() microoptimization.

There is no point reading the whole object just to make sure it exists and
it is of the expected type. We added sha1_object_info() for such need
after this code was written, so use it.

Signed-off-by: Junio C Hamano <junkio@cox.net>

Fix filename verification when in a subdirectoryLinus Torvalds Wed, 26 Apr 2006 17:15:54 +0000 (10:15 -0700)

Fix filename verification when in a subdirectory

When we are in a subdirectory of a git archive, we need to take the prefix
of that subdirectory into accoung when we verify filename arguments.

Noted by Matthias Lederhofer

This also uses the improved error reporting for all the other git commands
that use the revision parsing interfaces, not just git-rev-parse. Also, it
makes the error reporting for mixed filenames and argument flags clearer
(you cannot put flags after the start of the pathname list).

[jc: with fix to a trivial typo noticed by Timo Hirvonen]

Signed-off-by: Linus Torvalds <torvalds@osdl.org>
Signed-off-by: Junio C Hamano <junkio@cox.net>

rebase: typofix.Junio C Hamano Wed, 26 Apr 2006 19:07:42 +0000 (12:07 -0700)

rebase: typofix.

Noticed by Sean.

Signed-off-by: Junio C Hamano <junkio@cox.net>

commit-tree: allow generic object name for the tree... Junio C Hamano Wed, 26 Apr 2006 10:18:51 +0000 (03:18 -0700)

commit-tree: allow generic object name for the tree as well.

We use get_sha1() for -p (parent) objects, but still used
get_sha1_hex() for the tree. Just to be consistent, allow
extended SHA1 expression for the tree object name.

Note that this is not to encourage funky things like this:

git-commit-tree HEAD^{tree} -p HEAD

Signed-off-by: Junio C Hamano <junkio@cox.net>

Makefile: remove and create xdiff library from scratch.Junio C Hamano Wed, 26 Apr 2006 10:12:58 +0000 (03:12 -0700)

Makefile: remove and create xdiff library from scratch.

... in the same spirit as 71459c193d04870076efa0a387c317390b53e3e2.

Signed-off-by: Junio C Hamano <junkio@cox.net>

t0000-basic: Add ls-tree recursive test back.Junio C Hamano Wed, 26 Apr 2006 09:27:59 +0000 (02:27 -0700)

t0000-basic: Add ls-tree recursive test back.

When we updated ls-tree recursive output to omit the tree nodes,
246cc52f388cae8ca99e5a12b8458c9bfa467765 adjusted the old test
so that we do not expect to see trees in its output. Later,
with 0f8f45cb4a7e664b396f73c25891da46b953b8b8, we added back the
ability to show both with -t option, but we forgot to update the
test as well.

Signed-off-by: Junio C Hamano <junkio@cox.net>

git-cvsserver: typofixesJunio C Hamano Wed, 26 Apr 2006 06:59:28 +0000 (23:59 -0700)

git-cvsserver: typofixes

Signed-off-by: Junio C Hamano <junkio@cox.net>

diff --stat: show complete rewrites consistently.Junio C Hamano Wed, 26 Apr 2006 06:40:09 +0000 (23:40 -0700)

diff --stat: show complete rewrites consistently.

The patch format shows complete rewrite as deletion of all old lines
followed by addition of all new lines. Count lines consistenly with
that when doing diffstat.

Signed-off-by: Junio C Hamano <junkio@cox.net>

Merge branch 'jc/diff'Junio C Hamano Wed, 26 Apr 2006 06:12:21 +0000 (23:12 -0700)

Merge branch 'jc/diff'

* jc/diff:
Libified diff-index: backward compatibility fix.
Libify diff-index.
Libify diff-files.

Makefile: remove and create libgit.a from scratch.Junio C Hamano Wed, 26 Apr 2006 06:11:17 +0000 (23:11 -0700)

Makefile: remove and create libgit.a from scratch.

Foolishly I renamed diff.o around which caused an old diff.o
taken out of libgit.a and got linked into resulting binary and
exhibited mysterious breakage for many people. This borrows
from the kernel Makefile (scripts/Makefile.build) to first remove
the target and then recreate.

Signed-off-by: Junio C Hamano <junkio@cox.net>

socksetup: don't return on set_reuse_addr() error v1.3.1Serge E. Hallyn Tue, 18 Apr 2006 13:11:06 +0000 (08:11 -0500)

socksetup: don't return on set_reuse_addr() error

The set_reuse_addr() error case was the only error case in
socklist() where we returned rather than continued. Not sure
why. Either we must free the socklist, or continue. This patch
continues on error.

Signed-off-by: Serge E. Hallyn <serue@us.ibm.com>
Signed-off-by: Junio C Hamano <junkio@cox.net>
(cherry picked from 0032d548db56eac9ea09b4ba05843365f6325b85 commit)

Deprecate usage of git-var -l for getting config vars... Petr Baudis Mon, 24 Apr 2006 22:59:30 +0000 (00:59 +0200)

Deprecate usage of git-var -l for getting config vars list

This has been an unfortunate sideway in the git API evolution.
We use git-repo-config for all the other .git/config interaction
so let's also use git-repo-config -l for the variable listing.

Signed-off-by: Petr Baudis <pasky@suse.cz>

git-repo-config --list supportPetr Baudis Mon, 24 Apr 2006 22:59:25 +0000 (00:59 +0200)

git-repo-config --list support

This adds git-repo-config --list (or git-repo-config -l) support,
similar to what git-var -l does now (to be phased out so that we
have a single sane interface to the config file instead of fragmented
and confused API).

Signed-off-by: Petr Baudis <pasky@suse.cz>

Merge branch 'fix'Junio C Hamano Tue, 25 Apr 2006 05:26:57 +0000 (22:26 -0700)

Merge branch 'fix'

* fix:
Document the configuration file
Document git-var -l listing also configuration variables
rev-parse: better error message for ambiguous arguments

Document the configuration filePetr Baudis Mon, 24 Apr 2006 22:59:33 +0000 (00:59 +0200)

Document the configuration file

This patch adds a Documentation/config.txt file included by git-repo-config
and currently aggregating hopefully all the available git plumbing / core
porcelain configuration variables, as well as briefly describing the format.

It also updates an outdated bit of the example in git-repo-config(1).

Signed-off-by: Petr Baudis <pasky@suse.cz>

Document git-var -l listing also configuration variablesPetr Baudis Mon, 24 Apr 2006 22:59:28 +0000 (00:59 +0200)

Document git-var -l listing also configuration variables

Signed-off-by: Petr Baudis <pasky@suse.cz>

rev-parse: better error message for ambiguous argumentsPaul Mackerras Tue, 25 Apr 2006 00:00:03 +0000 (10:00 +1000)

rev-parse: better error message for ambiguous arguments

Currently, if git-rev-parse encounters an argument that is neither a
recognizable revision name nor the name of an existing file or
directory, and it hasn't encountered a "--" argument, it prints an
error message saying "No such file or directory". This can be
confusing for users, including users of programs such as gitk that
use git-rev-parse, who may then think that they can't ask about the
history of files that no longer exist.

This makes it print a better error message, one that points out the
ambiguity and tells the user what to do to fix it.

Signed-off-by: Paul Mackerras <paulus@samba.org>

Merge branch 'ar/chmod-series'Junio C Hamano Mon, 24 Apr 2006 09:08:35 +0000 (02:08 -0700)

Merge branch 'ar/chmod-series'

* ar/chmod-series:
make update-index --chmod work with multiple files and --stdin

Merge branch 'sh/daemon'Junio C Hamano Mon, 24 Apr 2006 09:08:28 +0000 (02:08 -0700)

Merge branch 'sh/daemon'

* sh/daemon:
socksetup: don't return on set_reuse_addr() error

Merge branch 'jc/cc-stat'Junio C Hamano Mon, 24 Apr 2006 09:06:40 +0000 (02:06 -0700)

Merge branch 'jc/cc-stat'

* jc/cc-stat:
Fix "git show --stat"

Merge branch 'jc/unresolve'Junio C Hamano Mon, 24 Apr 2006 09:05:55 +0000 (02:05 -0700)

Merge branch 'jc/unresolve'

* jc/unresolve:
git-update-index --unresolve
Add git-unresolve <paths>...

Merge branch 'jc/color'Junio C Hamano Mon, 24 Apr 2006 09:05:07 +0000 (02:05 -0700)

Merge branch 'jc/color'

* jc/color:
Add colordiff for git to contrib/colordiff.

Merge git://git.kernel.org/pub/scm/gitk/gitkJunio C Hamano Mon, 24 Apr 2006 08:39:01 +0000 (01:39 -0700)

Merge git://git.kernel.org/pub/scm/gitk/gitk

* git://git.kernel.org/pub/scm/gitk/gitk:
gitk: Let git-rev-list do the argument list parsing

gitk: Let git-rev-list do the argument list parsingPaul Mackerras Sun, 23 Apr 2006 08:00:24 +0000 (18:00 +1000)

gitk: Let git-rev-list do the argument list parsing

This is a fix for a problem reported by Jim Radford where an argument
list somewhere overflows on repositories with lots of tags. In fact
it's now unnecessary to use git-rev-parse since git-rev-list can take
all the arguments that git-rev-parse can. This is inspired by but not
the same as the solutions suggested by Jim Radford and Linus Torvalds.

Signed-off-by: Paul Mackerras <paulus@samba.org>

make update-index --chmod work with multiple files... Alex Riesen Sun, 23 Apr 2006 07:01:29 +0000 (09:01 +0200)

make update-index --chmod work with multiple files and --stdin

The patch makes "--chmod=-x" and "--chmod=+x" act like "--add"
and "--remove" to affect the behaviour of the command for the
rest of the path parameters, not just the following one.

Signed-off-by: Junio C Hamano <junkio@cox.net>

Libified diff-index: backward compatibility fix.Junio C Hamano Sat, 22 Apr 2006 10:58:04 +0000 (03:58 -0700)

Libified diff-index: backward compatibility fix.

"diff-index -m" does not mean "do not ignore merges", but means
"pretend missing files match the index".

The previous round tried to address this, but failed because
setup_revisions() ate "-m" flag before the caller had a chance
to intervene.

Signed-off-by: Junio C Hamano <junkio@cox.net>

Libify diff-index.Junio C Hamano Sat, 22 Apr 2006 09:43:00 +0000 (02:43 -0700)

Libify diff-index.

The second installment to libify diff brothers. The pathname
arguments are checked more strictly than before because we now
use the revision.c::setup_revisions() infrastructure.

Signed-off-by: Junio C Hamano <junkio@cox.net>

Libify diff-files.Junio C Hamano Sat, 22 Apr 2006 06:57:45 +0000 (23:57 -0700)

Libify diff-files.

This is the first installment to libify diff brothers.

The updated diff-files uses revision.c::setup_revisions()
infrastructure to parse its command line arguments, which means
the pathname arguments are checked more strictly than before.
The tests are adjusted to separate possibly missing paths from
the rest of arguments with double-dashes, to show the kosher
way.

As Linus pointed out, renaming diff.c to diff-lib.c was simply
stupid, so I am renaming it back. The new diff-lib.c is to
contain pieces extracted from diff brothers.

Signed-off-by: Junio C Hamano <junkio@cox.net>

Fix "git show --stat"Junio C Hamano Sat, 22 Apr 2006 02:39:04 +0000 (19:39 -0700)

Fix "git show --stat"

Signed-off-by: Junio C Hamano <junkio@cox.net>

Add colordiff for git to contrib/colordiff.Junio C Hamano Wed, 12 Apr 2006 06:05:14 +0000 (23:05 -0700)

Add colordiff for git to contrib/colordiff.

I hacked it up to teach it the git extended diff headers, made
it not to read the whole patch in the array.

Also, the original program, when arguments are given, ran "diff"
with the given arguments and showed the output from it. Of
course, I changed it to run "git diff" ;-).

Signed-off-by: Junio C Hamano <junkio@cox.net>

Merge branch 'jc/diff'Junio C Hamano Sat, 22 Apr 2006 05:03:07 +0000 (22:03 -0700)

Merge branch 'jc/diff'

* jc/diff:
diff --stat: do not drop rename information.

Makefile: dependency for builtin-help.oJunio C Hamano Sat, 22 Apr 2006 04:56:13 +0000 (21:56 -0700)

Makefile: dependency for builtin-help.o

builtin-help.c wants to include common-cmds.h which is a
generated file.

Signed-off-by: Junio C Hamano <junkio@cox.net>

Split up builtin commands into separate files from... Linus Torvalds Fri, 21 Apr 2006 17:27:34 +0000 (10:27 -0700)

Split up builtin commands into separate files from git.c

Right now it split it into "builtin-log.c" for log-related commands
("log", "show" and "whatchanged"), and "builtin-help.c" for the
informational commands (usage printing and "help" and "version").

This just makes things easier to read, I find.

Signed-off-by: Linus Torvalds <torvalds@osdl.org>
Signed-off-by: Junio C Hamano <junkio@cox.net>

Merge branch 'fix'Junio C Hamano Fri, 21 Apr 2006 20:14:30 +0000 (13:14 -0700)

Merge branch 'fix'

* fix:
git-log produces no output

git-log produces no outputLinus Torvalds Fri, 21 Apr 2006 19:25:13 +0000 (12:25 -0700)

git-log produces no output

When $PAGER is set to 'less -i', we used to fail because we
assumed the $PAGER is a command and simply exec'ed it.

Try exec first, and then run it through shell if it fails. This
allows even funkier PAGERs like these ;-):

PAGER='sed -e "s/^/`date`: /" | more'
PAGER='contrib/colordiff.perl | less -RS'

Signed-off-by: Linus Torvalds <torvalds@osdl.org>
Signed-off-by: Junio C Hamano <junkio@cox.net>

Merge branch 'fix'Junio C Hamano Fri, 21 Apr 2006 07:45:40 +0000 (00:45 -0700)

Merge branch 'fix'

* fix:
fix pack-object buffer size
mailinfo: decode underscore used in "Q" encoding properly.
Reintroduce svn pools to solve the memory leak.
pack-objects: do not stop at object that is "too small"

fix pack-object buffer sizeNicolas Pitre Thu, 20 Apr 2006 21:25:37 +0000 (17:25 -0400)

fix pack-object buffer size

The input line has 40 _chars_ of sha1 and no 20 _bytes_. It should also
account for the space before the pathname, and the terminating \n and \0.

Signed-off-by: Nicolas Pitre <nico@cam.org>
Signed-off-by: Junio C Hamano <junkio@cox.net>

mailinfo: decode underscore used in "Q" encoding properly.Junio C Hamano Fri, 21 Apr 2006 07:06:58 +0000 (00:06 -0700)

mailinfo: decode underscore used in "Q" encoding properly.

Quoted-Printable (RFC 2045) and the "Q" encoding (RFC 2047) are
subtly different; the latter is used on the mail header and an
underscore needs to be decoded to 0x20.

Signed-off-by: Junio C Hamano <junkio@cox.net>

Reintroduce svn pools to solve the memory leak.Santi_Béjar Mon, 27 Mar 2006 11:26:01 +0000 (13:26 +0200)

Reintroduce svn pools to solve the memory leak.

Introduced in 4802426.

Signed-off-by: Santi Béjar <sbejar@gmail.com>
Signed-off-by: Junio C Hamano <junkio@cox.net>

pack-objects: do not stop at object that is "too small"Junio C Hamano Fri, 21 Apr 2006 06:36:22 +0000 (23:36 -0700)

pack-objects: do not stop at object that is "too small"

Because we sort the delta window by name-hash and then size,
hitting an object that is too small to consider as a delta base
for the current object does not mean we do not have better
candidate in the window beyond it.

Noticed by Shawn Pearce, analyzed by Nico, Linus and me.

Signed-off-by: Junio C Hamano <junkio@cox.net>

Merge branch 'fix'Junio C Hamano Thu, 20 Apr 2006 09:52:04 +0000 (02:52 -0700)

Merge branch 'fix'

* fix:
git-commit --amend: two fixes.

git-commit --amend: two fixes.Junio C Hamano Thu, 20 Apr 2006 08:20:56 +0000 (01:20 -0700)

git-commit --amend: two fixes.

When running "git commit --amend" only to fix the commit log
message without any content change, we mistakenly showed the
git-status output that says "nothing to commit" without
commenting it out.

If you have already run update-index but you want to amend the
top commit, "git commit --amend --only" without any paths should
have worked, because --only means "starting from the base
commit, update-index these paths only to prepare the index to
commit, and perform the commit". However, we refused -o without
paths.

Signed-off-by: Junio C Hamano <junkio@cox.net>

git-update-index --unresolveJunio C Hamano Thu, 20 Apr 2006 06:52:05 +0000 (23:52 -0700)

git-update-index --unresolve

Retire git-unresolve and make it into "git-update-index --unresolve".
It processes all paths that follow.

During a merge, you would mark a path that is dealt with with:

$ git update-index hello

and you would "undo" it with:

$ git update-index --unresolve hello

Signed-off-by: Junio C Hamano <junkio@cox.net>

diff --stat: do not drop rename information.Junio C Hamano Thu, 20 Apr 2006 03:41:14 +0000 (20:41 -0700)

diff --stat: do not drop rename information.

When a verbatim rename or copy is detected, we did not show
anything on the "diff --stat" for the filepair. This makes it
to show the rename information.

Signed-off-by: Junio C Hamano <junkio@cox.net>

Add git-unresolve <paths>...Junio C Hamano Wed, 19 Apr 2006 19:51:29 +0000 (12:51 -0700)

Add git-unresolve <paths>...

This is an attempt to address the issue raised on #git channel
recently by Carl Worth.

After a conflicted automerge, "git diff" shows a combined diff
to give you how the tentative automerge result differs from
what came from each branch. During a complex merge, it is
tempting to be able to resolve a few paths at a time, mark
them "I've dealt with them" with git-update-index to unclutter
the next "git diff" output, and keep going. However, when the
final result does not compile or otherwise found to be a
mismerge, the workflow to fix the mismerged paths suddenly
changes to "git diff HEAD -- path" (to get a diff from our
HEAD before merging) and "git diff MERGE_HEAD -- path" (to get
a diff from theirs), and it cannot show the combined anymore.

With git-unresolve <paths>..., the versions from our branch and
their branch for specified blobs are placed in stage #2 and
stage #3, without touching the working tree files. This gives
you the combined diff back for easier review, along with
"diff --ours" and "diff --theirs".

One thing it does not do is to place the base in stage #1; this
means "diff --base" would behave differently between the run
immediately after a conflicted three-way merge, and the run
after an update-index by mistake followed by a git-unresolve.

We could theoretically run merge-base between HEAD and
MERGE_HEAD to find which tree to place in stage #1, but
reviewing "diff --base" is not that useful so....

Signed-off-by: Junio C Hamano <junkio@cox.net>

Merge branch 'lt/xsha1'Junio C Hamano Wed, 19 Apr 2006 22:57:45 +0000 (15:57 -0700)

Merge branch 'lt/xsha1'

* lt/xsha1:
get_tree_entry(): make it available from tree-walk
sha1_name.c: no need to include diff.h; tree-walk.h will do.
sha1_name.c: prepare to make get_tree_entry() reusable from others.
get_sha1() shorthands for blob/tree objects

Merge branch 'maint'Junio C Hamano Wed, 19 Apr 2006 22:41:55 +0000 (15:41 -0700)

Merge branch 'maint'

* maint:
pre-commit hook: complain about conflict markers.
git-merge: a bit more readable user guidance.

diff: move diff.c to diff-lib.c to make room.Junio C Hamano Wed, 19 Apr 2006 22:12:02 +0000 (15:12 -0700)

diff: move diff.c to diff-lib.c to make room.

Now I am not doing any real "git-diff in C" yet, but this would
help before doing so.

Signed-off-by: Junio C Hamano <junkio@cox.net>

pre-commit hook: complain about conflict markers.Junio C Hamano Wed, 19 Apr 2006 21:58:24 +0000 (14:58 -0700)

pre-commit hook: complain about conflict markers.

Several <<< or === or >>> characters at the beginning of a line
is very likely to be leftover conflict markers from a failed
automerge the user resolved incorrectly, so detect them.

As usual, this can be defeated with "git commit --no-verify" if
you really do want to have those files, just like changes that
introduce trailing whitespaces.

Signed-off-by: Junio C Hamano <junkio@cox.net>

git-merge: a bit more readable user guidance.Junio C Hamano Wed, 19 Apr 2006 21:54:27 +0000 (14:54 -0700)

git-merge: a bit more readable user guidance.

We said "fix up by hand" after failed automerge, which was a big
"Huh? Now what?". Be a bit more explicit without being too
verbose. Suggested by Carl Worth.

Signed-off-by: Junio C Hamano <junkio@cox.net>

get_tree_entry(): make it available from tree-walkJunio C Hamano Wed, 19 Apr 2006 21:05:47 +0000 (14:05 -0700)

get_tree_entry(): make it available from tree-walk

Signed-off-by: Junio C Hamano <junkio@cox.net>

sha1_name.c: no need to include diff.h; tree-walk.h... Junio C Hamano Wed, 19 Apr 2006 18:56:53 +0000 (11:56 -0700)

sha1_name.c: no need to include diff.h; tree-walk.h will do.

Signed-off-by: Junio C Hamano <junkio@cox.net>

sha1_name.c: prepare to make get_tree_entry() reusable... Junio C Hamano Wed, 19 Apr 2006 18:56:07 +0000 (11:56 -0700)

sha1_name.c: prepare to make get_tree_entry() reusable from others.

Signed-off-by: Junio C Hamano <junkio@cox.net>

git log: don't do merge diffs by defaultLinus Torvalds Wed, 19 Apr 2006 17:20:49 +0000 (10:20 -0700)

git log: don't do merge diffs by default

I personally prefer "ignore_merges" to be on by default, because quite
often the merge diff is distracting and not interesting. That's true both
with "-p" and with "--stat" output.

If you want output from merges, you can trivially use the "-m", "-c" or
"--cc" flags to tell that you're interested in merges, which also tells
the diff generator what kind of diff to do (for --stat, any of the three
will do, of course, but they differ for plain patches or for
--patch-with-stat).

This trivial patch just removes the two lines that tells "git log" not to
ignore merges. It will still show the commit log message, of course, due
to the "always_show_header" part.

Signed-off-by: Linus Torvalds <torvalds@osdl.org>
Signed-off-by: Junio C Hamano <junkio@cox.net>

Allow "git repack" users to specify repacking window... Linus Torvalds Wed, 19 Apr 2006 17:05:12 +0000 (10:05 -0700)

Allow "git repack" users to specify repacking window/depth

.. but don't even bother documenting it. I don't think any normal person
is supposed to ever really care, but it simplifies testing when you want
to use the "git repack" wrapper rather than forcing you to use the core
programs (which already do support the window/depth arguments, of course).

Signed-off-by: Linus Torvalds <torvalds@osdl.org>
Signed-off-by: Junio C Hamano <junkio@cox.net>

Merge branch 'fix'Junio C Hamano Wed, 19 Apr 2006 09:25:29 +0000 (02:25 -0700)

Merge branch 'fix'

* fix:
Document git-clone --reference
Fix filename scaling for binary files

get_sha1() shorthands for blob/tree objectsLinus Torvalds Tue, 18 Apr 2006 23:45:16 +0000 (16:45 -0700)

get_sha1() shorthands for blob/tree objects

This is a fairly straightforward patch to allow "get_sha1()" to also have
shorthands for tree and blob objects.

The syntax is very simple and intuitive: you can specify a tree or a blob
by simply specifying <revision>:<path>, and get_sha1() will do the SHA1
lookup from the tree for you.

You can currently do it with "git ls-tree <rev> <path>" and parsing the
output, but that's actually pretty awkward.

With this, you can do something like

git cat-file blob v1.2.4:Makefile

to get the contents of "Makefile" at revision v1.2.4.

Now, this isn't necessarily something you really need all that often, but
the concept itself is actually pretty powerful. We could, for example,
allow things like

git diff v0.99.6:git-commit-script..v1.3.0:git-commit.sh

to see the difference between two arbitrary files in two arbitrary
revisions. To do that, the only thing we'd have to do is to make
git-diff-tree accept two blobs to diff, in addition to the two trees it
now expects.

Signed-off-by: Junio C Hamano <junkio@cox.net>

Fix uninteresting tags in new revision parsingLinus Torvalds Wed, 19 Apr 2006 03:31:41 +0000 (20:31 -0700)

Fix uninteresting tags in new revision parsing

When I unified the revision argument parsing, I introduced a simple bug
wrt tags that had been marked uninteresting. When it was preparing for the
revision walk, it would mark all the parent commits of an uninteresting
tag correctly uninteresting, but it would forget about the commit itself.

This means that when I just did my 2.6.17-rc2 release, and my scripts
generated the log for "v2.6.17-rc1..v2.6.17-rc2", everything was fine,
except the commit pointed to by 2.6.17-rc1 (which shouldn't have been
there) was included. Even though it should obviously have been marked as
being uninteresting.

Not a huge deal, and the fix is trivial.

Signed-off-by: Linus Torvalds <torvalds@osdl.org>
Signed-off-by: Junio C Hamano <junkio@cox.net>

Document git-clone --referenceShawn Pearce Wed, 19 Apr 2006 00:19:48 +0000 (20:19 -0400)

Document git-clone --reference

The new --reference flag introduced to git-clone in
GIT 1.3.0 was not documented but is rather handy.
So document it.

Also corrected a minor issue with the documentation for the
-s flag; the info/alternates file name was spelled wrong.

Signed-off-by: Shawn O. Pearce <spearce@spearce.org>
Signed-off-by: Junio C Hamano <junkio@cox.net>

Fix filename scaling for binary filesJonas Fonseca Tue, 18 Apr 2006 21:26:43 +0000 (23:26 +0200)

Fix filename scaling for binary files

Set maximum filename length for binary files so that scaling won't be
triggered and result in invalid string access.

Signed-off-by: Jonas Fonseca <fonseca@diku.dk>
Signed-off-by: Junio C Hamano <junkio@cox.net>

socksetup: don't return on set_reuse_addr() errorSerge E. Hallyn Tue, 18 Apr 2006 13:11:06 +0000 (08:11 -0500)

socksetup: don't return on set_reuse_addr() error

The set_reuse_addr() error case was the only error case in
socklist() where we returned rather than continued. Not sure
why. Either we must free the socklist, or continue. This patch
continues on error.

Signed-off-by: Serge E. Hallyn <serue@us.ibm.com>
Signed-off-by: Junio C Hamano <junkio@cox.net>

Merge branch 'jc/pager-cat'Junio C Hamano Tue, 18 Apr 2006 20:57:22 +0000 (13:57 -0700)

Merge branch 'jc/pager-cat'

* jc/pager-cat:
Do not fork PAGER=cat

Merge branch 'lt/logopt'Junio C Hamano Tue, 18 Apr 2006 20:56:36 +0000 (13:56 -0700)

Merge branch 'lt/logopt'

* lt/logopt:
Fix "git log --stat": make sure to set recursive with --stat.
combine-diff: show diffstat with the first parent.
git.c: LOGSIZE is unused after log printing cleanup.
Log message printout cleanups (#3): fix --pretty=oneline
Log message printout cleanups (#2)
Log message printout cleanups
rev-list --header: output format fix
Fixes for option parsing
log/whatchanged/show - log formatting cleanup.
Simplify common default options setup for built-in log family.
Tentative built-in "git show"
Built-in git-whatchanged.
rev-list option parser fix.
Split init_revisions() out of setup_revisions()
Fix up rev-list option parsing.
Fix up default abbrev in setup_revisions() argument parser.
Common option parsing for "git log --diff" and friends

GIT 1.3.0 v1.3.0Junio C Hamano Tue, 18 Apr 2006 20:15:18 +0000 (13:15 -0700)

GIT 1.3.0

Signed-off-by: Junio C Hamano <junkio@cox.net>

Add git-annotate(1) and git-blame(1)Jonas Fonseca Mon, 6 Mar 2006 05:24:44 +0000 (06:24 +0100)

Add git-annotate(1) and git-blame(1)

[jc: with entries in git.txt]

Signed-off-by: Jonas Fonseca <fonseca@diku.dk>
Signed-off-by: Junio C Hamano <junkio@cox.net>

Fix "git log --stat": make sure to set recursive with... Junio C Hamano Tue, 18 Apr 2006 18:41:28 +0000 (11:41 -0700)

Fix "git log --stat": make sure to set recursive with --stat.

Just like "patch" format always needs recursive, "diffstat"
format does not make sense without setting recursive.

Signed-off-by: Junio C Hamano <junkio@cox.net>

diff --stat: make sure to set recursive.Junio C Hamano Tue, 18 Apr 2006 18:29:33 +0000 (11:29 -0700)

diff --stat: make sure to set recursive.

Just like "patch" format always needs recursive, "diffstat"
format does not make sense without setting recursive.

Signed-off-by: Junio C Hamano <junkio@cox.net>

git-svnimport symlink supportHerbert Valerio Riedel Mon, 17 Apr 2006 10:58:39 +0000 (06:58 -0400)

git-svnimport symlink support

added svn:special symlink support for access methods other than
direct-http

Signed-off-by: Herbert Valerio Riedel <hvr@gnu.org>
Acked-by: Matthias Urlichs <smurf@smurf.noris.de>
Signed-off-by: Junio C Hamano <junkio@cox.net>

combine-diff: show diffstat with the first parent.Junio C Hamano Tue, 18 Apr 2006 05:53:03 +0000 (22:53 -0700)

combine-diff: show diffstat with the first parent.

Asking for stat (either with --stat or --patch-with-stat) gives
you diffstat for the first parent, even under combine-diff.

While the combined patch is useful to highlight the complexity
and interaction of the parts touched by all branches when
reviewing a merge commit, diffstat is a tool to assess the
extent of damage the merge brings in, and showing stat with the
first parent is more sensible than clever per-parent diffstat.

Signed-off-by: Junio C Hamano <junkio@cox.net>