Commit graph

4217 commits

Author SHA1 Message Date
Junio C Hamano 5379a5c5ee Thin pack generation: optimization.
Jens Axboe noticed that recent "git push" has become very slow
since we made --thin transfer the default.

Thin pack generation to push a handful revisions that touch
relatively small number of paths out of huge tree was stupid; it
registered _everything_ from the excluded revisions.  As a
result, "Counting objects" phase was unnecessarily expensive.

This changes the logic to register the blobs and trees from
excluded revisions only for paths we are actually going to send
to the other end.

Signed-off-by: Junio C Hamano <junkio@cox.net>
2006-04-07 02:08:38 -07:00
Junio C Hamano 9760662f1a Add Documentation/technical/pack-format.txt
... along with the previous one, pack-heuristics, by popular
demand.

Signed-off-by: Junio C Hamano <junkio@cox.net>
2006-04-07 02:07:40 -07:00
Jon Loeliger b116b297a8 Added Packing Heursitics IRC writeup.
Signed-off-by: Jon Loeliger <jdl@jdl.com>
Signed-off-by: Junio C Hamano <junkio@cox.net>
2006-04-07 02:06:18 -07:00
Junio C Hamano 5040f17eba blame -S <ancestry-file>
This adds the -S <ancestry-file> option to blame, which is
needed by the CVS server emulation.

Signed-off-by: Junio C Hamano <junkio@cox.net>
2006-04-07 01:59:51 -07:00
Junio C Hamano a0fd31463b Match ofs/cnt types in diff interface.
Signed-off-by: Junio C Hamano <junkio@cox.net>
2006-04-06 22:29:55 -07:00
Mike McCormack 454a35b847 Add documentation for git-imap-send.
Signed-off-by: Mike McCormack <mike@codeweavers.com>
Signed-off-by: Junio C Hamano <junkio@cox.net>
2006-04-05 20:48:40 -07:00
Junio C Hamano 2db70f684a Merge branch 'master' into next
* master:
  blame.c: fix completely broken ancestry traversal.
2006-04-05 18:22:19 -07:00
Junio C Hamano ba3c93743a blame.c: fix completely broken ancestry traversal.
Recent revision.c updates completely broken the assignment of
blames by not rewriting commit->parents field unless explicitly
asked to by the caller.  The caller needs to set revs.parents.

Signed-off-by: Junio C Hamano <junkio@cox.net>
2006-04-05 18:21:17 -07:00
Paul Mackerras c5a4c4debe gitk: Fix incorrect invocation of getmergediffline
Signed-off-by: Paul Mackerras <paulus@samba.org>
2006-04-06 10:20:03 +10:00
Pavel Roskin 3754354125 [PATCH] gitk: Fix searching for filenames in gitk
findcont should not accept any arguments.

Signed-off-by: Pavel Roskin <proski@gnu.org>
Signed-off-by: Paul Mackerras <paulus@samba.org>
2006-04-06 10:19:23 +10:00
Junio C Hamano 9cda21defb Merge branch 'jc/date' into next
* jc/date:
  date parsing: be friendlier to our European friends.
  Tweaks to make asciidoc play nice.
  git-commit: document --amend
  Avoid a crash if realloc returns a different pointer.
  Avoid a divide by zero if there's no messages to send.
  [PATCH] Provide configurable UI font for gitk
  [PATCH] gitk: Use git wrapper to run git-ls-remote.
  [PATCH] gitk: add key bindings for selecting first and last commit
  gitk: Add a help menu item to display key bindings
  [PATCH] gitk: allow goto heads
  gitk: replace parent and children arrays with lists
2006-04-05 15:47:29 -07:00
Junio C Hamano 38035cf4a5 date parsing: be friendlier to our European friends.
This does three things, only applies to cases where the user
manually tries to override the author/commit time by environment
variables, with non-ISO, non-2822 format date-string:

 - Refuses to use the interpretation to put the date in the
   future; recent kernel history has a commit made with
   10/03/2006 which is recorded as October 3rd.

 - Adds '.' as the possible year-month-date separator.  We
   learned from our European friends on the #git channel that
   dd.mm.yyyy is the norm there.

 - When the separator is '.', we prefer dd.mm.yyyy over
   mm.dd.yyyy; otherwise mm/dd/yy[yy] takes precedence over
   dd/mm/yy[yy].

Signed-off-by: Junio C Hamano <junkio@cox.net>
2006-04-05 15:47:17 -07:00
Francis Daly 6cbd5d7d79 Tweaks to make asciidoc play nice.
Once the content has been generated, the formatting elves can reorder
it to be pretty...

