Commit Graph

4421 Commits

Author SHA1 Message Date
Junio C Hamano
5d028406e5 Merge branch 'jc/grep' into next
* jc/grep:
  builtin-grep: printf %.*s length is int, not ptrdiff_t.
2006-05-02 01:28:39 -07:00
Junio C Hamano
a24f1e254e builtin-grep: printf %.*s length is int, not ptrdiff_t.
Signed-off-by: Junio C Hamano <junkio@cox.net>
2006-05-02 01:28:02 -07:00
Junio C Hamano
a93829ab35 Merge branch 'js/remoteconfig' into next
* js/remoteconfig:
  fetch, pull: ask config for remote information
  builtin-push: also ask config for remote information
2006-05-02 01:04:14 -07:00
Johannes Schindelin
5a223a0d43 fetch, pull: ask config for remote information
Now you can say

[remote.junio]
	url = git://git.kernel.org/pub/scm/git/git.git
	pull = next:next

in your .git/config.

Signed-off-by: Johannes Schindelin <Johannes.Schindelin@gmx.de>
Signed-off-by: Junio C Hamano <junkio@cox.net>
2006-05-02 01:03:25 -07:00
Johannes Schindelin
97d4df0b29 builtin-push: also ask config for remote information
Now you can store your remote information in the config file like this:

[remote.upstream]
	url = me@company.com:the-project
	push = master:iceballs

[jc: fixed up to adjust a different fix for Push: lines earlier.]

Signed-off-by: Johannes Schindelin <Johannes.Schindelin@gmx.de>
Signed-off-by: Junio C Hamano <junkio@cox.net>
2006-05-02 01:03:02 -07:00
Junio C Hamano
71c1783c23 Merge branch 'lt/push' into next
* lt/push:
  builtin-push: make it official.
2006-05-01 23:41:57 -07:00
Junio C Hamano
54eb2d3ff9 builtin-push: make it official.
Remove the shell script version, and hardlink the git binary to it.

Signed-off-by: Junio C Hamano <junkio@cox.net>
2006-05-01 23:40:37 -07:00
Junio C Hamano
302f57f13f Merge branch 'jc/show-branch-dense' into next
* jc/show-branch-dense:
  show-branch: omit uninteresting merges.
2006-05-01 23:37:47 -07:00
Junio C Hamano
c24fe420d3 show-branch: omit uninteresting merges.
Signed-off-by: Junio C Hamano <junkio@cox.net>
2006-05-01 23:19:13 -07:00
Junio C Hamano
a9fb582323 Merge branch 'jc/count' into next
* jc/count:
  builtin-count-objects: make it official.
2006-05-01 23:18:09 -07:00
Junio C Hamano
064c5bceee Merge branch 'jc/logs' into next
* jc/logs:
  builtin-log/whatchanged/show: make them official.
2006-05-01 23:16:35 -07:00
Junio C Hamano
7b763f7c65 builtin-log/whatchanged/show: make them official.
Remove the shell script version, and hardlink the git binary to
them.

Signed-off-by: Junio C Hamano <junkio@cox.net>
2006-05-01 23:15:09 -07:00
Junio C Hamano
200f5dffc2 Merge branch 'jc/diff' into next
* jc/diff:
  builtin-diff: call it "git-diff", really.
2006-05-01 23:09:15 -07:00
Junio C Hamano
8ab99476ec builtin-diff: call it "git-diff", really.
Call it "git diff" not "git diffn", remove the shell script
version, and hardlink the git binary to it.

Signed-off-by: Junio C Hamano <junkio@cox.net>
2006-05-01 23:07:28 -07:00
Junio C Hamano
468eb79ed4 builtin-count-objects: make it official.
Remove the shell-script version, make the hardlink from the git
binary, and update the documentation to describe a new option.

Signed-off-by: Junio C Hamano <junkio@cox.net>
2006-05-01 23:06:06 -07:00
Junio C Hamano
746437d534 Merge branch 'jc/xsha1-2'
* jc/xsha1-2:
  Extended SHA1 -- "rev^@" syntax to mean "all parents"
2006-05-01 22:55:40 -07:00
Junio C Hamano
cbd800ba79 Merge branch 'jc/pack' 2006-05-01 22:54:22 -07:00
Junio C Hamano
95a31cc5b3 Merge branch 'jc/pathcheck'
* jc/pathcheck:
  revision parsing: make "rev -- paths" checks stronger.
2006-05-01 22:51:27 -07:00
Junio C Hamano
50cbebf78d Merge branch 'nh/fetch-http'
* nh/fetch-http:
  git-fetch: resolve remote symrefs for HTTP transport
2006-05-01 22:42:01 -07:00
Junio C Hamano
dd097fcd4d Merge branch 'se/rebase'
* se/rebase:
  Add --continue and --abort options to git-rebase.
