1
0
mirror of https://github.com/git/git.git synced 2024-10-06 04:01:26 +02:00
Commit Graph

10897 Commits

Author SHA1 Message Date
Martin Koegler
e3dfddb377 builtin-pack-object: cache small deltas
Signed-off-by: Martin Koegler <mkoegler@auto.tuwien.ac.at>
Signed-off-by: Junio C Hamano <junkio@cox.net>
2007-05-29 01:24:42 -07:00
Martin Koegler
074b2eea29 git-pack-objects: cache small deltas between big objects
Creating deltas between big blobs is a CPU and memory intensive task.
In the writing phase, all (not reused) deltas are redone.

This patch adds support for caching deltas from the deltifing phase, so
that that the writing phase is faster.

The caching is limited to small deltas to avoid increasing memory usage very much.
The implemented limit is (memory needed to create the delta)/1024.

Signed-off-by: Martin Koegler <mkoegler@auto.tuwien.ac.at>
Signed-off-by: Junio C Hamano <junkio@cox.net>
2007-05-29 01:24:42 -07:00
Martin Koegler
a588d88aaf builtin-pack-objects: don't fail, if delta is not possible
If builtin-pack-objects runs out of memory while finding
the best deltas, it bails out with an error.

If the delta index creation fails (because there is not enough memory),
we can downgrade the error message to a warning and continue with the
next object.

Signed-off-by: Martin Koegler <mkoegler@auto.tuwien.ac.at>
Signed-off-by: Junio C Hamano <junkio@cox.net>
2007-05-29 01:24:42 -07:00
Junio C Hamano
322bcd9a9a Merge branch 'db/remote'
* db/remote:
  Move refspec pattern matching to match_refs().
  Update local tracking refs when pushing
  Add handlers for fetch-side configuration of remotes.
  Move refspec parser from connect.c and cache.h to remote.{c,h}
  Move remote parsing into a library file out of builtin-push.
2007-05-29 01:24:20 -07:00
Junio C Hamano
a77a33a51d Merge branch 'dh/repack' (early part)
* 'dh/repack' (early part):
  Ensure git-repack -a -d --max-pack-size=N deletes correct packs
  pack-objects: clarification & option checks for --max-pack-size
  git-repack --max-pack-size: add option parsing to enable feature
  git-repack --max-pack-size: split packs as asked by write_{object,one}()
  git-repack --max-pack-size: write_{object,one}() respect pack limit
  git-repack --max-pack-size: new file statics and code restructuring
  Alter sha1close() 3rd argument to request flush only
2007-05-29 01:16:28 -07:00
Junio C Hamano
41ffe5cdf5 Merge branch 'np/delta'
* np/delta:
  update diff-delta.c copyright
  improve delta long block matching with big files
2007-05-29 00:49:23 -07:00
Junio C Hamano
96cbd573d4 Merge branch 'jc/nodelta'
* jc/nodelta:
  builtin-pack-objects: remove unnecessary code for no-delta
  Teach "delta" attribute to pack-objects.
  pack-objects: pass fullname down to add_object_entry()
2007-05-29 00:41:50 -07:00
Junio C Hamano
8a15e1b719 Merge branch 'ar/verbose'
* ar/verbose:
  Add another verbosity level to git-fetch
  Verbose connect messages to show the IP addresses used
2007-05-29 00:41:36 -07:00
Junio C Hamano
e157938a92 Merge branch 'ar/run'
* ar/run:
  Allow environment variables to be unset in the processes started by run_command
  Add ability to specify environment extension to run_command
  Add run_command_v_opt_cd: chdir into a directory before exec
2007-05-29 00:41:22 -07:00
Junio C Hamano
8250465859 Merge branch 'ar/mergestat'
* ar/mergestat:
  Add a configuration option to control diffstat after merge
2007-05-29 00:38:52 -07:00
Junio C Hamano
9953a00ef2 Merge branch 'rr/cvsexport'
* rr/cvsexport:
  Add option to cvs update before export