Signed-off-by: Francis Daly <francis@daoine.org>
Signed-off-by: Junio C Hamano <junkio@cox.net>
2006-04-05 15:46:54 -07:00
Junio C Hamano 1b83ace35e Merge branch 'jc/blame' into next
* jc/blame:
  blame: use built-in xdiff
2006-04-05 14:26:00 -07:00
Junio C Hamano 806d097e6b Merge branch 'nh/http' into next
* nh/http:
  Fix compile with expat, but an old curl version
2006-04-05 14:25:57 -07:00
Junio C Hamano f2f880f537 blame: use built-in xdiff
This removes the last use of external diff from core git suite.
Also addresses the use of index() -- elsewhere we tend to use
strchr().

Signed-off-by: Junio C Hamano <junkio@cox.net>
2006-04-05 14:25:25 -07:00
Marco Roeland ae5d8470f6 git-commit: document --amend
The "--amend" option is used to amend the tip of the current branch. This
documentation text was copied straight from the commit that implemented it.

Some minor format tweaks for asciidoc were taken from work by Francis Daly
in commit b0d08a5.. It looks good now also in the html page.

[jc: amended further to follow the recommendation by Francis in
commit 3070b60].

Signed-off-by: Marco Roeland <marco.roeland@xs4all.nl>
Signed-off-by: Junio C Hamano <junkio@cox.net>
2006-04-05 14:07:21 -07:00
Junio C Hamano 3ffe0c245f Merge branch 'jc/clone'
* jc/clone:
  git-clone: fix handling of upsteram whose HEAD does not point at master.
2006-04-05 14:06:50 -07:00
Junio C Hamano 9b6891f651 Merge branch 'pb/regex'
* pb/regex:
  On some platforms, certain headers need to be included before regex.h
  Support for pickaxe matching regular expressions
2006-04-05 14:06:26 -07:00
Mike McCormack 34c5a9e284 Avoid a crash if realloc returns a different pointer.
Signed-off-by: Junio C Hamano <junkio@cox.net>
2006-04-05 13:00:07 -07:00
Mike McCormack 1cd88cc9e6 Avoid a divide by zero if there's no messages to send.
Signed-off-by: Junio C Hamano <junkio@cox.net>
2006-04-05 13:00:03 -07:00
Johannes Schindelin 459a21bd35 Fix compile with expat, but an old curl version
With an old curl version, git-http-push is not compiled. But git-http-fetch
still needs to be linked with expat if NO_EXPAT is not defined.

Signed-off-by: Johannes Schindelin <Johannes.Schindelin@gmx.de>
Signed-off-by: Junio C Hamano <junkio@cox.net>
2006-04-05 12:49:56 -07:00
Junio C Hamano 521a3f6767 Merge git://git.kernel.org/pub/scm/gitk/gitk
* git://git.kernel.org/pub/scm/gitk/gitk:
  [PATCH] Provide configurable UI font for gitk
  [PATCH] gitk: Use git wrapper to run git-ls-remote.
  [PATCH] gitk: add key bindings for selecting first and last commit
  gitk: Add a help menu item to display key bindings
  [PATCH] gitk: allow goto heads
  gitk: replace parent and children arrays with lists
2006-04-05 12:45:17 -07:00
Junio C Hamano d6102b53c8 Merge branch 'jc/combine' into next
* jc/combine:
  combine-diff: move the code to parse hunk-header into common library.
2006-04-05 12:25:03 -07:00
Junio C Hamano c1e335a43f combine-diff: move the code to parse hunk-header into common library.
Signed-off-by: Junio C Hamano <junkio@cox.net>
2006-04-05 12:22:35 -07:00
Junio C Hamano b4196cf70a Merge branches 'master' and 'jc/combine' into next
* master:
  Add git-clean command
  diff_flush(): leakfix.
  parse_date(): fix parsing 03/10/2006

* jc/combine:
  combine-diff: refactor built-in xdiff interface.
2006-04-05 02:58:14 -07:00
Pavel Roskin c3b831bd84 Add git-clean command
This command removes untracked files from the working tree.  This
implementation is based on cg-clean with some simplifications.  The
documentation is included.

[jc: with trivial documentation fix, noticed by Jakub Narebski]

Signed-off-by: Pavel Roskin <proski@gnu.org>
Signed-off-by: Junio C Hamano <junkio@cox.net>
2006-04-05 02:51:27 -07:00
Junio C Hamano 12d81ce598 Merge branch 'fix'
* fix:
  diff_flush(): leakfix.
  parse_date(): fix parsing 03/10/2006
