Commit Graph

8350 Commits

Author SHA1 Message Date
Johannes Sixt
f002a73f04 Implement a usable gettimeofday().
For simplicity, my_mktime() of date.c is reused to avoid the convolutions
that gmtime() and localtime() would implicate.
2007-01-29 13:41:10 +01:00
Johannes Sixt
367d1ce33c Merge with for-junio. 2007-01-26 14:41:50 +01:00
Johannes Sixt
8c8bb94f94 gitk: Use peek-remote instead of ls-remote.
git --git-dir is certainly always local, so there is no need to ask for
the advanced services of ls-remote.
2007-01-26 14:41:01 +01:00
Johannes Sixt
273855b70f spawnvppe_pipe(): Don't die on error, some callers want to handle it. 2007-01-25 14:56:02 +01:00
Johannes Sixt
93f6197dcc Merge with git://repo.or.cz/git.git#next. 2007-01-25 11:50:13 +01:00
Johannes Sixt
62404b843d README.MinGW: push works now locally and via ssh! 2007-01-25 11:31:31 +01:00
Johannes Sixt
479be60605 Use spawn*_pipe() instead of fork()/exec() in run_command_*(). 2007-01-25 11:12:37 +01:00
Johannes Sixt
daabe66f18 MinGW: Change the name of hook scripts to make them not executable by default.
Since on Windows there is no 'executable' bit whose absence would deny
execution of a script, we must change the hook scripts' names entirely
to inhibit that they can be invoked by the tools.
2007-01-25 09:17:06 +01:00
Junio C Hamano
a4cc3e5d97 Merge branch 'jc/fetch-auto-keep' into next
* jc/fetch-auto-keep:
  Consolidate {receive,fetch}.unpackLimit
  fetch-pack: remove --keep-auto and make it the default.
  Allow fetch-pack to decide keeping the fetched pack without exploding
  Refactor the pack header reading function out of receive-pack.c
  Allow default core.logallrefupdates to be overridden with template's config
  ls-remote and clone: accept --upload-pack=<path> as well.
  rename --exec to --upload-pack for fetch-pack and peek-remote
  Documentation: --amend cannot be combined with -c/-C/-F.
  Documentation/config.txt: Correct info about subsection name
  git-daemon documentation on enabling services.
  reflog inspection: introduce shortcut "-g"
  annotate: use pager
  t/t1300-repo-config.sh: value continued on next line
  git-checkout -m: fix merge case
2007-01-24 18:08:12 -08:00
Junio C Hamano
e28714c527 Consolidate {receive,fetch}.unpackLimit
This allows transfer.unpackLimit to specify what these two
configuration variables want to set.

We would probably want to deprecate the two separate variables,
as I do not see much point in specifying them independently.

Signed-off-by: Junio C Hamano <junkio@cox.net>
2007-01-24 18:08:02 -08:00
Junio C Hamano
af7cf268f0 fetch-pack: remove --keep-auto and make it the default.
This makes git-fetch over git native protocol to automatically
decide to keep the downloaded pack if the fetch results in more
than 100 objects, just like receive-pack invoked by git-push
does.  This logic is disabled when --keep is explicitly given
from the command line, so that a very small clone still keeps
the downloaded pack as before.

The 100 threshold can be adjusted with fetch.unpacklimit
configuration.  We might want to introduce transfer.unpacklimit
to consolidate the two unpacklimit variables, which will be a
topic for the next patch.

Signed-off-by: Junio C Hamano <junkio@cox.net>
2007-01-24 18:08:02 -08:00
Junio C Hamano
9e10fd1ac0 Allow fetch-pack to decide keeping the fetched pack without exploding
With --keep-auto option, fetch-pack decides to keep the pack
without exploding it just like receive-pack does.

We may want to later make this the default.

Signed-off-by: Junio C Hamano <junkio@cox.net>
2007-01-24 18:08:02 -08:00
Junio C Hamano
a69e542989 Refactor the pack header reading function out of receive-pack.c
Signed-off-by: Junio C Hamano <junkio@cox.net>
2007-01-24 18:08:02 -08:00
Alex Riesen
196055c2db Allow default core.logallrefupdates to be overridden with template's config
Signed-off-by: Alex Riesen <raa.lkml@gmail.com>
Signed-off-by: Junio C Hamano <junkio@cox.net>
2007-01-24 17:33:25 -08:00
Junio C Hamano
ae1dffcb28 ls-remote and clone: accept --upload-pack=<path> as well.
This makes them consistent with other commands that take the
path to the upload-pack program.  We also pass --upload-pack
instead of --exec to the underlying fetch-pack, although it is
not strictly necessary.

