Commit Graph

4711 Commits

Author SHA1 Message Date
Junio C Hamano
2c57ebc223 Merge branch 'ts/doctar' into next
* ts/doctar:
  Documentation/Makefile: create tarballs for the man pages and html files
  SubmittingPatches: The download location of External Editor has moved
  Make git-check-format-ref a builtin.
  Make "git rev-list" be a builtin
  builtin-diff: do not say files are renamed when blob and file are given
  Provide a way to flush git-diff-tree's output
2006-05-18 22:08:41 -07:00
Junio C Hamano
c7b345b075 Merge branch 'lt/dirwalk' into next
* lt/dirwalk:
  Prevent bogus paths from being added to the index.
2006-05-18 20:16:03 -07:00
Tilman Sauerbeck
52db0495dc Documentation/Makefile: create tarballs for the man pages and html files
[jc: rewrote by stealing from what I run to update html and
 man branches automatically]

Signed-off-by: Tilman Sauerbeck <tilman@code-monkey.de>
Signed-off-by: Junio C Hamano <junkio@cox.net>
2006-05-18 20:15:45 -07:00
Lukas Sandström
ff62b7f378 SubmittingPatches: The download location of External Editor has moved
Signed-off-by: Lukas Sandström <lukass@etek.chalmers.se>
Signed-off-by: Junio C Hamano <junkio@cox.net>
2006-05-18 20:14:28 -07:00
Lukas Sandström
9370bae2ce Make git-check-format-ref a builtin.
Signed-off-by: Lukas Sandström <lukass@etek.chalmers.se>
Signed-off-by: Junio C Hamano <junkio@cox.net>
2006-05-18 15:51:38 -07:00
Linus Torvalds
5fb61b8dcf Make "git rev-list" be a builtin
This was surprisingly easy. The diff is truly minimal: rename "main()" to
"cmd_rev_list()" in rev-list.c, and rename the whole file to reflect its
new built-in status.

Signed-off-by: Linus Torvalds <torvalds@osdl.org>
Signed-off-by: Junio C Hamano <junkio@cox.net>
2006-05-18 15:46:11 -07:00
Junio C Hamano
065e0b126f builtin-diff: do not say files are renamed when blob and file are given
Signed-off-by: Junio C Hamano <junkio@cox.net>
2006-05-18 14:35:37 -07:00
Linus Torvalds
8dcf39c46e Prevent bogus paths from being added to the index.
With this one, it's now a fatal error to try to add a pathname
that cannot be added with "git add", i.e.

	[torvalds@g5 git]$ git add .git/config
	fatal: unable to add .git/config to index

and

	[torvalds@g5 git]$ git add foo/../bar
	fatal: unable to add foo/../bar to index

instead of the old "Ignoring path xyz" warning that would end up
silently succeeding on any other paths.

Signed-off-by: Linus Torvalds <torvalds@osdl.org>
Signed-off-by: Junio C Hamano <junkio@cox.net>
2006-05-18 12:07:31 -07:00
Junio C Hamano
fad6008385 Merge branch 'lt/dirwalk' into next
* lt/dirwalk:
  builtin-add: fix unmatched pathspec warnings.
2006-05-18 01:47:13 -07:00
Junio C Hamano
e8f990b4e4 builtin-add: fix unmatched pathspec warnings.
"git add Documentation/" when Documentation directory exists
does not barf (as it should not), but "git add ." barfed when it
did not add anything.  This was because we checked for the path
prefix ("Documentation/" in the former case, and an empty string
in the latter case) for existence, and lstat("", &st) would say
"Huh?".

Signed-off-by: Junio C Hamano <junkio@cox.net>
2006-05-18 01:46:57 -07:00
Paul Mackerras
70f75cc96a Provide a way to flush git-diff-tree's output
Gitk wants to use git-diff-tree as a filter to tell it which ids from
a given list affect a set of files or directories.  We don't want to
fork and exec a new git-diff-tree process for each batch of ids, since
there could be a lot of relatively small batches.  For example, a
batch could contain as many ids as fit in gitk's headline display
window, i.e. 20 or so, and we would be processing a new batch every
time the user scrolls that window.

The --stdin flag to git-diff-tree is suitable for this, but the main
difficulty is that the output of git-diff-tree gets buffered and
doesn't get sent until the buffer is full.

This provides a way to get git-diff-tree to flush its output buffers.
If a blank line is supplied on git-diff-tree's standard input, it will
flush its output buffers and then accept further input.

Signed-off-by: Paul Mackerras <paulus@samba.org>
Signed-off-by: Junio C Hamano <junkio@cox.net>
2006-05-18 00:25:50 -07:00
Junio C Hamano
eab864a2c4 Merge branch 'master' into next
* master:
  git-cvsimport: Handle "Removed" from pserver