2006-04-05 02:50:54 -07:00
Junio C Hamano 7d6c447145 diff_flush(): leakfix.
We were leaking filepairs when output-format was set to
NO_OUTPUT.

Signed-off-by: Junio C Hamano <junkio@cox.net>
2006-04-05 02:48:41 -07:00
Junio C Hamano d9ea73e056 combine-diff: refactor built-in xdiff interface.
This refactors the line-by-line callback mechanism used in
combine-diff so that other programs can reuse it more easily.

Signed-off-by: Junio C Hamano <junkio@cox.net>
2006-04-05 02:09:58 -07:00
Junio C Hamano fa0cdab537 parse_date(): fix parsing 03/10/2006
The comment associated with the date parsing code for three
numbers separated with slashes or dashes implied we wanted to
interpret using this order:

	yyyy-mm-dd
	yyyy-dd-mm
	mm-dd-yy
	dd-mm-yy

However, the actual code had the last two wrong, and making it
prefer dd-mm-yy format over mm-dd-yy.

Signed-off-by: Junio C Hamano <junkio@cox.net>
2006-04-04 23:00:18 -07:00
Junio C Hamano 110cb41cbf Merge branch 'nh/http' into next
* nh/http:
  http-fetch: add optional DAV-based pack list
  cvsimport: use git-update-ref when updating
2006-04-04 18:13:54 -07:00
Nick Hengeveld 8d9fbe57b3 http-fetch: add optional DAV-based pack list
If git is not built with NO_EXPAT, this patch changes git-http-fetch to
attempt using DAV to get a list of remote packs and fall back to using
objects/info/packs if the DAV request fails.

Signed-off-by: Nick Hengeveld <nickh@reactrix.com>
Signed-off-by: Junio C Hamano <junkio@cox.net>
2006-04-04 18:06:35 -07:00
Keith Packard 4840be66b1 [PATCH] Provide configurable UI font for gitk
This makes the font used in the UI elements of gitk configurable in the
same way the other fonts are. The default fonts used in the Xft build of
tk8.5 are particularily horrific, making this change more important
there.