[jc: original motivation from Uwe]

Signed-off-by: Junio C Hamano <junkio@cox.net>
2007-01-24 16:12:15 -08:00
Uwe Kleine-König
27dca07fb7 rename --exec to --upload-pack for fetch-pack and peek-remote
Just some option name disambiguation.  This is the counter part to
commit d23842fd which made a similar change for push and send-pack.

--exec continues to work.

Signed-off-by: Uwe Kleine-König <ukleinek@informatik.uni-freiburg.de>
Signed-off-by: Junio C Hamano <junkio@cox.net>
2007-01-24 16:12:15 -08:00
Peter Eriksen
497171e765 Documentation: --amend cannot be combined with -c/-C/-F.
We used to get the following confusing error message:

    $ git commit --amend -a -m foo
    Option -m cannot be combined with -c/-C/-F

This is because --amend cannot be combined with -c/-C/-F, which makes
sense, because they try to handle the same log message in different ways.
So update the documentation to reflect this.

Signed-off-by: Peter Eriksen <s022018@student.dtu.dk>
Signed-off-by: Junio C Hamano <junkio@cox.net>
2007-01-24 15:32:52 -08:00
Jakub Narebski
191453f664 Documentation/config.txt: Correct info about subsection name
Contrary to variable values, in subsection names parsing character
escape codes (besides literal escaping of " as \", and \ as \\)
is not performed; subsection name cannot contain newlines.

Signed-off-by: Jakub Narebski <jnareb@gmail.com>
Signed-off-by: Junio C Hamano <junkio@cox.net>
2007-01-24 15:30:37 -08:00
Junio C Hamano
eda95d9969 git-daemon documentation on enabling services.
Noticed by Franck Bui-Huu.

Signed-off-by: Junio C Hamano <junkio@cox.net>
2007-01-24 15:29:07 -08:00
Johannes Schindelin
084ae0a7bd reflog inspection: introduce shortcut "-g"
A short-hand "-g" for "git log --walk-reflogs" and "git
show-branch --reflog" makes it easier to access the reflog
info.

[jc: added -g to show-branch for symmetry]

Signed-off-by: Johannes Schindelin <Johannes.Schindelin@gmx.de>
Signed-off-by: Junio C Hamano <junkio@cox.net>
2007-01-24 15:13:47 -08:00
Johannes Schindelin
e955ae957c annotate: use pager
Signed-off-by: Johannes Schindelin <Johannes.Schindelin@gmx.de>
Signed-off-by: Junio C Hamano <junkio@cox.net>
2007-01-24 15:08:31 -08:00
Johannes Sixt
10c1047e09 Fix path_lookup() when the program to invoke contains a slash.
In this case, no path lookup actually takes place, and the returned
program name is equal to the passed in program name. But this code
path contained a thinko that crashed.
2007-01-24 18:48:59 +01:00
Johannes Sixt
2033ba137a Use spawn*_pipe() instead of fork()/exec() in send-pack and receive-pack. 2007-01-24 17:06:21 +01:00
Johannes Sixt
fbb1c508a2 Merge with for-junio. 2007-01-24 16:04:11 +01:00
Johannes Sixt
46580d2192 Add a missing fork() error check. 2007-01-24 16:03:42 +01:00
Johannes Sixt
8c5c2ae8fc Update the status part of README.MinGW.
pull, fetch, clone work to a large extent. Hurray!
2007-01-24 13:13:14 +01:00
Johannes Sixt
c0de283360 Merge with for-junio 2007-01-24 10:46:33 +01:00
Johannes Sixt
18bf4a4bea Cpio emulator: do not copy files repeatedly in pass-through mode.
Files were stored each time when they were mentioned in the file list
as well as for each of its directories and parent directories.
Now we filter out directory names because they are implied for the files
that they contain, but we do list empty directories.

The only case where this is relevant is the pass-through mode that
git clone of a local directory uses.
2007-01-24 10:46:24 +01:00
Johannes Sixt
4feaf032d3 Do not complain if no committer identifier can be written to the reflog.
git clone leaves a half-baked clone without the HEAD ref and no working
tree, but with the full repository, if it cannot find the committer
information in the GECOS field. For a first-time user this may be
puzzling since git clone may be the very first git command to be tried.

The reflog is entirely local information, and the warning about the
missing information is printed anyway, so there is a hint for the user
how to fill it in.
2007-01-24 09:37:48 +01:00
Johannes Sixt
28b06b3aab Simplify the cpio look-alike.
We don't need to write the file list into a temporary file, because
GNU tar can take --files-from stdin in --create mode. Furthermore,
it understands --null, so that we don't need to translate the zero byte
termination to newlines (which incorrectly had been translated to space).
2007-01-24 09:08:11 +01:00
Jakub Narebski
83cd10a056 t/t1300-repo-config.sh: value continued on next line
Documentation/config.txt:
  Variable value ending in a '`\`' is continued on the next line in the
  customary UNIX fashion.

Test it.

Signed-off-by: Jakub Narebski <jnareb@gmail.com>
Signed-off-by: Junio C Hamano <junkio@cox.net>
2007-01-23 17:35:48 -08:00
Junio C Hamano
d7ebd53d37 git-checkout -m: fix merge case
Commit c1a4278e switched the "merging checkout" implementation
from 3-way read-tree to merge-recursive, but forgot that
merge-recursive will signal an unmerged state with its own exit
status code.  This prevented the clean-up phase (paths cleanly
merged should not be updated in the index) from running.

Signed-off-by: Junio C Hamano <junkio@cox.net>
2007-01-23 16:58:13 -08:00
Johannes Sixt
1a39364676 Merge with js/unlink. 2007-01-23 14:45:35 +01:00
Johannes Sixt
5835281874 Clean up another instance of unlink that was explicitly chmod(, 0666)ed. 2007-01-23 14:45:09 +01:00
Johannes Sixt
45c0d8773d Remove the unused strptime() stub.
strptime() is only used in convert-objects.c, but we do not build that one
(for reasons I do not recall anymore). That tool should be unnecessary
anyway.
2007-01-23 14:19:48 +01:00
Johannes Schindelin
e40c594146 mingw: always chmod(, 0666) before unlink()
On Windows, a read-only file cannot be deleted. To make sure that
deletion does not fail because of this, always call chmod() before
unlink().

Signed-off-by: Johannes Schindelin <Johannes.Schindelin@gmx.de>
2007-01-23 13:39:09 +01:00
Johannes Sixt
5bc08ee66f Strip \r from the input.
Sometimes CRLF ends up in FETCH_HEAD. As a consequence, the fetch source
'.' is not recognized as a special case.
2007-01-23 13:20:18 +01:00
Johannes Sixt
6397c3119e Expect absolute paths with a drive letter.
This allows the alternates database to refer to other object databases
via a DOS-like path with a drive letter.

Furthermore, update-ref sometimes operates on absolute paths.
2007-01-23 11:11:00 +01:00
Junio C Hamano
81688d70a9 Merge branch 'master' into next
* master:
  reflog gc: a tag that does not point at a commit is not a crime.
  contrib/vim: update syntax for changed commit template
  format-patch: fix bug with --stdout in a subdirectory
  [PATCH] honor --author even with --amend, -C, and -c.
  .mailmap: fix screw-ups in Uwe's name
  git-svn: remove leading slash when printing removed directories
  sha1_file.c: Avoid multiple calls to find_pack_entry().
  Documentation/config.txt: Document config file syntax better
  cvsimport: activate -a option, really.
  Cleanup uninitialized value in chomp
  Force Activestate Perl to tie git command pipe handle to a handle class
  Insert ACTIVESTATE_STRING in Git.pm
2007-01-22 22:51:12 -08:00
Junio C Hamano
c9a8992569 reflog gc: a tag that does not point at a commit is not a crime.
Although unusual, tags can point at any object.  Warning only
once is fine, but warning every time about the same tag gets
annoying.

Signed-off-by: Junio C Hamano <junkio@cox.net>
2007-01-22 21:39:03 -08:00
Jeff King
222664e74d contrib/vim: update syntax for changed commit template
Signed-off-by: Jeff King <peff@peff.net>
Signed-off-by: Junio C Hamano <junkio@cox.net>
2007-01-22 20:40:26 -08:00
Jeff King
90f70a910a format-patch: fix bug with --stdout in a subdirectory
We set the output directory to the git subdirectory prefix if one has
not already been specified. However, in the case of --stdout, we
explicitly _don't_ want the output directory to be set. The result was
that "git-format-patch --stdout" in a directory besides the project root
produced the "standard output, or directory, which one?" error message.

Signed-off-by: Jeff King <peff@peff.net>
Signed-off-by: Junio C Hamano <junkio@cox.net>
2007-01-22 19:46:19 -08:00
Junio C Hamano
83e24dce14 [PATCH] honor --author even with --amend, -C, and -c.
Earlier code discarded GIT_AUTHOR_DATE taken from the base
commit when --author was specified.  This was often wrong as
that use is likely to fix the spelling of author's name.

Signed-off-by: Junio C Hamano <junkio@cox.net>
2007-01-22 19:40:57 -08:00
Junio C Hamano
5e207b4bf8 .mailmap: fix screw-ups in Uwe's name
Signed-off-by: Junio C Hamano <junkio@cox.net>
2007-01-22 16:25:15 -08:00
Eric Wong
cea70cf881 git-svn: remove leading slash when printing removed directories
Not sure why it was there in the first place, we always do our
work relative to the URL we're connected to; even if that URL is
the root of the repository, so the leading slash is pointless...
Lets be consistent when printing things for the user to see.

Signed-off-by: Eric Wong <normalperson@yhbt.net>
Signed-off-by: Junio C Hamano <junkio@cox.net>
2007-01-22 13:15:50 -08:00
Peter Eriksen
8276c0070f sha1_file.c: Avoid multiple calls to find_pack_entry().
We used to call find_pack_entry() twice from read_sha1_file() in order
to avoid printing an error message, when the object did not exist.  This
is fixed by moving the call to error() to the only place it really
could be called.

Signed-off-by: Peter Eriksen <s022018@student.dtu.dk>
Signed-off-by: Junio C Hamano <junkio@cox.net>
2007-01-22 13:11:46 -08:00
Jakub Narebski
e136f33b5f Documentation/config.txt: Document config file syntax better
Separate part of Documentation/config.txt which deals with git config file
syntax into "Syntax" subsection, and expand it.  Add information about
subsections, boolean values, escaping and escape sequences in string
values, and continuing variable value on the next line.

Add also proxy settings to config file example to show example of
partially enclosed in double quotes string value.

Parts based on comments by Junio C Hamano, Johannes Schindelin,
config.c, and the smb.conf(5) man page.

Signed-off-by: Jakub Narebski <jnareb@gmail.com>
Signed-off-by: Junio C Hamano <junkio@cox.net>
2007-01-22 12:54:02 -08:00
Junio C Hamano
bf3f67ba71 cvsimport: activate -a option, really.
An earlier commit ded9f400 added $opt_a support to disable the
cvsps grace period mechanism, but forgot to tell the option
parser about it.

Signed-off-by: Junio C Hamano <junkio@cox.net>
2007-01-22 12:20:14 -08:00
Alex Riesen
67e4baf826 Cleanup uninitialized value in chomp
which happens if you use ActiveState Perl and a
pipe workaround specially for it.

Signed-off-by: Alex Riesen <raa.lkml@gmail.com>
Signed-off-by: Junio C Hamano <junkio@cox.net>
2007-01-22 09:44:26 -08:00
Alex Riesen
bed118d6bb Force Activestate Perl to tie git command pipe handle to a handle class
Otherwise it tries to tie it to a scalar and complains about missing
method. Dunno why, may be ActiveState brokenness again.

Signed-off-by: Alex Riesen <raa.lkml@gmail.com>
Acked-by: Petr Baudis <pasky@suse.cz>
Signed-off-by: Junio C Hamano <junkio@cox.net>
2007-01-22 09:44:26 -08:00