2007-05-29 00:37:23 -07:00
Junio C Hamano
79d5576a4f Merge branch 'maint'
* maint:
  cvsserver: Fix some typos in asciidoc documentation
  cvsserver: Note that CVS_SERVER can also be specified as method variable
  cvsserver: Correct inetd.conf example in asciidoc documentation
  user-manual: fixed typo in example
  Add test case for $Id$ expanded in the repository
  git-svn: avoid md5 calculation entirely if SVN doesn't provide one
  Makefile: Remove git-fsck and git-verify-pack from PROGRAMS
  Fix stupid typo in lookup_tag()
  git-gui: Guess our share/git-gui/lib path at runtime if possible
  Correct key bindings to Control-<foo>
  git-gui: Tighten internal pattern match for lib/ directory
2007-05-29 00:27:24 -07:00
Frank Lichtenheld
24a97d84ad cvsserver: Handle 'cvs login'
Since this is a trivial variation of the general pserver
authentication, there is really no reason not to support
it.

Signed-off-by: Frank Lichtenheld <frank@lichtenheld.de>
Signed-off-by: Junio C Hamano <junkio@cox.net>
2007-05-29 00:27:21 -07:00
Frank Lichtenheld
b3c81cff02 t9400: Work around CVS' deficiencies
If we are too fast with our changes, the file in
the working copy might still have the same mtime
as noted in the CVS/Entries. This will cause CVS
to happily report to the server that the file is
unmodified which can lead to data loss (and in
our case test failure).

CVS sucks!

Work around that by sleeping for a second.

Signed-off-by: Frank Lichtenheld <frank@lichtenheld.de>
Signed-off-by: Junio C Hamano <junkio@cox.net>
2007-05-29 00:27:21 -07:00
Shawn O. Pearce
2e4aef5893 Allow contrib new-workdir to link into bare repositories
On one particular system I like to keep a cluster of bare Git
repositories and spawn new-workdirs off of them.  Since the bare
repositories don't have working directories associated with them
they don't have a .git/ subdirectory that hosts the repository we
are linking to.

Using a bare repository as the backing repository for a workdir
created by this script does require that the user delete core.bare
from the repository's configuration file, so that Git auto-senses
the bareness of a repository based on pathname information, and
not based on the config file.

Signed-off-by: Shawn O. Pearce <spearce@spearce.org>
Signed-off-by: Junio C Hamano <junkio@cox.net>
2007-05-29 00:27:21 -07:00
Junio C Hamano
b33271808b mailsplit: fix for more than one input files
Earlier commit d63bd9a broke the case where more than one input
files are fed to mailsplit by not incrementing the base counter
when splitting second and subsequent input files.  This should
fix it.

Signed-off-by: Junio C Hamano <junkio@cox.net>
2007-05-29 00:27:06 -07:00
Frank Lichtenheld
a192a909c0 cvsserver: Fix some typos in asciidoc documentation
Signed-off-by: Frank Lichtenheld <frank@lichtenheld.de>
Signed-off-by: Junio C Hamano <junkio@cox.net>
2007-05-29 00:11:22 -07:00
Frank Lichtenheld
548428954a cvsserver: Note that CVS_SERVER can also be specified as method variable
Reasonably new versions of the cvs CLI client allow one to
specifiy CVS_SERVER as a method variable directly in
CVSROOT. This is way more convinient than using an
environment variable since it gets saved in CVS/Root.

Since I only discovered this by accident I guess there
might be others out there that learnt CVS on the 1.11
series (or even earlier) and profit from such a note
about cvs improvements in the last couple years.

Signed-off-by: Frank Lichtenheld <frank@lichtenheld.de>
Signed-off-by: Junio C Hamano <junkio@cox.net>
2007-05-29 00:11:22 -07:00
Frank Lichtenheld
893c365aba cvsserver: Correct inetd.conf example in asciidoc documentation
While the given example worked, it made us look rather
incompetent. Give the correct reason why one needs the
more complex syntax and change the example to reflect
that.

Signed-off-by: Frank Lichtenheld <frank@lichtenheld.de>
Signed-off-by: Junio C Hamano <junkio@cox.net>
2007-05-29 00:11:22 -07:00
Steffen Prohaska
c78974f7b6 user-manual: fixed typo in example
Signed-off-by: Steffen Prohaska <prohaska@zib.de>
Signed-off-by: Junio C Hamano <junkio@cox.net>
2007-05-28 23:54:35 -07:00
Andy Parkins
dfab71cb92 Add test case for $Id$ expanded in the repository
This test case would have caught the bug fixed by revision
c23290d5.