Signed-off-by: Keith Packard <keithp@neko.keithp.com>
Acked-by: Junio C Hamano <junkio@cox.net>
Signed-off-by: Paul Mackerras <paulus@samba.org>
2006-04-05 10:29:47 +10:00
Mark Wooding ce08872259 [PATCH] gitk: Use git wrapper to run git-ls-remote.
For some reason, the Cygwin Tcl's `exec' command has trouble running
scripts.  Fix this by using the C `git' wrapper.  Other GIT programs run
by gitk are written in C already, so we don't need to incur a
performance hit of going via the wrapper (which I'll bet isn't pretty
under Cygwin).

Signed-off-by: Mark Wooding <mdw@distorted.org.uk>
Acked-by: Junio C Hamano <junkio@cox.net>
Signed-off-by: Paul Mackerras <paulus@samba.org>
2006-04-05 10:28:34 +10:00
Rutger Nijlunsing 6e5f7203de [PATCH] gitk: add key bindings for selecting first and last commit
For a keyboard addict like me some keys are still missing from
gitk. Especially a key to select a commit when no commit is selected,
like just after startup. While we're at it, complete the bindings for
moving the view seperately from the selected line. Currently, the up
and down keys act on the selected line while pageup and pagedown act
on the commits viewed.

The idea is to have to normal keys change the selected line:
  - Home selects first commit
  - End selects last commit
  - Up selects previous commit
  - Down selects next commit
  - PageUp moves selected line one page up
  - PageDown moves selected line one page down
...and together with the Control key, it moves the commits view:
  - Control-Home views first page of commits
  - Control-End views last page of commits
  - Control-Up moves commit view one line up
  - Control-Down moves commit view one line down
  - Control-PageUp moves commit view one page up
  - Control-PageDown moves commit view one page down

Signed-off-By: Rutger Nijlunsing <gitk@tux.tmfweb.nl>

and with some cleanups and simplifications...
Signed-off-by: Paul Mackerras <paulus@samba.org>
2006-04-05 10:24:03 +10:00
Junio C Hamano afb28f239f Merge branch 'pb/regex' into next
* pb/regex:
  On some platforms, certain headers need to be included before regex.h
2006-04-04 17:15:02 -07:00
Johannes Schindelin 46b8dec038 On some platforms, certain headers need to be included before regex.h
Happily, these are already included in cache.h, which is included anyway...
so: change the order of includes.

Signed-off-by: Johannes Schindelin <Johannes.Schindelin@gmx.de>
Signed-off-by: Junio C Hamano <junkio@cox.net>
2006-04-04 17:14:06 -07:00
Johannes Schindelin 42277bc81c cvsimport: use git-update-ref when updating
This simplifies code, and also fixes a subtle bug: when importing in a
shared repository, where another user last imported from CVS, cvsimport
used to complain that it could not open <branch> for update.

Signed-off-by: Johannes Schindelin <Johannes.Schindelin@gmx.de>
Signed-off-by: Junio C Hamano <junkio@cox.net>
2006-04-04 17:13:25 -07:00
Paul Mackerras 4e95e1f738 gitk: Add a help menu item to display key bindings
Suggested by Paul Schulz.  I made it a separate entry under the Help
menu rather than putting it in the About box, though.

Signed-off-by: Paul Mackerras <paulus@samba.org>
2006-04-05 09:39:51 +10:00
Stephen Rothwell e100712968 [PATCH] gitk: allow goto heads
This patch allows you to enter a head name in the SHA1 id: field.

It also removes some unnecessary global declarations.

Signed-off-by: Stephen Rothwell <sfr@canb.auug.org.au>
Signed-off-by: Paul Mackerras <paulus@samba.org>
2006-04-05 09:14:02 +10:00
Junio C Hamano ca3874a470 Merge branch 'jc/combine' into next
* jc/combine:
  combine-diff: use built-in xdiff.
  GIT 1.3.0-rc2
  Set HTTP user agent to git/GIT_VERSION
  git-ls-remote: send no-cache header when fetching info/refs
2006-04-04 15:00:34 -07:00
Junio C Hamano f23fc773a2 combine-diff: use built-in xdiff.
Now there is no GNU diff invocations, except the one from
blame.c

Signed-off-by: Junio C Hamano <junkio@cox.net>
2006-04-04 14:53:43 -07:00
Junio C Hamano fc4c4cd21c GIT 1.3.0-rc2
Bunch of cleanups with a few notable enhancements since
1.3.0-rc1:

 - revision traversal infrastructure is updated so that
   existence of paths limiters and/or --max-age does not cause
   it to call limit_list().  This helps the latency working with
   the command quite a bit.

 - comes with updated gitk.

One notable fix is to make sure that the IO is restarted upon
signal even on platforms whose default signal semantics is not
to do so.  This is the fix for the notorious "clone is broken
since 1.2.2 on Solaris" problem.

Signed-off-by: Junio C Hamano <junkio@cox.net>
2006-04-04 14:52:53 -07:00
Junio C Hamano 3d9c54d7b3 Merge in xdiff cleanup pieces 2006-04-04 14:43:57 -07:00
Nick Hengeveld 20fc9bc5e4 Set HTTP user agent to git/GIT_VERSION
Useful for diagnostics/troubleshooting to know which client versions are
hitting your server.

Signed-off-by: Nick Hengeveld <nickh@reactrix.com>
Signed-off-by: Junio C Hamano <junkio@cox.net>
2006-04-04 14:42:47 -07:00
Nick Hengeveld 7fa8ddd6e2 git-ls-remote: send no-cache header when fetching info/refs
Proxies should not cache this file as it can cause a client to end up with
a stale version, as reported here:

http://marc.theaimsgroup.com/?l=git&m=114407944125389

Signed-off-by: Nick Hengeveld <nickh@reactrix.com>
Signed-off-by: Junio C Hamano <junkio@cox.net>
2006-04-04 14:36:22 -07:00
Junio C Hamano 46e48c3604 Merge branch 'pb/regex' into next
* pb/regex:
  Support for pickaxe matching regular expressions
2006-04-04 13:45:29 -07:00
Petr Baudis d01d8c6782 Support for pickaxe matching regular expressions
git-diff-* --pickaxe-regex will change the -S pickaxe to match
POSIX extended regular expressions instead of fixed strings.

The regex.h library is a rather stupid interface and I like pcre too, but
with any luck it will be everywhere we will want to run Git on, it being
POSIX.2 and all. I'm not sure if we can expect platforms like AIX to
conform to POSIX.2 or if win32 has regex.h. We might add a flag to
Makefile if there is a portability trouble potential.

Signed-off-by: Petr Baudis <pasky@suse.cz>
2006-04-04 13:44:15 -07:00
Junio C Hamano 810e152375 Merge branch 'pe/cleanup'
* pe/cleanup:
  Replace xmalloc+memset(0) with xcalloc.
  Use blob_, commit_, tag_, and tree_type throughout.
2006-04-04 13:43:00 -07:00