2006-05-01 22:39:57 -07:00
Junio C Hamano
f5196dbb25 Merge branch 'jc/cache-tree' into next
* jc/cache-tree:
  fsck-objects: mark objects reachable from cache-tree
  cache-tree: replace a sscanf() by two strtol() calls
2006-05-01 22:28:33 -07:00
Junio C Hamano
cdc08b33ef fsck-objects: mark objects reachable from cache-tree
When fsck-objects scanned cache-tree, it forgot to mark the
trees it found reachable and in use.

Signed-off-by: Junio C Hamano <junkio@cox.net>
2006-05-01 22:15:54 -07:00
Johannes Schindelin
0111ea38cb cache-tree: replace a sscanf() by two strtol() calls
On one of my systems, sscanf() first calls strlen() on the buffer. But
this buffer is not terminated by NUL. So git crashed.

strtol() does not share that problem, as it stops reading after the
first non-digit.

[jc: original patch was wrong and did not read the cache-tree
 structure correctly; this has been fixed up and tested minimally
 with fsck-objects. ]

Signed-off-by: Johannes Schindelin <Johannes.Schindelin@gmx.de>
Signed-off-by: Junio C Hamano <junkio@cox.net>
2006-05-01 22:14:03 -07:00
Junio C Hamano
f476ce2061 Merge branch 'jc/grep' into next
* jc/grep:
  builtin-grep: do not use setup_revisions()
  builtin-grep: support '-l' option.
  builtin-grep: wildcard pathspec fixes
2006-05-01 16:27:07 -07:00
Junio C Hamano
1362671f6a 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>
2006-05-01 15:58:29 -07:00
Junio C Hamano
df0e7aa864 builtin-grep: support '-l' option.
Signed-off-by: Junio C Hamano <junkio@cox.net>
2006-05-01 12:40:17 -07:00
Junio C Hamano
e0eb889f8e 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>
2006-05-01 12:31:04 -07:00
Junio C Hamano
9318ec234b Merge branch 'jc/fmt-patch' into next
* jc/fmt-patch:
  Use RFC2822 dates from "git fmt-patch".
2006-05-01 01:55:02 -07:00
Junio C Hamano
18667f67e0 Merge branch 'jc/xsha1' into next
* jc/xsha1:
  get_sha1(): :path and :[0-3]:path to extract from index.
2006-05-01 01:54:53 -07:00
Junio C Hamano
83262ec139 Merge branch 'jc/xsha1-2' into next
* jc/xsha1-2:
  Extended SHA1 -- "rev^@" syntax to mean "all parents"
2006-05-01 01:54:27 -07:00
Junio C Hamano
afbe700e43 Merge branch 'jc/grep' into next
* jc/grep:
  built-in "git grep"
2006-05-01 01:54:02 -07:00
Junio C Hamano
2a38704323 Use RFC2822 dates from "git fmt-patch".
Still Work-in-progress git fmt-patch (should it be known as
format-patch-ng?) is matched with the fix made by Huw Davies
in 262a6ef76a commit to use
RFC2822 date format.

Signed-off-by: Junio C Hamano <junkio@cox.net>
2006-05-01 01:44:33 -07:00
Junio C Hamano
5010cb5fcc 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>
2006-05-01 01:26:46 -07:00
Junio C Hamano
73b0e5af9d get_sha1(): :path and :[0-3]:path to extract from index.
Earlier patch to say <ent>:<path> by Linus was very useful, and
this extends the same idea to the current index.  An sha1
expression :<path> extracts the object name for the named path
from the current index.

Signed-off-by: Junio C Hamano <junkio@cox.net>
2006-04-30 17:55:34 -07:00
Junio C Hamano
ea4a19e172 Extended SHA1 -- "rev^@" syntax to mean "all parents"
A short-hand "rev^@" is understood to be "all parents of the
named commit" with this patch.  So you can do

	git show v1.0.0^@

to view the parents of a merge commit,

	gitk ^v1.0.0^@ v1.0.4

to view the log between two revs (including the bottom one), and

	git diff --cc v1.1.0 v1.0.0^@

to inspect what got changed from the merge parents of v1.0.0 to v1.1.0.

This might be just my shiny new toy that is not very useful in
practice.  I needed it to do the multi-tree diff on Len's
infamous 12-way Octopus; typing "diff --cc funmerge funmerge^1
funmerge^2 funmerge^3 ..." was too painful.

[jc: taking suggestions from Linus and Johannes to match expectations
from shell users who are used to see $@ or $* either of which makes
sense.  I tend to write "$@" more often so...]

Signed-off-by: Junio C Hamano <junkio@cox.net>
2006-04-30 17:55:33 -07:00
Junio C Hamano
d23358fb93 Merge branch 'lt/push' into next
* lt/push:
  Fix builtin-push to honor Push: lines in remotes file.
  builtin-push: resurrect parsing of Push: lines