It puts various forms of $Id$ into a file in the repository,
without allowing git to collapse them to uniformity.  Then enables the
$Id$ expansion on checkout, and checks that what is checked out has
coped with the various forms.

Signed-off-by: Andy Parkins <andyparkins@gmail.com>
Signed-off-by: Junio C Hamano <junkio@cox.net>
2007-05-28 23:54:35 -07:00
Junio C Hamano
cdd5b82ee8 Merge branch 'maint-1.5.1' into maint
* maint-1.5.1:
  git-svn: avoid md5 calculation entirely if SVN doesn't provide one
  Fix stupid typo in lookup_tag()
2007-05-28 23:54:26 -07:00
Eric Wong
7faf068660 git-svn: avoid md5 calculation entirely if SVN doesn't provide one
There's no point in calculating an MD5 if we're not going to use
it.  We'll also avoid the possibility of there being a bug in the
Perl MD5 library not being able to handle zero-sized files.

This is a followup to 20b3d206acbbb042c7ad5f42d36ff8d036a538c5,
which allows us to track repositories that do not provide MD5
checksums.

Signed-off-by: Eric Wong <normalperson@yhbt.net>
Signed-off-by: Junio C Hamano <junkio@cox.net>
2007-05-28 23:49:47 -07:00
Junio C Hamano
c63a3ad2c1 Merge branch 'maint' of git://repo.or.cz/git-gui into maint
* 'maint' of git://repo.or.cz/git-gui:
  git-gui: Guess our share/git-gui/lib path at runtime if possible
  Correct key bindings to Control-<foo>
  git-gui: Tighten internal pattern match for lib/ directory
2007-05-28 20:23:10 -07:00
Nguyen Thai Ngoc Duy
59d10247e4 Makefile: Remove git-fsck and git-verify-pack from PROGRAMS
Those are builtins. Remove them from PROGRAMS variable

Signed-off-by: Nguyễn Thái Ngọc Duy <pclouds@gmail.com>
Signed-off-by: Junio C Hamano <junkio@cox.net>
2007-05-28 20:00:45 -07:00
Johan Herland
eb09626b94 Fix stupid typo in lookup_tag()
Signed-off-by: Johan Herland <johan@herland.net>
Signed-off-by: Junio C Hamano <junkio@cox.net>
2007-05-28 16:51:55 -07:00
Shawn O. Pearce
fc8ce406fa git-gui: Expose the merge.diffstat configuration option
Recently git-merge learned to avoid generating the diffstat after
a merge by reading the merge.diffstat configuration option.  By
default this option is assumed to be true, as that is the old
behavior.  However we can force it to false by setting it as a
standard boolean option.

Signed-off-by: Shawn O. Pearce <spearce@spearce.org>
2007-05-28 17:58:07 -04:00
Shawn O. Pearce
aa252f194b git-gui: Allow users to delete remote branches
Git has supported remote branch deletion for quite some time, but
I've just never gotten around to supporting it in git-gui.  Some
workflows have users push short-term branches to some remote Git
repository, then delete them a few days/weeks later when that topic
has been fully merged into the main trunk.  Typically in that style
of workflow the user will want to remove the branches they created.

We now offer a "Delete..." option in the Push menu, right below the
generic "Push..." option.  When the user opens our generic delete
dialog they can select a preconfigured remote, or enter a random
URL.  We run `git ls-remote $url` to obtain the list of branches and
tags known there, and offer this list in a listbox for the user to
select one or more from.

Like our local branch delete dialog we offer the user a way to filter
their selected branch list down to only those branches that have been
merged into another branch.  This is a very common operation as the
user will likely want to select a range of topic branches, but only
delete them if they have been merged into some sort of common trunk.

Unfortunately our remote merge base detection is not nearly as strict
as the local branch version.  We only offer remote heads as the test
commit (not any local ones) and we require that all necessary commits
to successfully run git-merge-base are available locally.  If one or
more is missing we suggest that the user run a fetch first.

Since the Git remote protocol doesn't let us specify what the tested
commit was when we evaluated our decision to execute the remote delete
there is a race condition here.  The user could do a merge test against
the trunk, determine a topic branch was fully merged, but before they
can start pushing the delete request another user could fast-forward
the remote topic branch to a new commit that is not merged into the
trunk.  The delete will arrive after, and remove the topic, even though
it was not fully merged.

