1
0
Fork 0
mirror of https://github.com/git/git.git synced 2024-06-10 14:36:48 +02:00
Commit Graph

1034 Commits

Author SHA1 Message Date
Junio C Hamano d87aa32935 Merge branch 'jk/help-alias'
* jk/help-alias:
  help: respect aliases
  make alias lookup a public, procedural function
  help: use parseopt
2008-02-27 11:55:43 -08:00
Junio C Hamano 3c972e1ec4 Merge branch 'ae/pack-autothread'
* ae/pack-autothread:
  Revert "pack-objects: Print a message describing the number of threads for packing"
  pack-objects: Print a message describing the number of threads for packing
  pack-objects: Add runtime detection of online CPU's
2008-02-27 11:54:03 -08:00
Martin Koegler 7914053ba9 Remove unused object-ref code
Signed-off-by: Martin Koegler <mkoegler@auto.tuwien.ac.at>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2008-02-25 23:57:35 -08:00
Martin Koegler 355885d531 add generic, type aware object chain walker
The requirements are:
* it may not crash on NULL pointers
* a callback function is needed, as index-pack/unpack-objects
  need to do different things
* the type information is needed to check the expected <-> real type
  and print better error messages

Signed-off-by: Martin Koegler <mkoegler@auto.tuwien.ac.at>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2008-02-25 23:57:34 -08:00
Jeff King 94351118c0 make alias lookup a public, procedural function
This converts git_config_alias to the public alias_lookup
function. Because of the nature of our config parser, we
still have to rely on setting static data. However, that
interface is wrapped so that you can just say

  value = alias_lookup(key);

Signed-off-by: Jeff King <peff@peff.net>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2008-02-24 18:31:49 -08:00
Junio C Hamano dc31cd8fcc Merge branch 'maint'
* maint:
  Protect peel_ref fallback case from NULL parse_object result
  Ensure 'make dist' compiles git-archive.exe on Cygwin
2008-02-24 10:01:19 -08:00
Shawn O. Pearce 6c0f86943e Ensure 'make dist' compiles git-archive.exe on Cygwin
On Cygwin we have to use git-archive.exe as the target, otherwise
running 'make dist' does not compile git-archive in the current
directory.  That may cause 'make dist' to fail on a clean source
tree that has never been built before.

Signed-off-by: Shawn O. Pearce <spearce@spearce.org>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2008-02-24 00:51:01 -08:00
Andreas Ericsson 833e3df171 pack-objects: Add runtime detection of online CPU's
Packing objects can be done in parallell nowadays, but it's
only done if the config option pack.threads is set to a value
above 1. Because of that, the code-path used is often not the
most optimal one.

This patch adds a routine to detect the number of online CPU's
at runtime (online_cpus()). When pack.threads (or --threads=) is
given a value of 0, the number of threads is set to the number of
online CPU's. This feature is also documented.

As per Nicolas Pitre's recommendations, the default is still to
run pack-objects single-threaded unless explicitly activated,
either by configuration or by command line parameter.

The routine online_cpus() is a rework of "numcpus.c", written by
one Philip Willoughby <pgw99@doc.ic.ac.uk>. numcpus.c is in the
public domain and can presently be downloaded from
http://csgsoft.doc.ic.ac.uk/numcpus/

Signed-off-by: Andreas Ericsson <ae@op5.se>
Signed-off-by: Brandon Casey <casey@nrlssc.navy.mil>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2008-02-23 12:00:32 -08:00
Junio C Hamano 1736855c9b Add merge-subtree back
An earlier commit e1b3a2c (Build-in merge-recursive) made the
subtree merge strategy backend unavailable.  This resurrects
it.

A new test t6029 currently only tests the strategy is available,
but it should be enhanced to check the real "subtree" case.

Signed-off-by: Junio C Hamano <gitster@pobox.com>
2008-02-23 11:14:56 -08:00
Junio C Hamano c0284cea31 Merge branch 'bc/fopen'
* bc/fopen:
  Add compat/fopen.c which returns NULL on attempt to open directory
2008-02-20 16:13:19 -08:00
Junio C Hamano 525ab63950 merge-recursive: split low-level merge functions out.
This moves low-level merge functions out of merge-recursive.c and
places them in a new separate file, ll-merge.c

Signed-off-by: Junio C Hamano <gitster@pobox.com>
2008-02-18 00:46:13 -08:00
Junio C Hamano f8732c5596 Merge branch 'bd/qsort'
* bd/qsort:
  compat: Add simplified merge sort implementation from glibc
2008-02-16 18:11:47 -08:00
Daniel Barkalow 782c2d65c2 Build in checkout
The only differences in behavior should be:

 - git checkout -m with non-trivial merging won't print out
   merge-recursive messages (see the change in t7201-co.sh)

 - git checkout -- paths... will give a sensible error message if
   HEAD is invalid as a commit.

 - some intermediate states which were written to disk in the shell
   version (in particular, index states) are only kept in memory in
   this version, and therefore these can no longer be revealed by
   later write operations becoming impossible.

 - when we change branches, we discard MERGE_MSG, SQUASH_MSG, and
   rr-cache/MERGE_RR, like reset always has.

I'm not 100% sure I got the merge recursive setup exactly right; the
base for a non-trivial merge in the shell code doesn't seem
theoretically justified to me, but I tried to match it anyway, and the
tests all pass this way.

Other than these items, the results should be identical to the shell
version, so far as I can tell.

[jc: squashed lock-file fix from Dscho in]

Signed-off-by: Daniel Barkalow <barkalow@iabervon.org>
Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2008-02-16 15:05:02 -08:00
Brandon Casey cba22528fa Add compat/fopen.c which returns NULL on attempt to open directory
Some systems do not fail as expected when fread et al. are called on
a directory stream. Replace fopen on such systems which will fail
when the supplied path is a directory.

Signed-off-by: Brandon Casey <casey@nrlssc.navy.mil>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2008-02-11 18:25:10 -08:00
Daniel Barkalow e496c00348 Move create_branch into a library file
You can also create branches, in exactly the same way, with checkout -b.