2006-04-30 16:20:18 -07:00
Junio C Hamano
7aaf83dafb Fix builtin-push to honor Push: lines in remotes file.
[jc: originally from Johannes Schindelin, but reworked to lift a
 hard limit of Push: lines]

Signed-off-by: Junio C Hamano <junkio@cox.net>
2006-04-30 16:03:27 -07:00
Johannes Schindelin
5c477b9725 builtin-push: resurrect parsing of Push: lines
The C'ification of push left these behind.

Signed-off-by: Johannes Schindelin <Johannes.Schindelin@gmx.de>
Signed-off-by: Junio C Hamano <junkio@cox.net>
2006-04-30 15:42:09 -07:00
Junio C Hamano
88a3d24831 Merge branch 'jc/diff' into next
* jc/diff:
  builtin-diff.c: die() formatting type fix.
2006-04-30 01:01:24 -07:00
Junio C Hamano
6b401891a2 Merge branch 'lt/push' into next
* lt/push:
  git builtin "push"
  git-format-patch: Use rfc2822 compliant date.
2006-04-30 01:00:55 -07:00
Linus Torvalds
755225de6c git builtin "push"
This adds a builtin "push" command, which is largely just a C'ification of
the "git-push.sh" script.

Now, the reason I did it as a built-in is partly because it's yet another
step on relying less on shell, but it's actually mostly because I've
wanted to be able to push to _multiple_ repositories, and the most obvious
and simplest interface for that would seem be to just have a "remotes"
file that has multiple URL entries.

(For "pull", having multiple entries should either just select the first
one, or you could fall back on the others on failure - your choice).

And quite frankly, it just became too damn messy to do that in shell.
Besides, we actually have a fair amount of infrastructure in C, so it just
wasn't that hard to do.

Of course, this is almost totally untested. It probably doesn't work for
anything but the one trial I threw at it. "Simple" doesn't necessarily
mean "obviously correct".

Signed-off-by: Linus Torvalds <torvalds@osdl.org>
Signed-off-by: Junio C Hamano <junkio@cox.net>
2006-04-30 00:59:18 -07:00
Junio C Hamano
66ae0c7702 Merge branch 'fix'
* fix:
  git-format-patch: Use rfc2822 compliant date.
2006-04-30 00:59:10 -07:00
Huw Davies
262a6ef76a git-format-patch: Use rfc2822 compliant date.
Signed-off-by: Huw Davies <huw@codeweavers.com>
Signed-off-by: Junio C Hamano <junkio@cox.net>
2006-04-30 00:32:25 -07:00
Junio C Hamano
334b506a34 builtin-diff.c: die() formatting type fix.
Signed-off-by: Junio C Hamano <junkio@cox.net>
2006-04-30 00:26:41 -07:00
Junio C Hamano
a0c5081a78 Merge branch 'jc/diff' into next
* jc/diff:
  built-in diff: assorted updates.
  built-in diff.
2006-04-29 01:33:16 -07:00
Junio C Hamano
0fe7c1de16 built-in diff: assorted updates.
"git diff(n)" without --base, --ours, etc. defaults to --cc,
which usually is the same as -p unless you are in the middle of
a conflicted merge, just like the shell script version.

"git diff(n) blobA blobB path" complains and dies.

"git diff(n) tree0 tree1 tree2...treeN" does combined diff that
shows a merge of tree1..treeN to result in tree0.

Giving "-c" option to any command that defaults to "--cc" turns
off dense-combined flag.

Signed-off-by: Junio C Hamano <junkio@cox.net>
2006-04-29 01:32:53 -07:00
Junio C Hamano
65056021f2 built-in diff.
This starts to replace the shell script version of "git diff".

Signed-off-by: Junio C Hamano <junkio@cox.net>
2006-04-28 23:20:52 -07:00
Junio C Hamano
4623d43de5 Merge branch 'np/delta' into next
* np/delta:
  replace adler32 with Rabin's polynomial in diff-delta
2006-04-28 22:42:41 -07:00
Nicolas Pitre
3dc5a9e4cd replace adler32 with Rabin's polynomial in diff-delta
This brings another small repacking speedup for sensibly the same pack
size.  On the Linux kernel repo, git-repack -a -f is 3.7% faster for a
0.4% larger pack.

Credits to Geert Bosch who brought the Rabin's polynomial idea to my
attention.

This also eliminate the issue of adler32() reading past the data buffer,
as noticed by Johannes Schindelin.

Signed-off-by: Nicolas Pitre <nico@cam.org>
Signed-off-by: Junio C Hamano <junkio@cox.net>
2006-04-28 22:41:31 -07:00
Junio C Hamano
1d19b324fb Merge branch 'master' into next
* master:
  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.
2006-04-28 19:30:41 -07:00