Signed-off-by: Shawn O. Pearce <spearce@spearce.org>
2007-05-28 17:50:42 -04:00
Shawn O. Pearce
61f82ce79a git-gui: Allow users to rename branches through 'branch -m'
Git's native command line interface has had branch renaming
support for quite a while, through the -m/-M options to the
git-branch command line tool.  This is an extremely useful
feature as users may decide that the name of their current
branch is not an adequate description, or was just entered
incorrectly when it was created.

Even though most people would consider git-branch to be a
Porcelain tool I'm using it here in git-gui as it is the
only code that implements the rather complex set of logic
needed to successfully rename a branch in Git.  Currently
that is along the lines of:

 *) Backup the ref
 *) Backup the reflog
 *) Delete the old ref
 *) Create the new ref
 *) Move the backed up reflog to the new ref
 *) Record the rename event in the reflog
 *) If the current branch was renamed, update HEAD
 *) If HEAD changed, record the rename event in the HEAD reflog
 *) Rename the [branch "$name"] section in the config file

Since that is some rather ugly set of functionality to implement
and get right, and some of it isn't easily accessible through the
raw plumbing layer I'm just cheating by relying on the Porcelain.

Signed-off-by: Shawn O. Pearce <spearce@spearce.org>
2007-05-28 17:50:42 -04:00
Shawn O. Pearce
f60fdd0eaa git-gui: Disable tearoff menus on Windows, Mac OS X
The Windows and Mac OS X platforms do not generally use the tearoff
menu feature found on traditional X11 based systems.  On Windows the
Tk engine does support the feature, but it really is out of place and
just confuses people who aren't used to working on a UNIX system.  On
Mac OS X its not supported for the root menu bar and its submenus, as
it doesn't fit into the overall platform UI model.

Signed-off-by: Shawn O. Pearce <spearce@spearce.org>
2007-05-28 17:50:41 -04:00
Shawn O. Pearce
f837170663 git-gui: Provide fatal error if library is unavailable
If we cannot locate our git-gui library directory, or we find it
but the tclIndex file is not present there (or it is present but
is not something we are allowed to read) the user cannot use the
application.  Rather than silently ignoring the errors related to
the tclIndex file being unavailable we report them up front and
display to the user why we cannot start.