2006-05-17 23:37:51 -07:00
Junio C Hamano
18b01f4ff6 Merge branch 'maint'
* maint:
  git-cvsimport: Handle "Removed" from pserver
2006-05-17 22:33:06 -07:00
Elrond
be0c7e0697 git-cvsimport: Handle "Removed" from pserver
Sometimes the pserver says "Removed" instead of "Remove-entry".

Signed-off-by: Elrond <elrond+kernel.org@samba-tng.org>
Signed-off-by: Junio C Hamano <junkio@cox.net>
2006-05-17 22:32:16 -07:00
Junio C Hamano
9c0f482361 Merge branch 'lt/dirwalk' into next
* lt/dirwalk:
  Remove old "git-add.sh" remnants
2006-05-17 22:27:58 -07:00
Linus Torvalds
c699f9b924 Remove old "git-add.sh" remnants
Repeat after me: "It's now a built-in"

Signed-off-by: Linus Torvalds <torvalds@osdl.org>
Signed-off-by: Junio C Hamano <junkio@cox.net>
2006-05-17 22:27:42 -07:00
Junio C Hamano
78bc2e1552 Merge branch 'sp/reflog' into next
* sp/reflog:
  Remove unnecessary local in get_ref_sha1.
2006-05-17 17:34:01 -07:00
Shawn Pearce
70e1a880a3 Remove unnecessary local in get_ref_sha1.
Signed-off-by: Shawn O. Pearce <spearce@spearce.org>
Signed-off-by: Junio C Hamano <junkio@cox.net>
2006-05-17 17:33:52 -07:00
Junio C Hamano
b312cc82b4 Merge branch 'jc/apply' into next
* jc/apply:
  apply --cached: do not check newly added file in the working tree
2006-05-17 16:56:20 -07:00
Junio C Hamano
d91d4c2c50 apply --cached: do not check newly added file in the working tree
The --cached mode does not deal with the working tree, so we
should not check it with lstat.  An earlier code omitted the
call to lstat but forgot to omit the check for the errno.

Signed-off-by: Junio C Hamano <junkio@cox.net>
2006-05-17 16:56:13 -07:00
Junio C Hamano
22b49b7fb9 Merge branch 'jc/read-tree-safety' into next
* jc/read-tree-safety:
  read-tree -m -u: do not overwrite or remove untracked working tree files.
2006-05-17 15:54:39 -07:00
Junio C Hamano
c7e3a75121 Merge branch 'lt/grep' into next
* lt/grep:
  builtin-grep: workaround for non GNU grep.
2006-05-17 15:52:16 -07:00
Junio C Hamano
39be926436 Merge branch 'jc/grep' into next
* jc/grep:
  Revert "builtin-grep: workaround for non GNU grep."
2006-05-17 15:52:03 -07:00
Linus Torvalds
bbb66c6061 builtin-grep: workaround for non GNU grep.
Of course, it still ignores the fact that not all grep's support some of
the flags like -F/-L/-A/-C etc, but for those cases, the external grep
itself will happily just say "unrecognized option -F" or similar.

So with this change, "git grep" should handle all the flags the native
grep handles, which is really quite fine. We don't _need_ to expose
anything more, and if you do want our extensions, you can get them with
"--uncached" and an up-to-date index.

No configuration necessary, and we automatically take advantage of any
native grep we have, if possible.

Signed-off-by: Linus Torvalds <torvalds@osdl.org>
Signed-off-by: Junio C Hamano <junkio@cox.net>
2006-05-17 15:51:38 -07:00
Junio C Hamano
e9ce27543d Merge branch 'ew/pretty-fmt'
* ew/pretty-fmt:
  commit: allow --pretty= args to be abbreviated
2006-05-17 15:49:23 -07:00
Junio C Hamano
53684bba49 Merge branch 'jc/apply'
* jc/apply:
  git-am: use apply --cached
  apply --cached: apply a patch without using working tree.
  apply --numstat: show new name, not old name.
2006-05-17 15:47:33 -07:00
Junio C Hamano
ae12e59a8c Merge branch 'lt/dirwalk' into next
* lt/dirwalk:
  builtin-add: warn on unmatched pathspecs
  Do "git add" as a builtin
  Clean up git-ls-file directory walking library interface
  libify git-ls-files directory traversal

Not a conflict, but builtin-add needed to be adjusted to properly
invalidate the cache_tree entry.
2006-05-17 15:39:38 -07:00
Linus Torvalds
f25933987f builtin-add: warn on unmatched pathspecs
This is in the same spirit as what bba319b5 and 45e48120 tried
to do to help users.  A command such as "git add Documentaiton"
with misspelled pathspecs would give a friendly reminder with
this.

