Commit graph

55 commits

Author SHA1 Message Date
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 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 c74320872b built-in count-objects.
Also it learned to do -v (verbose) to report:

	- number of loose objects
	- disk occupied by loose objects
	- number of objects in local packs
	- number of loose objects that are also in pack
	- unrecognised garbage in .git/objects/??/.

Signed-off-by: Junio C Hamano <junkio@cox.net>
2006-04-27 21:35:27 -07:00
Junio C Hamano 91efcf6065 Merge branch 'master' into jc/fmt-patch
* master:
  Split up builtin commands into separate files from git.c
  git-log produces no output
  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"
  git-commit --amend: two fixes.
  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
  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.
  git log: don't do merge diffs by default
  Allow "git repack" users to specify repacking window/depth
  Document git-clone --reference
  Fix filename scaling for binary files
  Fix uninteresting tags in new revision parsing

Conflicts:

    Adjusted the addition of fmt-patch to match the recent split
    from git.c to builtin.log.c.
2006-04-21 13:25:47 -07:00
Linus Torvalds 70827b15bf 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>
2006-04-21 13:14:41 -07:00