Signed-off-by: Shawn O. Pearce <spearce@spearce.org>
2007-05-28 17:50:41 -04:00
Shawn O. Pearce
cd12901b8f git-gui: Enable verbose Tcl loading earlier
When we are using our "non-optimized" tclIndex format (which is
just a list of filenames, in the order necessary for source'ing)
we are doing all of our loading before we even tested to see if
GITGUI_VERBOSE was set in the environment.  This meant we never
showed the files as we sourced them into the environment.

Now we setup our overloaded auto_load and source scripts before
we attempt to define our library path, or source the scripts that
it mentions.  This way GITGUI_VERBOSE is always honored if set.

Signed-off-by: Shawn O. Pearce <spearce@spearce.org>
2007-05-28 17:50:41 -04:00
Shawn O. Pearce
26ae37d6fc git-gui: Show the git-gui library path in 'About git-gui'
Because we now try to automatically guess the library directory
in certain installations users may wonder where git-gui is getting
its supporting files from.  We now display this location in our
About dialog, and we also include the location we are getting our
Git executables from.

Unfortunately users cannot use this 'About git-gui' dialog to
troubleshoot library loading problems; the dialog is defined by
code that exists in the library directory, creating a catch-22.

Signed-off-by: Shawn O. Pearce <spearce@spearce.org>
2007-05-28 17:50:41 -04:00
Shawn O. Pearce
5b6ffff644 git-gui: GUI support for running 'git remote prune <name>'
In some workflows it is common for a large number of temporary
branches to be created in a remote repository, get fetched to
clients that typically only use git-gui, and then later have
those branches deleted from the remote repository once they have
been fully merged into all destination branches.  Users of git-gui
would obviously like to have their local tracking branches cleaned
up for them, otherwise their local tracking branch namespace would
grow out of control.

The best known way to remove these tracking branches is to run
"git remote prune <remotename>".  Even though it is more of a
Porcelain command than plumbing I'm invoking it through the UI,
because frankly I don't see a reason to reimplement its ls-remote
output filtering and config file parsing.

A new configuration option (gui.pruneduringfetch) can be used to
automatically enable running "git remote prune <remotename>" after
the fetch of that remote also completes successfully.  This is off
by default as it require an additional network connection and is
not very fast on Cygwin if a large number of tracking branches have
been removed (due to the 2 fork+exec calls per branch).

Signed-off-by: Shawn O. Pearce <spearce@spearce.org>
2007-05-28 17:50:40 -04:00
Shawn O. Pearce
994a794288 git gui 0.8.0
Open the git-gui 0.8.0 development branch.

Signed-off-by: Shawn O. Pearce <spearce@spearce.org>
2007-05-28 17:50:22 -04:00
Simon Hausmann
cfeb59be25 Fix typo in listExistingP4Branches that broke sync.
Signed-off-by: Simon Hausmann <simon@lst.de>
2007-05-28 19:24:57 +02:00
Simon Hausmann
9226c03c32 In *_pipe print the command that failed if it fails.
Fixed old calls to mypopen.

Signed-off-by: Simon Hausmann <simon@lst.de>
2007-05-28 19:23:19 +02:00
Han-Wen Nienhuys
6326aa5866 Extract multiple paths concurrently.
This enables importing just the interesting bits of large
repositories.

Signed-off-by: Han-Wen Nienhuys <hanwen@google.com>
2007-05-28 12:50:04 -03:00
Han-Wen Nienhuys
4addad2291 add --verbose to all commands.
Signed-off-by: Han-Wen Nienhuys <hanwen@google.com>
2007-05-28 11:45:26 -03:00
Han-Wen Nienhuys
b25b20656d use strip() iso. slicing for removing \n
Signed-off-by: Han-Wen Nienhuys <hanwen@google.com>
2007-05-28 11:20:50 -03:00
Han-Wen Nienhuys
b76f0565bf use string.strip() iso. slicing.
Signed-off-by: Han-Wen Nienhuys <hanwen@google.com>
2007-05-28 11:19:10 -03:00
Han-Wen Nienhuys
8b41a97f8a clone and sync --keep-path to keep perforce path to module.
Signed-off-by: Han-Wen Nienhuys <hanwen@google.com>
2007-05-28 11:18:31 -03:00
Han-Wen Nienhuys
6754a299d8 minor cleanups
Signed-off-by: Han-Wen Nienhuys <hanwen@google.com>
2007-05-28 11:17:27 -03:00
Han-Wen Nienhuys
bce4c5fc0b cleanup
- use re.sub() iso. if for stripping ...
- spacing nits

Signed-off-by: Han-Wen Nienhuys <hanwen@google.com>
2007-05-28 11:15:43 -03:00
Han-Wen Nienhuys
b016d39756 Robustness fixes for pipes
- add read_pipe(), read_pipe_lines(), write_pipe(), which
check pipe.close()

- use throughout

Signed-off-by: Han-Wen Nienhuys <hanwen@google.com>
2007-05-28 11:15:29 -03:00
Han-Wen Nienhuys
5c1131c964 add .dotest to .gitignore
Signed-off-by: Han-Wen Nienhuys <hanwen@google.com>
2007-05-28 11:08:19 -03:00
Simon Hausmann
c8cbbee980 Fix my email address, this isn't really KDE related :)
Signed-off-by: Simon Hausmann <simon@lst.de>
2007-05-28 14:43:25 +02:00
Han-Wen Nienhuys
7cb5cbefd2 rename apply() to applyCommit(); apply is a python builtin
Signed-off-by: Han-Wen Nienhuys <hanwen@google.com>
2007-05-28 14:29:11 +02:00
Han-Wen Nienhuys
cebdf5af31 reformatting: break long lines.
Signed-off-by: Han-Wen Nienhuys <hanwen@google.com>
2007-05-28 14:28:58 +02:00
Han-Wen Nienhuys
ce6f33c835 Cleanups
- don't use dir (python builtin)
- use re for munging depotPath into destination

Signed-off-by: Han-Wen Nienhuys <hanwen@google.com>
2007-05-28 14:22:53 +02:00