Signed-off-by: Linus Torvalds <torvalds@osdl.org>
Signed-off-by: Junio C Hamano <junkio@cox.net>
2006-05-17 15:27:18 -07:00
Linus Torvalds
0d78153952 Do "git add" as a builtin
First try. Let's see how well this works.

In many ways, the hard parts of "git commit" are not so different from
this, and a builtin commit would share a lot of the code, I think.

Signed-off-by: Linus Torvalds <torvalds@osdl.org>
Signed-off-by: Junio C Hamano <junkio@cox.net>
2006-05-17 11:52:40 -07:00
Junio C Hamano
e78503db16 Revert "builtin-grep: workaround for non GNU grep."
This reverts 518920b764 commit.
Linus has a more portable alternative.
2006-05-17 11:42:14 -07:00
Junio C Hamano
d882e1ac94 Merge branch 'jc/gitlink' into next
* jc/gitlink:
  read-tree: reorganize bind_merge code.
2006-05-17 03:16:50 -07:00
Junio C Hamano
d6970e42a1 read-tree: reorganize bind_merge code.
This does not change the logic but moves the order of checks
around so that merging of read-tree safety code would become
easier.

Signed-off-by: Junio C Hamano <junkio@cox.net>
2006-05-17 03:16:27 -07:00
Junio C Hamano
aedb8995f8 Merge branch 'ew/pretty-fmt' into next
* ew/pretty-fmt:
  commit: allow --pretty= args to be abbreviated

Conflicts:

	commit.c - adjust to --pretty=email
2006-05-17 03:04:14 -07:00
Junio C Hamano
fa09339509 Merge branch 'jc/grep' into next
* jc/grep:
  builtin-grep: workaround for non GNU grep.
2006-05-17 02:59:46 -07:00
Eric Wong
6cdfd17974 commit: allow --pretty= args to be abbreviated
Signed-off-by: Eric Wong <normalperson@yhbt.net>
Signed-off-by: Junio C Hamano <junkio@cox.net>
2006-05-17 02:57:57 -07:00
Junio C Hamano
518920b764 builtin-grep: workaround for non GNU grep.
Some implementations do not know what to do with -H; define
NO_H_OPTION_IN_GREP when you build git if your grep lacks -H.

Most of the time, it can be worked around by prepending
/dev/null to the argument list, but that causes -L and -c to
slightly misbehave (they both expose /dev/null is given), so
when these options are given, do not run external grep that does
not understand -H.

Signed-off-by: Junio C Hamano <junkio@cox.net>
2006-05-17 02:48:13 -07:00
Linus Torvalds
b4189aa848 Clean up git-ls-file directory walking library interface
This moves the code to add the per-directory ignore files for the base
directory into the library routine.

That not only allows us to turn the function push_exclude_per_directory()
static again, it also simplifies the library interface a lot (the caller
no longer needs to worry about any of the per-directory exclude files at
all).

Signed-off-by: Linus Torvalds <torvalds@osdl.org>
Signed-off-by: Junio C Hamano <junkio@cox.net>
2006-05-17 01:56:55 -07:00
Linus Torvalds
453ec4bdf4 libify git-ls-files directory traversal
This moves the core directory traversal and filename exclusion logic
into the general git library, making it available for other users
directly.

If we ever want to do "git commit" or "git add" as a built-in (and we
do), we want to be able to handle most of git-ls-files as a library.

NOTE! Not all of git-ls-files is libified by this.  The index matching
and pathspec prefix calculation is still in ls-files.c, but this is a
big part of it.

Signed-off-by: Linus Torvalds <torvalds@osdl.org>
Signed-off-by: Junio C Hamano <junkio@cox.net>
2006-05-17 01:56:40 -07:00
Junio C Hamano
fcc387db9b read-tree -m -u: do not overwrite or remove untracked working tree files.
When a merge results in a creation of a path that did not exist
in HEAD, and if you already have that path on the working tree,
because the index has not been told about the working tree file,
read-tree happily removes it.  The issue was brought up by Santi
Béjar on the list.

Signed-off-by: Junio C Hamano <junkio@cox.net>
2006-05-17 01:52:48 -07:00
Junio C Hamano
8a24f2fae0 Merge branch 'master' into next
* master:
  Remove old "git-grep.sh" remnants
  merge-base: Clarify the comments on post processing.
  Update the documentation for git-merge-base
2006-05-16 17:21:35 -07:00
Linus Torvalds
63dffdf03d Remove old "git-grep.sh" remnants
It's built-in now.

Signed-off-by: Linus Torvalds <torvalds@osdl.org>
Signed-off-by: Junio C Hamano <junkio@cox.net>
2006-05-16 17:21:21 -07:00
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