This introduces branch.{c,h} library files for doing porcelain-level
operations on branches (such as creating them with their appropriate
default configuration).

Signed-off-by: Daniel Barkalow <barkalow@iabervon.org>
2008-02-09 23:16:51 -08:00
Daniel Barkalow e1b3a2cad7 Build-in merge-recursive
This makes write_tree_from_memory(), which writes the active cache as
a tree and returns the struct tree for it, available to other code. It
also makes available merge_trees(), which does the internal merge of
two trees with a known base, and merge_recursive(), which does the
recursive internal merge of two commits with a list of common
ancestors.

The first two of these will be used by checkout -m, and the third is
presumably useful in general, although the implementation of checkout
-m which entirely matches the behavior of the shell version does not
use it (since it ignores the difference of ancestry between the old
branch and the new branch).

Signed-off-by: Daniel Barkalow <barkalow@iabervon.org>
2008-02-09 23:16:51 -08:00
Brian Downing 43fe901b71 compat: Add simplified merge sort implementation from glibc
qsort in Windows 2000 (and various other C libraries) is a Quicksort
with the usual O(n^2) worst case.  Unfortunately, sorting Git trees
seems to get very close to that worst case quite often:

    $ /git/gitbad runstatus
    # On branch master
    qsort, nmemb = 30842
    done, 237838087 comparisons.

This patch adds a simplified version of the merge sort that is glibc's
qsort(3).  As a merge sort, this needs a temporary array equal in size
to the array that is to be sorted, but has a worst-case performance of
O(n log n).

The complexity that was removed is:

* Doing direct stores for word-size and -aligned data.
* Falling back to quicksort if the allocation required to perform the
  merge sort would likely push the machine into swap.

Even with these simplifications, this seems to outperform the Windows
qsort(3) implementation, even in Windows XP (where it is "fixed" and
doesn't trigger O(n^2) complexity on trees).

[jes: moved into compat/qsort.c, as per Johannes Sixt's suggestion]
[bcd: removed gcc-ism, thanks to Edgar Toernig.  renamed make variable
      per Junio's comment.]

Signed-off-by: Brian Downing <bdowning@lavos.net>
Signed-off-by: Steffen Prohaska <prohaska@zib.de>
Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2008-02-06 22:35:28 -08:00
Christian Couder 5884f1fe96 Rename 'git-help--browse.sh' to 'git-web--browse.sh'.
Signed-off-by: Christian Couder <chriscool@tuxfamily.org>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2008-02-05 01:01:48 -08:00
Christian Couder 482cce8205 help: make 'git-help--browse' usable outside 'git-help'.
"git-help--browse" helper is to launch a browser of the user's choice
to view the HTML version of git documentation for a given command.  It
used to take the name of a command, convert it to the path of the
documentation by prefixing the directory name and appending the
".html" suffix, and start the browser on the path.

This updates the division of labor between the caller in help.c and
git-help--browser helper.  The helper is now responsible for launching
a browser of the user's choice on given URLs, and it is the caller's
responsibility to tell it the paths to documentation files.

This is in preparation to reuse the logic to choose user's preferred
browser in instaweb.

The helper had a provision for running it without any command name, in
which case it showed the toplevel "git(7)" documentation, but the
caller in help.c never makes such a call.  The helper now exits with a
usage message when no path is given.

Signed-off-by: Christian Couder <chriscool@tuxfamily.org>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2008-02-05 01:01:45 -08:00
Mike Hommey 923e3ec84a Add a missing dependency on http.h
Signed-off-by: Mike Hommey <mh@glandium.org>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2008-01-26 10:52:40 -08:00
Robert Schiele 81cc66a526 Makefile: customization for supporting HP-UX
Signed-off-by: Robert Schiele <rschiele@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2008-01-24 21:58:53 -08:00
Robert Schiele 2600973f2c pre-POSIX.1-2001 systems do not have <sys/select.h>
POSIX.1-2001 has declaration of select(2) in <sys/select.h>, but
in the previous version of SUS, it was declared in <sys/time.h>
(which is already included in git-compat-util.h).

This introduces NO_SYS_SELECT_H macro in the Makefile to be set
on older systems, to skip inclusion of <sys/select.h> that does
not exist on them.

We could check _POSIX_VERSION with 200112L and do this
automatically, but earlier it was reported that the approach
does not work well on some vintage of HP-UX.  Other systems may
get _POSIX_VERSION itself wrong.  At least for now, this manual
configuration is safer.

Signed-off-by: Robert Schiele <rschiele@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2008-01-24 14:01:28 -08:00
Lars Hjemli 181256442e Move sha1_file_to_archive into libgit
When the specfile (export-subst) attribute was introduced, it added a
dependency from archive-{tar|zip}.c to builtin-archive.c. This broke the
support for archive-operations in libgit.a since builtin-archive.o doesn't
belong in libgit.a.

This patch moves the functions required by libgit.a from builtin-archive.c
to the new file archive.c (which becomes part of libgit.a).

Signed-off-by: Lars Hjemli <hjemli@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2008-01-18 12:33:50 -08:00
Jakub Narebski bfa8fccf47 autoconf: Add checking for unsetenv function
Update configure.ac (and config.mak.in) by adding test for unsetenv
(NO_UNSETENV).  Add comment about NO_UNSETENV to Makefile header, as
original commit 731043fd adding compat/unsetenv.c didn't do that.

Signed-off-by: Jakub Narebski <jnareb@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2008-01-17 23:35:36 -08:00
Junio C Hamano 5c66d0d458 Officially deprecate repo-config.
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2008-01-17 22:52:40 -08:00
Junio C Hamano 11c57e6a9a Fix git-rerere documentation
rerere.enabled is _not_ on by default.  The command is enabled if rr-cache
exists even when rerere.enabled is missing, and enabled or disabled by
explicitly setting the rerere.enabled variable.
2008-01-14 16:14:29 -08:00
Pierre Habouzit 2f7ee089df parse-options: Add a gitcli(5) man page.
This page should hold every information about the git ways to parse command
lines, and best practices to be used for scripting.

Signed-off-by: Pierre Habouzit <madcoder@debian.org>
2007-12-22 10:26:08 -08:00
Charles Bailey c569969363 Fix git-instaweb breakage on MacOS X due to the limited sed functionality
git-instaweb relied on a pipe in a sed script, but this is not supported
by MacOS X sed when using BREs.  git-instaweb relies on a working perl
in any case, and perl re are more consistent between platforms, so
replace sed invocation with an equivalent perl invocation.

Also, fix the documented -b "" to work without giving a spurious 'command
not found' error.

Signed-off-by: Charles Bailey <charles@hashpling.org>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2007-12-19 14:59:19 -08:00
Jeff King d7e522cffb rename git-browse--help to git-help--browse
The convention for helper scripts has been
git-$TOOL--$HELPER. Since this is a "browse" helper for the
"help" tool, git-help--browse is a more sensible name.

Signed-off-by: Jeff King <peff@peff.net>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2007-12-16 12:52:40 -08:00
Junio C Hamano fa4701601a Retire git-runstatus for real.
The command was removed from the builtin command list and there was no
way to invoke it, but the code was still there.

Signed-off-by: Junio C Hamano <gitster@pobox.com>
2007-12-14 22:08:25 -08:00
Junio C Hamano 5b4617c749 Rename git-browse-help helper to git-browse--help
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2007-12-14 22:04:43 -08:00
Junio C Hamano 467f42cfa1 Merge branch 'cc/help'
* cc/help:
  RPM spec: Adjust htmldir
  git-help -w: do not require to be in git repository
  git.spec.in: remove python_path
  Documentation: rename git.texi to user-manual.texi
  Add git-browse-help to .gitignore
  git-help -i: show info documentation from matching version of git
  git-help -i: invoke info with document and node name
  Documentation: add gitman.info target
  Documentation: describe -w/--web option to "git-help".
  Use {web,instaweb,help}.browser config options.
  git-help: add -w|--web option to display html man page in a browser.
  Documentation: describe -i/--info option to "git-help"
  git-help: add -i|--info option to display info page.
2007-12-12 17:46:16 -08:00
Gerrit Pape 28072a5d30 Don't cache DESTDIR in perl/perl.mak.
DESTDIR is supposed to be overridden on 'make install' after doing
'make'.  Have the automatically generated perl/perl.mak not cache the
value of DESTDIR to support that for the perl/ subdirectory also.

Signed-off-by: Gerrit Pape <pape@smarden.org>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2007-12-11 00:38:46 -08:00
Junio C Hamano a149a1a44a git-help -i: show info documentation from matching version of git
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2007-12-10 01:36:31 -08:00
Junio C Hamano 7be2b6e02b Merge branch 'master' into cc/help
This is to primarily pull in MANPATH tweak and help.txt formatting fix
from the master branch.
2007-12-10 01:22:42 -08:00
Junio C Hamano 4eb39e9bcc Merge branch 'jc/spht'
* jc/spht:
  Use gitattributes to define per-path whitespace rule
  core.whitespace: documentation updates.
  builtin-apply: teach whitespace_rules
  builtin-apply: rename "whitespace" variables and fix styles
  core.whitespace: add test for diff whitespace error highlighting
  git-diff: complain about >=8 consecutive spaces in initial indent
  War on whitespace: first, a bit of retreat.

Conflicts:

	cache.h
	config.c
	diff.c
2007-12-09 01:23:48 -08:00
Christian Couder 5d6491c7c7 git-help: add -w|--web option to display html man page in a browser.
Now when using "git help -w cmd", we will try to show the HTML man
page "git-cmd.html" in your prefered web browser.

To do that "help.c" code will call a new shell script
"git-browse-help".

This currently works only if the HTML versions of the man page
have been installed in $(htmldir) (typically "/usr/share/doc/git-doc"),
so new target to do that is added to "Documentation/Makefile".

The browser to use can be configured using the "web.browser"
config variable.

We try to open a new tab in an existing web browser, if possible.

The code in "git-browse-help" is heavily stolen from "git-mergetool"
by Theodore Y. Ts'o. Thanks.

Signed-off-by: Christian Couder <chriscool@tuxfamily.org>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2007-12-09 01:19:44 -08:00
Sergei Organov 8e566f24b3 Let git-help prefer man-pages installed with this version of git
Prepend $(prefix)/share/man to the MANPATH environment variable before
invoking 'man' from help.c:show_man_page().  There may be other git
documentation in the user's MANPATH but the user is asking a specific
instance of git about its own documentation, so we'd better show the
documentation for _that_ instance of git.

Signed-off-by: Sergei Organov <osv@javad.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2007-12-08 02:50:54 -08:00
Wincent Colaiuta fe4aafba28 Silence iconv warnings on Leopard
Apple ships a newer version of iconv with Leopard (Mac OS X 10.5/Darwin
9). Ensure that OLD_ICONV is not set on any version of Darwin in the
9.x series; this should be good for at least a couple of years, when
Darwin 10 comes out and we can invert the sense of the test to
specifically check for Darwin 7 or 8.

A more sophisticated and robust check is possible for those who use
autoconf, but not everybody does that.

Signed-off-by: Wincent Colaiuta <win@wincent.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2007-12-06 23:22:25 -08:00
Junio C Hamano cf1b7869f0 Use gitattributes to define per-path whitespace rule
The `core.whitespace` configuration variable allows you to define what
`diff` and `apply` should consider whitespace errors for all paths in
the project (See gitlink:git-config[1]).  This attribute gives you finer
control per path.

For example, if you have these in the .gitattributes:

    frotz   whitespace
    nitfol  -whitespace
    xyzzy   whitespace=-trailing

all types of whitespace problems known to git are noticed in path 'frotz'
(i.e. diff shows them in diff.whitespace color, and apply warns about
them), no whitespace problem is noticed in path 'nitfol', and the
default types of whitespace problems except "trailing whitespace" are
noticed for path 'xyzzy'.  A project with mixed Python and C might want
to have:

    *.c    whitespace
    *.py   whitespace=-indent-with-non-tab

in its toplevel .gitattributes file.

Signed-off-by: Junio C Hamano <gitster@pobox.com>
2007-12-06 00:45:30 -08:00
Pascal Obry 7a4a2e1f79 Set OLD_ICONV on Cygwin.
Cygwin still has old definition for the iconv() second
parameter. This patch fixes the last warning on Cygwin.
This has been tested with Cygwin 1.5.24.

Signed-off-by: Pascal Obry <pascal@obry.net>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2007-12-04 22:03:42 -08:00
Junio C Hamano 31cbb5d961 Merge branch 'kh/commit'
* kh/commit: (33 commits)
  git-commit --allow-empty
  git-commit: Allow to amend a merge commit that does not change the tree
  quote_path: fix collapsing of relative paths
  Make git status usage say git status instead of git commit
  Fix --signoff in builtin-commit differently.
  git-commit: clean up die messages
  Do not generate full commit log message if it is not going to be used
  Remove git-status from list of scripts as it is builtin
  Fix off-by-one error when truncating the diff out of the commit message.
  builtin-commit.c: export GIT_INDEX_FILE for launch_editor as well.
  Add a few more tests for git-commit
  builtin-commit: Include the diff in the commit message when verbose.
  builtin-commit: fix partial-commit support
  Fix add_files_to_cache() to take pathspec, not user specified list of files
  Export three helper functions from ls-files
  builtin-commit: run commit-msg hook with correct message file
  builtin-commit: do not color status output shown in the message template
  file_exists(): dangling symlinks do exist
  Replace "runstatus" with "status" in the tests
  t7501-commit: Add test for git commit <file> with dirty index.
  ...
2007-12-04 17:16:33 -08:00
Robert Schiele 41650765de install-sh from automake does not like -m without delimiting space
The install-sh script as shipped with automake requires a space between
the -m switch and its argument.  Since this is also the regular way of
doing it with other install implementations this change inserts the
missing space in all makefiles.

Signed-off-by: Robert Schiele <rschiele@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2007-12-03 22:11:53 -08:00
Christian Couder 0f6f195b77 Documentation: add a new man page for "git-help"
Signed-off-by: Christian Couder <chriscool@tuxfamily.org>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2007-12-03 22:11:38 -08:00
Junio C Hamano de4c6011d2 Merge branch 'js/fast-export'
* js/fast-export:
  Add 'git fast-export', the sister of 'git fast-import'
2007-12-02 23:01:15 -08:00
Johannes Schindelin f2dc849e9c Add 'git fast-export', the sister of 'git fast-import'
This program dumps (parts of) a git repository in the format that
fast-import understands.

For clarity's sake, it does not use the 'inline' method of specifying
blobs in the commits, but builds the blobs before building the commits.

Since signed tags' signatures will not necessarily be valid (think
transformations after the export, or excluding revisions, changing
the history), there are 4 modes to handle them: abort (default),
ignore, warn and strip.  The latter just turns the tags into
unsigned ones.

Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2007-12-02 19:22:12 -08:00
Junio C Hamano 79d30668ab Consolidate command list to one.
The categorized list of commands in git(7) and the list of common
commands in "git help" output were maintained separately, which was
insane.  This consolidates them to a single command-list.txt file.

Signed-off-by: Junio C Hamano <gitster@pobox.com>
2007-12-01 23:48:28 -08:00
Junio C Hamano ca8c8c5686 Resurrect peek-remote
8951d7c1f1 (Build in ls-remote) made
peek-remote as a synonym to ls-remote by enhancing the latter, but
at the same time actually _removed_ it, before we officially gave
removal notice.  This was bad.

Resurrect it for v1.5.4.

Signed-off-by: Junio C Hamano <gitster@pobox.com>
2007-12-01 23:38:35 -08:00
Junio C Hamano d6e09883f2 Merge branch 'jc/move-gitk'
* jc/move-gitk:
  Move gitk to its own subdirectory
2007-12-01 13:58:57 -08:00
Junio C Hamano 65c6a4696a Merge branch 'maint'
* maint:
  Replace the word 'update-cache' by 'update-index' everywhere
  cvsimport: fix usage of cvsimport.module
  t7003-filter-branch: Fix test of a failing --msg-filter.
  cvsimport: miscellaneous packed-ref fixes
  cvsimport: use rev-parse to support packed refs
  Add basic cvsimport tests
2007-11-30 16:21:33 -08:00
Johannes Schindelin 10455d2a95 Replace the word 'update-cache' by 'update-index' everywhere
Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2007-11-30 15:09:40 -08:00
Shawn O. Pearce e475fe16a9 Remove git-status from list of scripts as it is builtin
Now that git-status is builtin on Cygwin this compiles as
git-status.exe.  We cannot continue to include git-status
as a Makefile target as it will never be built.

Signed-off-by: Shawn O. Pearce <spearce@spearce.org>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2007-11-27 20:22:33 -08:00
Junio C Hamano fd200790dc Merge branch 'jk/send-pack'
* jk/send-pack: (24 commits)
  send-pack: cluster ref status reporting
  send-pack: fix "everything up-to-date" message
  send-pack: tighten remote error reporting
  make "find_ref_by_name" a public function
  Fix warning about bitfield in struct ref
  send-pack: assign remote errors to each ref
  send-pack: check ref->status before updating tracking refs
  send-pack: track errors for each ref
  git-push: add documentation for the newly added --mirror mode
  Add tests for git push'es mirror mode
  Update the tracking references only if they were succesfully updated on remote
  Add a test checking if send-pack updated local tracking branches correctly
  git-push: plumb in --mirror mode
  Teach send-pack a mirror mode
  send-pack: segfault fix on forced push
  Reteach builtin-ls-remote to understand remotes
  send-pack: require --verbose to show update of tracking refs
  receive-pack: don't mention successful updates
  more terse push output
  Build in ls-remote
  ...
2007-11-24 16:45:37 -08:00
Junio C Hamano 6c6ea3800d Merge branch 'sb/clean'
* sb/clean:
  Teach git clean to use setup_standard_excludes()
  git-clean: Fix error message if clean.requireForce is not set.
  Make git-clean a builtin
2007-11-24 16:31:34 -08:00
Junio C Hamano ab002e34e2 Merge branch 'js/mingw-fallouts'
* js/mingw-fallouts:
  fetch-pack: Prepare for a side-band demultiplexer in a thread.
  rehabilitate some t5302 tests on 32-bit off_t machines
  Allow ETC_GITCONFIG to be a relative path.
  Introduce git_etc_gitconfig() that encapsulates access of ETC_GITCONFIG.
  Allow a relative builtin template directory.
  Close files opened by lock_file() before unlinking.
  builtin run_command: do not exit with -1.
  Move #include <sys/select.h> and <sys/ioctl.h> to git-compat-util.h.
  Use is_absolute_path() in sha1_file.c.
  Skip t3902-quoted.sh if the file system does not support funny names.
  t5302-pack-index: Skip tests of 64-bit offsets if necessary.
  t7501-commit.sh: Not all seds understand option -i
  t5300-pack-object.sh: Split the big verify-pack test into smaller parts.
2007-11-24 16:31:25 -08:00
Kristian Høgsberg f5bbc3225c Port git commit to C.
This makes git commit a builtin and moves git-commit.sh to
contrib/examples.  This also removes the git-runstatus
helper, which was mostly just a git-status.sh implementation detail.

Signed-off-by: Kristian Høgsberg <krh@redhat.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2007-11-22 17:05:02 -08:00
Thomas Harning a00a42ae33 git-merge-ours: make it a builtin.
Except that this fixes a longstanding corner case bug by
tightening the way underlying diff-index command is run, it is
functionally equivalent to the scripted version.

Signed-off-by: Thomas Harning Jr <harningt@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2007-11-22 14:21:59 -08:00
Shawn Bohrer 113f10f22f Make git-clean a builtin
This replaces git-clean.sh with builtin-clean.c, and moves
git-clean.sh to the examples.

This also introduces a change in behavior when removing directories
explicitly specified as a path.  For example currently:

1. When dir has only untracked files, these two behave differently:

    $ git clean -n dir
    $ git clean -n dir/

the former says "Would not remove dir/", while the latter would say
"Would remove dir/untracked" for all paths under it, but not the
directory itself.

With -d, the former would stop refusing, however since the user
explicitly asked to remove the directory the -d is no longer required.

2. When there are more parameters:

    $ git clean -n dir foo
    $ git clean -n dir/ foo

both cases refuse to remove dir/ unless -d is specified.  Once again
since both cases requested to remove dir the -d is no longer required.

Thanks to Johannes Schindelin for the conversion to using the
parse-options API.

Signed-off-by: Shawn Bohrer <shawn.bohrer@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2007-11-18 19:11:42 -08:00
Junio C Hamano 62ba5143ec Move gitk to its own subdirectory
This is to prepare for gitk i18n effort that makes gitk not a single file
project anymore.  We may use subproject to bind git.git and gitk.git more
loosely in the future, but we do not want to require everybody to have
subproject aware git to be able to pull from git.git yet.

Signed-off-by: Junio C Hamano <gitster@pobox.com>
2007-11-18 19:11:14 -08:00
Guido Ostkamp 4e0da76318 Use compat mkdtemp() on Solaris boxes
Define NO_MKDTEMP for all variants of SunOS; Solaris 10 does not
have mkdtemp() and all the other versions our Makefile knows
about don't have it either.

NO_{SETENV,UNSETENV,C99_FORMAT,STRTOUMAX} definitions cannot be
unified across versions.  Beginning with Solaris 10, the C-library
provides unsetenv(), setenv() and strtoumax().  Also 'z'/'t' formats
are supported.  However, older versions of Solaris do not support
these.


Signed-off-by: Guido Ostkamp <git@ostkamp.fastmail.fm>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2007-11-18 09:45:20 -08:00
Junio C Hamano b574c8d846 Merge branch 'ds/maint-deflatebound' into maint
* ds/maint-deflatebound:
  Improve accuracy of check for presence of deflateBound.
2007-11-16 21:14:17 -08:00
Johannes Sixt 506b17b136 Introduce git_etc_gitconfig() that encapsulates access of ETC_GITCONFIG.
In a subsequent patch the path to the system-wide config file will be
computed. This is a preparation for that change. It turns all accesses
of ETC_GITCONFIG into function calls. There is no change in behavior.

As a consequence, config.c is the only file that needs the definition of
ETC_GITCONFIG. Hence, -DETC_GITCONFIG is removed from the CFLAGS and a
special build rule for config.c is introduced. As a side-effect, changing
the defintion of ETC_GITCONFIG (e.g. in config.mak) does not trigger a
complete rebuild anymore.

Signed-off-by: Johannes Sixt <johannes.sixt@telecom.at>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2007-11-14 15:18:39 -08:00
Junio C Hamano fb5fd01148 Merge branch 'maint'
* maint:
  git-clean: honor core.excludesfile
  Documentation: Fix man page breakage with DocBook XSL v1.72
  git-remote.txt: fix typo
  core-tutorial.txt: Fix argument mistake in an example.
  replace reference to git-rm with git-reset in git-commit doc
  Grammar fixes for gitattributes documentation
  Don't allow fast-import tree delta chains to exceed maximum depth
  revert/cherry-pick: allow starting from dirty work tree.
  t/t3404: fix test for a bogus todo file.

Conflicts:

	fast-import.c
2007-11-14 03:37:18 -08:00
Junio C Hamano a108e53861 Merge branch 'db/remote-builtin' into jk/send-pack
* db/remote-builtin:
  Reteach builtin-ls-remote to understand remotes
  Build in ls-remote
  Use built-in send-pack.
  Build-in send-pack, with an API for other programs to call.
  Build-in peek-remote, using transport infrastructure.
  Miscellaneous const changes and utilities

Conflicts:

	transport.c
2007-11-14 03:09:52 -08:00
Alex Riesen 481424e1f1 Fix dependencies of parse-options test program
A stale test-parse-options can break t0040 otherwise.

Signed-off-by: Alex Riesen <raa.lkml@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2007-11-14 02:05:19 -08:00
Jonas Fonseca 7f55cf451c Documentation: Fix man page breakage with DocBook XSL v1.72
From version 1.72 it will replace all dots in roff requests with U+2302
("house" character), and add escaping in output for all instances of dot
that are not in roff requests. This caused the ".ft" hack forcing
monospace font in listingblocks to end up as "\&.ft" and being visible
in the resulting man page.

The fix adds a DOCBOOK_XSL_172 build variable that will disable the
hack. To allow this variable to be defined in config.mak it also moves
build variable handling below the inclusion of config.mak.

Signed-off-by: Jonas Fonseca <fonseca@diku.dk>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2007-11-14 02:01:54 -08:00
Junio C Hamano 3f7ce648fa Make check-docs target detect removed commands
The maintainer should remember running "make check-docs" from
time to time.

Signed-off-by: Junio C Hamano <gitster@pobox.com>
2007-11-09 01:57:50 -08:00
Junio C Hamano 5d4138a66d Merge branch 'maint'
* maint:
  Start preparing for 1.5.3.6
  git-send-email: Change the prompt for the subject of the initial message.
  SubmittingPatches: improve the 'Patch:' section of the checklist
  instaweb: Minor cleanups and fixes for potential problems
  stop t1400 hiding errors in tests
  Makefile: add missing dependency on wt-status.h
  refresh_index_quietly(): express "optional" nature of index writing better
  Fix sed string regex escaping in module_name.
  Avoid a few unportable, needlessly nested "...`...".
  git-mailsplit: with maildirs not only process cur/, but also new/

Signed-off-by: Junio C Hamano <gitster@pobox.com>
2007-11-09 00:21:44 -08:00
Junio C Hamano d349a03e74 Makefile: add missing dependency on wt-status.h
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2007-11-08 16:41:56 -08:00
Junio C Hamano 0380074315 Merge branch 'ds/maint-deflatebound'
* ds/maint-deflatebound:
  Improve accuracy of check for presence of deflateBound.
2007-11-07 18:17:20 -08:00
David Symonds 609a2289d7 Improve accuracy of check for presence of deflateBound.
ZLIB_VERNUM isn't defined in some zlib versions, so this patch does a proper
linking test in autoconf to see whether deflateBound exists in zlib. Also,
setting NO_DEFLATE_BOUND will also work for folk not using autoconf.

Signed-off-by: David Symonds <dsymonds@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2007-11-07 17:06:14 -08:00
Daniel Barkalow 8951d7c1f1 Build in ls-remote
This actually replaces peek-remote with ls-remote, since peek-remote
now handles everything. peek-remote remains an a second name for
ls-remote, although its help message now gives the "ls-remote" name.

Signed-off-by: Daniel Barkalow <barkalow@iabervon.org>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2007-11-05 12:25:42 -08:00
Johannes Schindelin 93fc05eb9e Split off the pretty print stuff into its own file
The file commit.c got quite large, but it does not have to be: the
code concerning pretty printing is pretty well contained.  In fact,
this commit just splits it off into pretty.c, leaving commit.c with
just 672 lines.

Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2007-11-05 11:52:14 -08:00
Daniel Barkalow 96249c04c0 Build-in send-pack, with an API for other programs to call.
Also marks some more things as const, as needed.

Signed-off-by: Daniel Barkalow <barkalow@iabervon.org>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2007-11-02 22:40:44 -07:00
Daniel Barkalow 18f7c51cf9 Build-in peek-remote, using transport infrastructure.
Signed-off-by: Daniel Barkalow <barkalow@iabervon.org>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2007-11-02 22:40:44 -07:00
Junio C Hamano 3d66dc9657 Merge branch 'ph/parseopt'
* ph/parseopt: (24 commits)
  gc: use parse_options
  Fixed a command line option type for builtin-fsck.c
  Make builtin-pack-refs.c use parse_options.
  Make builtin-name-rev.c use parse_options.
  Make builtin-count-objects.c use parse_options.
  Make builtin-fsck.c use parse_options.
  Update manpages to reflect new short and long option aliases
  Make builtin-for-each-ref.c use parse-opts.
  Make builtin-symbolic-ref.c use parse_options.
  Make builtin-update-ref.c use parse_options
  Make builtin-revert.c use parse_options.
  Make builtin-describe.c use parse_options
  Make builtin-branch.c use parse_options.
  Make builtin-mv.c use parse-options
  Make builtin-rm.c use parse_options.
  Port builtin-add.c to use the new option parser.
  parse-options: allow callbacks to take no arguments at all.
  parse-options: Allow abbreviated options when unambiguous
  Add shortcuts for very often used options.
  parse-options: make some arguments optional, add callbacks.
  ...

Conflicts:

	Makefile
	builtin-add.c
2007-11-02 16:42:23 -07:00
Junio C Hamano 7e9a4645d1 Merge branch 'lt/rename' into HEAD
* lt/rename:
  Do the fuzzy rename detection limits with the exact renames removed
  Fix ugly magic special case in exact rename detection
  Do exact rename detection regardless of rename limits
  Do linear-time/space rename logic for exact renames
  copy vs rename detection: avoid unnecessary O(n*m) loops
  Ref-count the filespecs used by diffcore
  Split out "exact content match" phase of rename detection
  Add 'diffcore.h' to LIB_H
2007-10-30 21:38:00 -07:00
Gerrit Pape fee9832a8d No longer install git-svnimport, move to contrib/examples
This has been proposed for a few times without much reaction
from the list.  Actually remove it to see who screams.

Signed-off-by: Gerrit Pape <pape@smarden.org>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2007-10-30 21:36:29 -07:00
Johannes Schindelin beb4743793 Add tests for parse-options.c
Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de>
Signed-off-by: Shawn O. Pearce <spearce@spearce.org>
2007-10-29 21:03:30 -07:00
Pierre Habouzit 4a59fd1312 Add a simple option parser.
The option parser takes argc, argv, an array of struct option
and a usage string.  Each of the struct option elements in the array
describes a valid option, its type and a pointer to the location where the
value is written.  The entry point is parse_options(), which scans through
the given argv, and matches each option there against the list of valid
options.  During the scan, argv is rewritten to only contain the
non-option command line arguments and the number of these is returned.

Aggregation of single switches is allowed:
  -rC0 is the same as -r -C 0 (supposing that -C wants an arg).

Every long option automatically support the option with the same name,
prefixed with 'no-' to unset the switch. It assumes that initial value for
strings are "NULL" and for integers is "0".

Long options are supported either with '=' or without:
  --some-option=foo is the same as --some-option foo

Acked-by: Kristian Høgsberg <krh@redhat.com>
Signed-off-by: Pierre Habouzit <madcoder@debian.org>
Signed-off-by: Shawn O. Pearce <spearce@spearce.org>
2007-10-29 21:03:30 -07:00
Linus Torvalds 9027f53cb5 Do linear-time/space rename logic for exact renames
This implements a smarter rename detector for exact renames, which
rather than doing a pairwise comparison (time O(m*n)) will just hash the
files into a hash-table (size O(n+m)), and only do pairwise comparisons
to renames that have the same hash (time O(n+m) except for unrealistic
hash collissions, which we just cull aggressively).

Admittedly the exact rename case is not nearly as interesting as the
generic case, but it's an important case none-the-less. A similar general
approach should work for the generic case too, but even then you do need
to handle the exact renames/copies separately (to avoid the inevitable
added cost factor that comes from the _size_ of the file), so this is
worth doing.

In the expectation that we will indeed do the same hashing trick for the
general rename case, this code uses a generic hash-table implementation
that can be used for other things too.  In fact, we might be able to
consolidate some of our existing hash tables with the new generic code
in hash.[ch].

Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2007-10-26 23:18:06 -07:00
Linus Torvalds 505f297989 Add 'diffcore.h' to LIB_H
The diffcore.h header file is included by more than just the internal
diff generation files, and needs to be part of the proper dependencies.

Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2007-10-26 23:18:05 -07:00
Junio C Hamano d633f702a0 Merge branch 'maint'
* maint:
  Fix generation of perl/perl.mak
  git-remote: fix "Use of uninitialized value in string ne"
2007-10-26 23:17:23 -07:00
Alex Riesen d1a2057560 Fix generation of perl/perl.mak
The code generating perl/Makefile from Makefile.PL was causing trouble
because it didn't considered NO_PERL_MAKEMAKER and ran makemaker
unconditionally, rewriting perl.mak. Makemaker is FUBAR in ActiveState Perl,
and perl/Makefile has a replacement for it.

Besides, a changed Git.pm is *NOT* a reason to rebuild all the perl scripts,
so remove the dependency too.

Signed-off-by: Alex Riesen <raa.lkml@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2007-10-26 16:44:45 -07:00
Junio C Hamano d90a7fda35 Merge branch 'db/fetch-pack'
* db/fetch-pack: (60 commits)
  Define compat version of mkdtemp for systems lacking it
  Avoid scary errors about tagged trees/blobs during git-fetch
  fetch: if not fetching from default remote, ignore default merge
  Support 'push --dry-run' for http transport
  Support 'push --dry-run' for rsync transport
  Fix 'push --all branch...' error handling
  Fix compilation when NO_CURL is defined
  Added a test for fetching remote tags when there is not tags.
  Fix a crash in ls-remote when refspec expands into nothing
  Remove duplicate ref matches in fetch
  Restore default verbosity for http fetches.
  fetch/push: readd rsync support
  Introduce remove_dir_recursively()
  bundle transport: fix an alloc_ref() call
  Allow abbreviations in the first refspec to be merged
  Prevent send-pack from segfaulting when a branch doesn't match
  Cleanup unnecessary break in remote.c
  Cleanup style nit of 'x == NULL' in remote.c
  Fix memory leaks when disconnecting transport instances
  Ensure builtin-fetch honors {fetch,transfer}.unpackLimit
  ...
2007-10-24 21:59:50 -07:00
Shawn O. Pearce ca5bb5d539 Define compat version of mkdtemp for systems lacking it
Solaris 9 doesn't have mkdtemp() so we need to emulate it for the
rsync transport implementation.  Since Solaris 9 is lacking this
function we can also reasonably assume it is not available on
Solaris 8 either.  The new Makfile definition NO_MKDTEMP can be
set to enable the git compat version.

Signed-off-by: Shawn O. Pearce <spearce@spearce.org>
2007-10-20 22:52:21 -04:00
Luke Lu ca5e949560 gitweb: speed up project listing on large work trees by limiting find depth
Signed-off-by: Luke Lu <git@vicaya.com>
Signed-off-by: Shawn O. Pearce <spearce@spearce.org>
2007-10-17 01:23:33 -04:00
Shawn O. Pearce 2e13e5d892 Merge branch 'master' into db/fetch-pack
There's a number of tricky conflicts between master and
this topic right now due to the rewrite of builtin-push.
Junio must have handled these via rerere; I'd rather not
deal with them again so I'm pre-merging master into the
topic.  Besides this topic somehow started to depend on
the strbuf series that was in next, but is now in master.
It no longer compiles on its own without the strbuf API.

* master: (184 commits)
  Whip post 1.5.3.4 maintenance series into shape.
  Minor usage update in setgitperms.perl
  manual: use 'URL' instead of 'url'.
  manual: add some markup.
  manual: Fix example finding commits referencing given content.
  Fix wording in push definition.
  Fix some typos, punctuation, missing words, minor markup.
  manual: Fix or remove em dashes.
  Add a --dry-run option to git-push.
  Add a --dry-run option to git-send-pack.
  Fix in-place editing functions in convert.c
  instaweb: support for Ruby's WEBrick server
  instaweb: allow for use of auto-generated scripts
  Add 'git-p4 commit' as an alias for 'git-p4 submit'
  hg-to-git speedup through selectable repack intervals
  git-svn: respect Subversion's [auth] section configuration values
  gtksourceview2 support for gitview
  fix contrib/hooks/post-receive-email hooks.recipients error message
  Support cvs via git-shell
  rebase -i: use diff plumbing instead of porcelain
  ...

Conflicts:

	Makefile
	builtin-push.c
	rsh.c
2007-10-16 00:15:25 -04:00
Shawn O. Pearce d55e7c3acf Merge branch 'maint'
* maint:
  Whip post 1.5.3.4 maintenance series into shape.
  rebase -i: use diff plumbing instead of porcelain
  Do not remove distributed configure script
  git-archive: document --exec
  git-reflog: document --verbose
  git-config: handle --file option with relative pathname properly
  clear_commit_marks(): avoid deep recursion
  git add -i: Remove unused variables
  git add -i: Fix parsing of abbreviated hunk headers
  git-config: don't silently ignore options after --list
  Clean up "git log" format with DIFF_FORMAT_NO_OUTPUT
  Fix embarrassing "git log --follow" bug

Conflicts:

	RelNotes
	git-rebase--interactive.sh
2007-10-15 22:31:47 -04:00
Johannes Schindelin ccfc02a300 Fix compilation when NO_CURL is defined
There were a few places which did not cope well without curl.  This
fixes all of them.  We still need to link against the walker.o part
of the library as some parts of transport.o still call into there
even though we don't have HTTP support enabled.

If compiled with NO_CURL=1 we now get the following useful error
message:

  $ git-fetch http://www.example.com/git
  error: git was compiled without libcurl support.
  fatal: Don't know how to fetch from http://www.example.com/git

Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de>
Signed-off-by: Shawn O. Pearce <spearce@spearce.org>
2007-10-15 21:59:40 -04:00
Mathias Megyei 922aa807f5 Do not remove distributed configure script
Before this patch the clean target has removed the
configure script that comes with Git tar file.
That made compiling Git for different architectures
inconvenient.
This patch excludes configure from the files to be
deleted by 'make clean' and adds new target 'distclean'
to preserve old functionality.

Signed-off-by: Mathias Megyei <mathias@mnet-mail.de>
Signed-off-by: Lars Hjemli <hjemli@gmail.com>
Signed-off-by: Shawn O. Pearce <spearce@spearce.org>
2007-10-15 21:12:06 -04:00
Kristof Provost a2a9150bf0 makefile: Add a cscope target
The current makefile supports ctags but not cscope. Some people prefer
cscope (I do), so this patch adds a cscope target.

I've also added cscope* to the .gitignore file. For some reason tags
and TAGS weren't in there either so I've added them too.

Signed-off-by: Kristof Provost <Kristof@provost-engineering.be>
Signed-off-by: Lars Hjemli <hjemli@gmail.com>
Signed-off-by: Shawn O. Pearce <spearce@spearce.org>
2007-10-15 21:09:15 -04:00
Matt Kraai 2ecb5ea2ad Move convert-objects to contrib.
convert-objects was needed to convert from an old-style repository,
which hashed the compressed contents and used a different date format.
Such repositories are presumably no longer common and, if such
conversions are necessary, should be done by writing a frontend for
git-fast-import.

Linus, the original author, is OK with moving it to contrib.

Signed-off-by: Matt Kraai <kraai@ftbfs.org>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2007-09-25 17:34:12 -07:00
Junio C Hamano 41ef95aea7 Merge branch 'maint'
* maint:
  Do not over-quote the -f envelopesender value.
  unexpected Make output (e.g. from --debug) causes build failure
  Fixed minor typo in t/t9001-send-email.sh test command line.
2007-09-25 00:30:33 -07:00
Jim Meyering e883932f7d unexpected Make output (e.g. from --debug) causes build failure
Without this, the extra output produced e.g., by "make --debug"
would go into $INSTLIBDIR and then cause the sed command to fail.

Signed-off-by: Jim Meyering <jim@meyering.net>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2007-09-25 00:30:16 -07:00
Shawn O. Pearce be6042cfa5 Add transport.h to LIB_H as transport.o is in LIB_OBJS
Any changes to transport.h probably will require rebuilding a
number of object files so we should make sure it is included
in our set of headers.

Signed-off-by: Shawn O. Pearce <spearce@spearce.org>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2007-09-19 03:22:31 -07:00
Daniel Barkalow b888d61c83 Make fetch a builtin
Thanks to Johannes Schindelin for review and fixes, and Julian
Phillips for the original C translation.

This changes a few small bits of behavior:

branch.<name>.merge is parsed as if it were the lhs of a fetch
refspec, and does not have to exactly match the actual lhs of a
refspec, so long as it is a valid abbreviation for the same ref.

branch.<name>.merge is no longer ignored if the remote is configured
with a branches/* file. Neither behavior is useful, because there can
only be one ref that gets fetched, but this is more consistant.

Also, fetch prints different information to standard out.

Signed-off-by: Daniel Barkalow <barkalow@iabervon.org>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2007-09-19 03:22:30 -07:00
Johannes Schindelin 30415d50cc Move bundle specific stuff into bundle.[ch]
The transport specific stuff was moved into libgit.a, and the
bundle specific stuff will not be left behind.

This is a big code move, with one exception: the function
unbundle() no longer outputs the list of refs.  You have to call
list_bundle_refs() yourself for that.

Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2007-09-19 03:22:30 -07:00
Daniel Barkalow 9b288516ee Push code for transport library
This moves the code to call push backends into a library that can be
extended to make matching fetch and push decisions based on the URL it
gets, and which could be changed to have built-in implementations
instead of calling external programs.

Signed-off-by: Daniel Barkalow <barkalow@iabervon.org>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2007-09-19 03:22:30 -07:00
Daniel Barkalow 2d4177c01c Make fetch-pack a builtin with an internal API
Signed-off-by: Daniel Barkalow <barkalow@iabervon.org>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2007-09-19 03:22:30 -07:00