git.git
18 years ago[PATCH] Allow reading "symbolic refs" that point to other refs
Linus Torvalds [Sun, 25 Sep 2005 16:59:37 +0000 (09:59 -0700)]
[PATCH] Allow reading "symbolic refs" that point to other refs

This extends the ref reading to understand a "symbolic ref": a ref file
that starts with "ref: " and points to another ref file, and thus
introduces the notion of ref aliases.

This is in preparation of allowing HEAD to eventually not be a symlink,
but one of these symbolic refs instead.

[jc: Linus originally required the prefix to be "ref: " five bytes
 and nothing else, but I changed it to allow and strip any number of
 leading whitespaces to match what update-ref.c does.]

Signed-off-by: Linus Torvalds <torvalds@osdl.org>
Signed-off-by: Junio C Hamano <junkio@cox.net>
18 years agoTeach update-ref about a symbolic ref stored in a textfile.
Junio C Hamano [Mon, 26 Sep 2005 02:30:24 +0000 (19:30 -0700)]
Teach update-ref about a symbolic ref stored in a textfile.

A symbolic ref is a regular file whose contents is "ref:", followed by
optional leading whitespaces, followed by a GIT_DIR relative pathname,
followed by optional trailing whitespaces (the optional whitespaces
are unconditionally removed, so you cannot have leading nor trailing
whitespaces).  This can be used in place of a traditional symbolic
link .git/HEAD that usually points at "refs/heads/master".  You can
instead have a regular file .git/HEAD whose contents is
"ref: refs/heads/master".

[jc: currently the code does not enforce the symbolic ref to begin with
 refs/, unlike the symbolic link case.  It may be worthwhile to require
 either case to begin with refs/ and not have any /./ nor /../ in them.]

Signed-off-by: Junio C Hamano <junkio@cox.net>
18 years ago[PATCH] git fetch --tags
Linus Torvalds [Thu, 29 Sep 2005 21:35:15 +0000 (14:35 -0700)]
[PATCH] git fetch --tags

You can do

git fetch --tags <linus-kernel-repo>

and it should fetch all my tags automatically.

[jc: The original by Linus fetched and overwrote branch heads with
 --all, which felt dangerous and wrong, so I removed it.  Also this
 version does not use any refs that resulted as --tags for later
 merge. ]

Signed-off-by: Linus Torvalds <torvalds@osdl.org>
Signed-off-by: Junio C Hamano <junkio@cox.net>
18 years ago[PATCH] HTTP partial transfer support fix.
Nick Hengeveld [Fri, 30 Sep 2005 23:27:47 +0000 (16:27 -0700)]
[PATCH] HTTP partial transfer support fix.

Don't unlink the temp file when an object transfer fails, so next attempt
will pick up where the failed transfer left off

Signed-off-by: Nick Hengeveld <nickh@reactrix.com>
Signed-off-by: Junio C Hamano <junkio@cox.net>
18 years agoUpdate partial HTTP transfers.
Junio C Hamano [Fri, 30 Sep 2005 07:07:39 +0000 (00:07 -0700)]
Update partial HTTP transfers.

Add the sanity checks discussed on the list with Nick Hengeveld in
<20050927000931.GA15615@reactrix.com>.

 * unlink of previous and rename from temp to previous can fail for
   reasons other than benign ones (missing previous and missing temp).
   Report these failures when we encounter them, to make diagnosing
   problems easier.

 * when rewinding the partially written result, make sure to
   truncate the file.

Also verify the pack after downloading by calling
verify_packfile().

Signed-off-by: Junio C Hamano <junkio@cox.net>
18 years ago[PATCH] HTTP partial transfer support for object, pack, and index transfers
Nick Hengeveld [Wed, 28 Sep 2005 17:14:04 +0000 (10:14 -0700)]
[PATCH] HTTP partial transfer support for object, pack, and index transfers

HTTP partial transfer support for object, pack, and index transfers

[jc: this should not be placed in "master" -- it does not have any
 fixes requested on the list.]

Signed-off-by: Nick Hengeveld <nickh@reactrix.com>
Signed-off-by: Junio C Hamano <junkio@cox.net>
18 years agoPass CVSps generated A U Thor <author@domain.xz> intact.
Junio C Hamano [Fri, 30 Sep 2005 08:48:57 +0000 (01:48 -0700)]
Pass CVSps generated A U Thor <author@domain.xz> intact.

Alexey Nezhdanov updated CVSps to generate author-name and
author-email information in its output.

If the input looks like it has that already properly formatted,
use that without our own munging.

Signed-off-by: Junio C Hamano <junkio@cox.net>
18 years ago[PATCH] archimport: Actually cope with merges from "remote" repositories. Plus: Nicer...
Martin Langhoff [Fri, 30 Sep 2005 07:15:12 +0000 (19:15 +1200)]
[PATCH] archimport: Actually cope with merges from "remote" repositories. Plus: Nicer messages.

archimport was refusing to import commits that had merges from repositories
that it didn't know about. Fixed.

Also brings in nicer messages.

Signed-off-by: Martin Langhoff <martin@catalyst.net.nz>
Signed-off-by: Junio C Hamano <junkio@cox.net>
18 years agoHonor extractor's umask in git-tar-tree.
Junio C Hamano [Sat, 1 Oct 2005 19:01:07 +0000 (12:01 -0700)]
Honor extractor's umask in git-tar-tree.

The archive generated with git-tar-tree had 0755 and 0644 mode bits.
This inconvenienced the extractor with umask 002 by robbing g+w bit
unconditionally.  Just write it out with loose permissions bits and
let the umask of the extractor do its job.

Signed-off-by: Junio C Hamano <junkio@cox.net>
18 years agoHonor user's umask.
Junio C Hamano [Sat, 1 Oct 2005 18:58:43 +0000 (11:58 -0700)]
Honor user's umask.

Fix the last two holdouts that forced mode bits stricter than the user's umask.
Noticed by Wolfgang Denk and fixed by Linus.

[jc: applied the same fix to mailsplit just for the sake of consistency.]

Signed-off-by: Junio C Hamano <junkio@cox.net>
18 years ago[PATCH] Flag empty patches as errors
Linus Torvalds [Sat, 1 Oct 2005 06:25:23 +0000 (23:25 -0700)]
[PATCH] Flag empty patches as errors

A patch that contains no actual diff, and that doesn't change any
meta-data is bad. It shouldn't be a patch at all, and git-apply shouldn't
just accept it.

This caused a corrupted patch to be silently applied as an empty change in
the kernel, because the corruption ended up making the patch look empty.

An example of such a patch is one that contains the patch header, but
where the initial fragment header (the "@@ -nr,.." line) is missing,
causing us to not parse any fragments.

The real "patch" program will also flag such patches as bad, with the
message

patch: **** Only garbage was found in the patch input.

and we should do likewise.

Signed-off-by: Linus Torvalds <torvalds@osdl.org>
Signed-off-by: Junio C Hamano <junkio@cox.net>
18 years agoConsolidate null_sha1[].
Junio C Hamano [Fri, 30 Sep 2005 21:02:47 +0000 (14:02 -0700)]
Consolidate null_sha1[].

Signed-off-by: Junio C Hamano <junio@twinsun.com>
18 years agoBetter handling of exec extension in the git wrapper script
H. Peter Anvin [Fri, 30 Sep 2005 18:02:26 +0000 (11:02 -0700)]
Better handling of exec extension in the git wrapper script

18 years agoMove signal setting into service_loop()
H. Peter Anvin [Fri, 30 Sep 2005 18:01:57 +0000 (11:01 -0700)]
Move signal setting into service_loop()

18 years agosocklen_t is unsigned int on most Linux platforms
H. Peter Anvin [Fri, 30 Sep 2005 17:48:21 +0000 (10:48 -0700)]
socklen_t is unsigned int on most Linux platforms

18 years agoUse xmalloc/xcalloc
H. Peter Anvin [Fri, 30 Sep 2005 17:47:50 +0000 (10:47 -0700)]
Use xmalloc/xcalloc

18 years agoDon't need <alloca.h>
H. Peter Anvin [Fri, 30 Sep 2005 17:46:42 +0000 (10:46 -0700)]
Don't need <alloca.h>

18 years agoChange $(X) -> $X to be less annoying.
H. Peter Anvin [Fri, 30 Sep 2005 17:46:25 +0000 (10:46 -0700)]
Change $(X) -> $X to be less annoying.

18 years agoMerge with master.kernel.org:/pub/scm/git/git.git
H. Peter Anvin [Fri, 30 Sep 2005 17:44:21 +0000 (10:44 -0700)]
Merge with master.kernel.org:/pub/scm/git/git.git

18 years agoStill installing the old command names.
Junio C Hamano [Fri, 30 Sep 2005 07:27:11 +0000 (00:27 -0700)]
Still installing the old command names.

After seeing Jeff's guide, I changed my mind about the
big-rename transition plan.  Even if Porcelains are kept up to
date, those web documents that describes older world order would
live longer and people will stumble across them via google
searches.  And who knows how many mirrored copies there are.

The backward compatible symbolic links *will* be removed before
1.0.  But that will not happen in 0.99.8.

Signed-off-by: Junio C Hamano <junkio@cox.net>
18 years agoTell which packfile is corrupt when we die.
Junio C Hamano [Fri, 30 Sep 2005 07:09:04 +0000 (00:09 -0700)]
Tell which packfile is corrupt when we die.

The core part detected and died upon seeing a corrupted packfile, but
did not help the user by telling which packfile is corrupt and how.

Signed-off-by: Junio C Hamano <junkio@cox.net>
18 years ago[PATCH] Make logerror() and loginfo() static
Pavel Roskin [Thu, 29 Sep 2005 20:53:14 +0000 (16:53 -0400)]
[PATCH] Make logerror() and loginfo() static

Make logerror() and loginfo() static

logerror() and loginfo() in daemon.c are never declared and never called
from other files, therefore they should be declared static.  Found by
sparse.

Signed-off-by: Pavel Roskin <proski@gnu.org>
Signed-off-by: Junio C Hamano <junkio@cox.net>
18 years ago[PATCH] Old curl does not know about CURLOPT_SSLKEY
Johannes Schindelin [Thu, 29 Sep 2005 16:19:50 +0000 (18:19 +0200)]
[PATCH] Old curl does not know about CURLOPT_SSLKEY

... so try to set it only in later versions.

Signed-off-by: Johannes Schindelin <Johannes.Schindelin@gmx.de>
Signed-off-by: Junio C Hamano <junkio@cox.net>
18 years agoMerge with master.kernel.org:/pub/scm/git/git.git
Peter Anvin [Thu, 29 Sep 2005 21:41:47 +0000 (14:41 -0700)]
Merge with master.kernel.org:/pub/scm/git/git.git

18 years agogit-http-fetch needs $(X)
hpa [Thu, 29 Sep 2005 17:38:26 +0000 (10:38 -0700)]
git-http-fetch needs $(X)

18 years agoUse git-merge in git-pull (second try).
Junio C Hamano [Mon, 26 Sep 2005 02:43:51 +0000 (19:43 -0700)]
Use git-merge in git-pull (second try).

This again makes git-pull to use git-merge, so that different merge
strategy can be specified from the command line.  Without explicit
strategy parameter, it defaults to git-merge-resolve if only one
remote is pulled, and git-merge-octopus otherwise, to keep the
default behaviour of the command the same as the original.

Also this brings another usability measure: -n flag from the command
line, if given, is passed to git-merge to prevent it from running the
diffstat at the end of the merge.

Signed-off-by: Junio C Hamano <junkio@cox.net>
18 years agoJust explicitly add $(X) to most programs.
H. Peter Anvin [Thu, 29 Sep 2005 06:31:18 +0000 (23:31 -0700)]
Just explicitly add $(X) to most programs.

18 years agoIgnore *.exe files
Peter Anvin [Thu, 29 Sep 2005 06:22:02 +0000 (23:22 -0700)]
Ignore *.exe files

18 years agoMerge with http://www.kernel.org/pub/scm/git/git.git
Peter Anvin [Thu, 29 Sep 2005 06:20:08 +0000 (23:20 -0700)]
Merge ... www.kernel.org/pub/scm/git/git.git

18 years agoHandle Cygwin .exe extensions
Peter Anvin [Thu, 29 Sep 2005 02:08:37 +0000 (19:08 -0700)]
Handle Cygwin .exe extensions

18 years agoRemove variables not needed when using poll
Peter Anvin [Thu, 29 Sep 2005 01:01:55 +0000 (18:01 -0700)]
Remove variables not needed when using poll

18 years agoRemove *.exe for Cygwin's benefit
Peter Anvin [Thu, 29 Sep 2005 01:00:24 +0000 (18:00 -0700)]
Remove *.exe for Cygwin's benefit

18 years agoNO_IPV6 support for git daemon
Peter Anvin [Thu, 29 Sep 2005 00:26:44 +0000 (17:26 -0700)]
NO_IPV6 support for git daemon

18 years agoFor the benefit of Cygwin, test for git-cmd.exe
Peter Anvin [Wed, 28 Sep 2005 23:56:08 +0000 (16:56 -0700)]
For the benefit of Cygwin, test for git-cmd.exe

18 years ago(no commit message)
Peter Anvin [Wed, 28 Sep 2005 23:53:56 +0000 (16:53 -0700)]

18 years agoCall it NO_IPV6 rather than hard-coding __CYGWIN__
hpa [Wed, 28 Sep 2005 23:52:21 +0000 (16:52 -0700)]
Call it NO_IPV6 rather than hard-coding __CYGWIN__

18 years agoUse git-update-ref in scripts.
Junio C Hamano [Wed, 28 Sep 2005 01:14:27 +0000 (18:14 -0700)]
Use git-update-ref in scripts.

This uses the git-update-ref command in scripts for safer updates.
Also places where we used to read HEAD ref by using "cat" were fixed
to use git-rev-parse.  This will matter when we start using symbolic
references.

Signed-off-by: Junio C Hamano <junkio@cox.net>
18 years ago[PATCH] Make some needlessly global stuff static
Peter Hagervall [Wed, 28 Sep 2005 12:04:54 +0000 (14:04 +0200)]
[PATCH] Make some needlessly global stuff static

Insert 'static' where appropriate.

Signed-off-by: Peter Hagervall <hager@cs.umu.se>
Signed-off-by: Junio C Hamano <junkio@cox.net>
18 years ago[PATCH] Support for more CURL SSL settings via environment variables
Nick Hengeveld [Tue, 27 Sep 2005 17:45:27 +0000 (10:45 -0700)]
[PATCH] Support for more CURL SSL settings via environment variables

Added support for additional CURL SSL settings via environment variables.
Client certificate/key files can be specified as well as alternate CA
information.

Signed-off-by: Nick Hengeveld <nickh@reactrix.com>
Signed-off-by: Junio C Hamano <junkio@cox.net>
18 years ago[PATCH] Add new programs to .gitignore.
Tom Prince [Tue, 27 Sep 2005 07:06:05 +0000 (01:06 -0600)]
[PATCH] Add new programs to .gitignore.

Signed-off-by: Tom Prince <tom.prince@ualberta.net>
Signed-off-by: Junio C Hamano <junkio@cox.net>
18 years agoCygwin doesn't support IPv6 or getaddrinfo()
hpa [Wed, 28 Sep 2005 23:37:58 +0000 (16:37 -0700)]
Cygwin doesn't support IPv6 or getaddrinfo()

18 years agoOptions to compile on Cygwin
hpa [Wed, 28 Sep 2005 23:37:37 +0000 (16:37 -0700)]
Options to compile on Cygwin

18 years agoFastpath the normal case by not checking that index matches HEAD.
Junio C Hamano [Wed, 28 Sep 2005 23:29:11 +0000 (16:29 -0700)]
Fastpath the normal case by not checking that index matches HEAD.

The merge strategy would check this itself and typically does it
by using git-read-tree -m -u 3-way merge.

Signed-off-by: Junio C Hamano <junkio@cox.net>
18 years agoFix default pull not to do an unintended Octopus.
Junio C Hamano [Mon, 26 Sep 2005 05:54:23 +0000 (22:54 -0700)]
Fix default pull not to do an unintended Octopus.

The refspecs specified in the .git/remotes/<remote> on the "Pull: "
lines are for fetching multiple heads in one go, but most of the time
making an Octopus out of them is not what is wanted.  Make git-fetch
leave the marker in .git/FETCH_HEAD file so that later stages can
tell which heads are for merging and which are not.

Tom Prince made me realize how stupid the original behaviour was.

Signed-off-by: Junio C Hamano <junkio@cox.net>
18 years agoUpdate the case table in t/t1000.
Junio C Hamano [Wed, 28 Sep 2005 19:56:18 +0000 (12:56 -0700)]
Update the case table in t/t1000.

It still talked about "the proposed alternative semantics" but we have
used those alternative semantics for quite some time.  Update them to
avoid confusion.

Signed-off-by: Junio C Hamano <junkio@cox.net>
18 years agoMerge master.kernel.org:/home/hpa/git/daemon
Junio C Hamano [Wed, 28 Sep 2005 00:05:41 +0000 (17:05 -0700)]
Merge master.kernel.org:/home/hpa/git/daemon

18 years agogit-commit: use update-index --stdin, instead of xargs.
Junio C Hamano [Tue, 27 Sep 2005 01:13:53 +0000 (18:13 -0700)]
git-commit: use update-index --stdin, instead of xargs.

Now update-index supports '-z --stdin', we do not have to rely on
platform xargs to support -0 option.

Signed-off-by: Junio C Hamano <junkio@cox.net>
18 years agoupdate-index: document --stdin and -z
Junio C Hamano [Tue, 27 Sep 2005 01:13:32 +0000 (18:13 -0700)]
update-index: document --stdin and -z

Signed-off-by: Junio C Hamano <junkio@cox.net>
18 years agoupdate-index: --stdin and -z
Junio C Hamano [Tue, 27 Sep 2005 01:13:08 +0000 (18:13 -0700)]
update-index: --stdin and -z

The new option --stdin reads list of paths to be updated from the
standard input.  As usual, -z means the paths are terminated with NUL
characters, as opposed to LF without that option.

This is useful to use git-diff-files -z and git-ls-files -z when the
platform xargs does not support -0 option, and obviously saves one
process even when xargs can take -0.

Signed-off-by: Junio C Hamano <junkio@cox.net>
18 years agoCOPTS -> CFLAGS
H. Peter Anvin [Tue, 27 Sep 2005 16:02:24 +0000 (09:02 -0700)]
COPTS -> CFLAGS

18 years agoParallelize the build
H. Peter Anvin [Tue, 27 Sep 2005 16:01:08 +0000 (09:01 -0700)]
Parallelize the build

18 years agoMerge with git+ssh://master.kernel.org/pub/scm/git/git.git
H. Peter Anvin [Tue, 27 Sep 2005 15:50:08 +0000 (08:50 -0700)]
Merge ... git+ssh://kernel.org/pub/scm/git/git.git

18 years agoRestore chdir(".git")
H. Peter Anvin [Tue, 27 Sep 2005 15:49:40 +0000 (08:49 -0700)]
Restore chdir(".git")

18 years ago[PATCH] Return CURL error message when object transfer fails
Nick Hengeveld [Mon, 26 Sep 2005 17:52:11 +0000 (10:52 -0700)]
[PATCH] Return CURL error message when object transfer fails

Return CURL error message when object transfer fails

[jc: added similar curl_errorstr errors to places where we
 use curl_easy_perform() to run fetch that _must_ succeed.]

Signed-off-by: Nick Hengeveld <nickh@reactrix.com>
Signed-off-by: Junio C Hamano <junkio@cox.net>
18 years ago[PATCH] Implement --recover for git-*-fetch
Daniel Barkalow [Tue, 27 Sep 2005 01:38:08 +0000 (21:38 -0400)]
[PATCH] Implement --recover for git-*-fetch

With the --recover option, we verify that we have absolutely
everything reachable from the target, not assuming that things
reachable from refs will be complete.

Signed-off-by: Daniel Barkalow <barkalow@iabervon.org>
Signed-off-by: Junio C Hamano <junkio@cox.net>
18 years ago[PATCH] Provide access to git_dir through get_git_dir().
Sven Verdoolaege [Mon, 26 Sep 2005 20:54:01 +0000 (22:54 +0200)]
[PATCH] Provide access to git_dir through get_git_dir().

Signed-off-by: Sven Verdoolaege <skimo@kotnet.org>
Signed-off-by: Junio C Hamano <junkio@cox.net>
18 years ago[PATCH] Make the test more shell generic and fix missing Solaris find option
Peter Eriksen [Sat, 24 Sep 2005 19:50:29 +0000 (21:50 +0200)]
[PATCH] Make the test more shell generic and fix missing Solaris find option

This is from Peter Eriksen, but further fixed.

Signed-off-by: Junio C Hamano <junkio@cox.net>
18 years agoReally require tk 8.4 (RPM)
Junio C Hamano [Tue, 27 Sep 2005 07:15:45 +0000 (00:15 -0700)]
Really require tk 8.4 (RPM)

**BLUSH**
Signed-off-by: Junio C Hamano <junkio@cox.net>
18 years agoSupport a modicum of path validation, and allow an export all trees option.
H. Peter Anvin [Tue, 27 Sep 2005 02:10:55 +0000 (19:10 -0700)]
Support a modicum of path validation, and allow an export all trees option.

18 years agoRequire tk 8.4 (RPM)
Junio C Hamano [Tue, 27 Sep 2005 01:29:26 +0000 (18:29 -0700)]
Require tk 8.4 (RPM)
Signed-off-by: Junio C Hamano <junkio@cox.net>
18 years agoMerge http://www.kernel.org/pub/scm/gitk/gitk
Junio C Hamano [Tue, 27 Sep 2005 01:23:47 +0000 (18:23 -0700)]
Merge http://www.kernel.org/pub/scm/gitk/gitk

18 years agogit-fetch: send informational output to >&2 consistently.
Junio C Hamano [Mon, 26 Sep 2005 02:49:49 +0000 (19:49 -0700)]
git-fetch: send informational output to >&2 consistently.

Only the "Fetching ... using http" was leaking to stdout.

Signed-off-by: Junio C Hamano <junkio@cox.net>
18 years agoGive default merge message after failed automerge.
Junio C Hamano [Sun, 25 Sep 2005 07:12:06 +0000 (00:12 -0700)]
Give default merge message after failed automerge.

Signed-off-by: Junio C Hamano <junkio@cox.net>
18 years agoDo not require clean tree when reverting and cherry-picking.
Junio C Hamano [Sun, 25 Sep 2005 05:52:32 +0000 (22:52 -0700)]
Do not require clean tree when reverting and cherry-picking.

My stupidity deserved to be yelled at by Linus ... there is no reason
to require the working tree to be clean when merging -- the only
requirements are index to match HEAD commit and the paths involved in
merge are up to date in the working tree.  Revert and cherry-pick are
just specialized forms of merge, and the requirements should be the
same.

Remove the 'general purpose routine to make sure tree is clean' from
git-sh-setup, to prevent me from getting tempted again.

Signed-off-by: Junio C Hamano <junkio@cox.net>
18 years agoFix overzealous cleanliness check in git-merge
Junio C Hamano [Fri, 23 Sep 2005 07:43:04 +0000 (00:43 -0700)]
Fix overzealous cleanliness check in git-merge

Being able to try multiple strategies and automatically picking one
that seems to give less conflicting result may or may not much sense
in practice.  At least that should not force normal use case to
additionally require the working tree to be fully clean.  As Linus
shouted, local changes do not matter unless they interfere with the
merge.

This commit changes git-merge not to require a clean working tree.
Only when we will iterate through more than one merge strategies,
local changes are stashed away before trying the first merge, and
restored before second and later merges are attempted.

The index file must be in sync with HEAD in any case -- otherwise the
merge result would contain changes since HEAD that was done locally
and registered in the index.  This check is already enforced by
three-way read-tree existing merge strategies use, but is done here as
a safeguard as well.

Signed-off-by: Junio C Hamano <junkio@cox.net>
18 years agogit-clone: check out "master" by default.
Junio C Hamano [Tue, 27 Sep 2005 00:17:09 +0000 (17:17 -0700)]
git-clone: check out "master" by default.

And with -n flag you can tell it not to.

Signed-off-by: Junio C Hamano <junkio@cox.net>
18 years agoUse "$@" rather than "${1+$@}" when invoking wish.
Paul Mackerras [Tue, 27 Sep 2005 00:29:41 +0000 (10:29 +1000)]
Use "$@" rather than "${1+$@}" when invoking wish.

18 years agoPlug a small race in update-ref.c.
Junio C Hamano [Sun, 25 Sep 2005 23:28:51 +0000 (16:28 -0700)]
Plug a small race in update-ref.c.

Signed-off-by: Junio C Hamano <junkio@cox.net>
18 years agoChange wish8.4 back to wish
Paul Mackerras [Mon, 26 Sep 2005 00:22:43 +0000 (10:22 +1000)]
Change wish8.4 back to wish

Checking in the change from wish to wish8.4 was a mistake; I had
changed it for a test but forgot to change it back before checking
in a patch.

18 years ago[PATCH] Add "git-update-ref" to update the HEAD (or other) ref
Linus Torvalds [Sun, 25 Sep 2005 18:43:05 +0000 (11:43 -0700)]
[PATCH] Add "git-update-ref" to update the HEAD (or other) ref

This is a careful version of the script stuff that currently just
blindly writes HEAD with a new value.

You can use

git-update-ref HEAD <newhead>

or

git-update-ref HEAD <newhead> <oldhead>

where the latter version verifies that the old value of HEAD matches
oldhead.

It basically allows a "ref" file to be a symbolic pointer to another ref
file by starting with the four-byte header sequence of "ref:".

More importantly, it allows the update of a ref file to follow these
symbolic pointers, whether they are symlinks or these "regular file
symbolic refs".

NOTE! It follows _real_ symlinks only if they start with "refs/":
otherwise it will just try to read them and update them as a regular file
(ie it will allow the filesystem to follow them, but will overwrite such a
symlink to somewhere else with a regular filename).

In general, using

git-update-ref HEAD "$head"

should be a _lot_ safer than doing

echo "$head" > "$GIT_DIR/HEAD"

both from a symlink following standpoint _and_ an error checking
standpoint.  The "refs/" rule for symlinks means that symlinks that point
to "outside" the tree are safe: they'll be followed for reading but not
for writing (so we'll never write through a ref symlink to some other
tree, if you have copied a whole archive by creating a symlink tree).

Signed-off-by: Linus Torvalds <torvalds@osdl.org>
Signed-off-by: Junio C Hamano <junkio@cox.net>
18 years ago[PATCH] More descriptive messages for conflict cases in merges
Fredrik Kuivinen [Sun, 25 Sep 2005 14:49:02 +0000 (16:49 +0200)]
[PATCH] More descriptive messages for conflict cases in merges

The merge strategies can give more descriptive error messages for
conflict cases if they are given the actual branch names instead of
the SHA1s.

Signed-off-by: Fredrik Kuivinen <freku045@student.liu.se>
Signed-off-by: Junio C Hamano <junkio@cox.net>
18 years ago[PATCH] recursive-merge: Don't print a stack trace when read-tree fails.
Fredrik Kuivinen [Sun, 25 Sep 2005 14:48:24 +0000 (16:48 +0200)]
[PATCH] recursive-merge: Don't print a stack trace when read-tree fails.

If the working tree is dirty read-tree will fail, and we don't want an
ugly stack trace in that case. Also make sure we don't print stack
traces when we use 'die'.

Signed-off-by: Fredrik Kuivinen <freku045@student.liu.se>
Signed-off-by: Junio C Hamano <junkio@cox.net>
18 years agoDiff: --name-status output format.
Junio C Hamano [Wed, 21 Sep 2005 07:20:06 +0000 (00:20 -0700)]
Diff: --name-status output format.

The new output format shows only the status letter and paths.

Signed-off-by: Junio C Hamano <junkio@cox.net>
18 years agoDiff: -l<num> to limit rename/copy detection.
Junio C Hamano [Wed, 21 Sep 2005 07:18:27 +0000 (00:18 -0700)]
Diff: -l<num> to limit rename/copy detection.

When many paths are modified, rename detection takes a lot of time.
The new option -l<num> can be used to disable rename detection when
more than <num> paths are possibly created as renames.

Signed-off-by: Junio C Hamano <junkio@cox.net>
18 years agoDiff clean-up.
Junio C Hamano [Wed, 21 Sep 2005 07:00:47 +0000 (00:00 -0700)]
Diff clean-up.

This is a long overdue clean-up to the code for parsing and passing
diff options.  It also tightens some constness issues.

Signed-off-by: Junio C Hamano <junkio@cox.net>
18 years agoMerge branch 'fixes'
Junio C Hamano [Sun, 25 Sep 2005 06:50:36 +0000 (23:50 -0700)]
Merge branch 'fixes'

18 years agoClean generated files a bit more.
Junio C Hamano [Sun, 25 Sep 2005 06:48:29 +0000 (23:48 -0700)]
Clean generated files a bit more.

Now we conditionally compile things in compat/, so we should remove
object files there.  Python execution can leave *.pyc and *.pyo, which
need to be cleaned as well.

Signed-off-by: Junio C Hamano <junkio@cox.net>
18 years agoStop installing the backward compatible symlinks.
Junio C Hamano [Sun, 25 Sep 2005 06:42:34 +0000 (23:42 -0700)]
Stop installing the backward compatible symlinks.

Also cmd-renames.sh can now be used to remove the backward compatible
symlinks -- this is not used by default in any way.

As discussed on the list with Pasky, git-ssh-push and git-ssh-pull will
keep calling each other for a while longer.

Signed-off-by: Junio C Hamano <junkio@cox.net>
18 years agoshow-branch: fix commit naming breakage.
Junio C Hamano [Sun, 25 Sep 2005 06:33:02 +0000 (23:33 -0700)]
show-branch: fix commit naming breakage.

It was ignoring the generation number of the commit when naming 2nd
and later parents, showing "(linus^n)^2" for any <n> incorrectly as
"linus^2".

Signed-off-by: Junio C Hamano <junkio@cox.net>
18 years ago[PATCH] Finish documenting trivial merge rules
Daniel Barkalow [Sun, 25 Sep 2005 03:50:04 +0000 (23:50 -0400)]
[PATCH] Finish documenting trivial merge rules

Fix missing symbol explanations, a few incorrect cases, and add
two-way merge rules.

Signed-off-by: Daniel Barkalow <barkalow@iabervon.org>
Signed-off-by: Junio C Hamano <junkio@cox.net>
18 years agogit-grep: fix 'git grep -e $pattern' handling
Junio C Hamano [Sat, 24 Sep 2005 22:09:48 +0000 (15:09 -0700)]
git-grep: fix 'git grep -e $pattern' handling

People typically say 'grep -e $pattern' because $pattern has a leading
dash which would be mistaken as a grep flag.  Make sure we pass -e in
front of $pattern when we invoke grep.

Signed-off-by: Junio C Hamano <junkio@cox.net>
18 years agoRemove use of 'xargs -0' from git-reset.
Junio C Hamano [Sat, 24 Sep 2005 22:02:35 +0000 (15:02 -0700)]
Remove use of 'xargs -0' from git-reset.

Even without the trouble it causes to people without GNU xargs,
it was not really necessary to print from Perl and then remove it
outside.  Just unlink it inside Perl.

Signed-off-by: Junio C Hamano <junkio@cox.net>
18 years agoUse 0.99.7.GIT as version between 0.99.7 and 0.99.8
Junio C Hamano [Sat, 24 Sep 2005 21:58:57 +0000 (14:58 -0700)]
Use 0.99.7.GIT as version between 0.99.7 and 0.99.8

Pasky taught me how he does his versioning for ELinks.  This will sort
after 0.99.7 and interim fixes 0.99.7a, and before 0.99.8.

Signed-off-by: Junio C Hamano <junkio@cox.net>
18 years agoSolaris: give a bit more built-in defaults.
Junio C Hamano [Fri, 23 Sep 2005 17:41:40 +0000 (10:41 -0700)]
Solaris: give a bit more built-in defaults.

Taking the make command line Peter Eriksen uses, give defaults
to SHELL_PATH, TAR, CURLDIR, NO_STRCASESTR, and INSTALL.

Signed-off-by: Junio C Hamano <junkio@cox.net>
18 years ago[PATCH] CURLDIR in Makefile
Patrick Mauritz [Mon, 19 Sep 2005 14:11:19 +0000 (16:11 +0200)]
[PATCH] CURLDIR in Makefile

Support systems that do not install curl headers and libraries
in /usr/{include,lib}.

Signed-off-by: Patrick Mauritz <oxygene@studentenbude.ath.cx>
Signed-off-by: Junio C Hamano <junkio@cox.net>
18 years ago[PATCH] Rename daemon.c's lognotice() to loginfo()
Petr Baudis [Sat, 24 Sep 2005 14:13:03 +0000 (16:13 +0200)]
[PATCH] Rename daemon.c's lognotice() to loginfo()

The syslog code logs with severity LOG_INFO in the loginfo() function, so make
things less confusing.

Signed-off-by: Petr Baudis <pasky@suse.cz>
Signed-off-by: Junio C Hamano <junkio@cox.net>
18 years ago[PATCH] git-daemon --syslog to log through syslog
Petr Baudis [Sat, 24 Sep 2005 14:13:01 +0000 (16:13 +0200)]
[PATCH] git-daemon --syslog to log through syslog

Well, this makes it even more clear that we need the packet reader and
friends to use the daemon logging code. :/  Therefore, we at least indicate
in the "Disconnect" log message if the child process exitted with an error
code or not.

Idea by Linus.

Signed-off-by: Petr Baudis <pasky@suse.cz>
Signed-off-by: Junio C Hamano <junkio@cox.net>
18 years ago[PATCH] Update git-daemon documentation wrt. the --verbose parameter
Petr Baudis [Sat, 24 Sep 2005 14:12:58 +0000 (16:12 +0200)]
[PATCH] Update git-daemon documentation wrt. the --verbose parameter

Signed-off-by: Petr Baudis <pasky@suse.cz>
Signed-off-by: Junio C Hamano <junkio@cox.net>
18 years agoReally ignore generated distribution material.
Junio C Hamano [Sat, 24 Sep 2005 18:19:07 +0000 (11:19 -0700)]
Really ignore generated distribution material.
Signed-off-by: Junio C Hamano <junkio@cox.net>
18 years agodaemon.c: pid_t is not int.
Junio C Hamano [Sat, 24 Sep 2005 06:26:55 +0000 (23:26 -0700)]
daemon.c: pid_t is not int.

Reported by Morten Welinder <mwelinder@gmail.com>.

Signed-off-by: Junio C Hamano <junkio@cox.net>
18 years agoMerge 'fixes' branch.
Junio C Hamano [Sat, 24 Sep 2005 01:46:34 +0000 (18:46 -0700)]
Merge 'fixes' branch.

Signed-off-by: Junio C Hamano <junkio@cox.net>
18 years agoFurther clarify licensing status of compat/subprocess.py.
Junio C Hamano [Sat, 24 Sep 2005 01:43:53 +0000 (18:43 -0700)]
Further clarify licensing status of compat/subprocess.py.

PSF license explicitly states the files in Python distribution is
compatible with GPL, and upstream clarified the licensing terms by
shortening its file header.  This version is a verbatim copy from
release24-maint branch form Python CVS.

Signed-off-by: Junio C Hamano <junkio@cox.net>
18 years ago[PATCH] rsh.c unterminated string
H. Peter Anvin [Fri, 23 Sep 2005 23:30:50 +0000 (16:30 -0700)]
[PATCH] rsh.c unterminated string

The change I made to rsh.c would leave the string unterminated under
certain conditions, which unfortunately always applied!  This patch
fixes this.  For some reason this never bit on i386 or ppc, but bit me
on x86-64.

Fix situation where the buffer was not properly null-terminated.

Signed-off-by: H. Peter Anvin <hpa@zytor.com>
Signed-off-by: Junio C Hamano <junkio@cox.net>
18 years ago[PATCH] git-local-fetch: Avoid confusing error messages on packed repositories
Sergey Vlasov [Fri, 23 Sep 2005 12:28:38 +0000 (16:28 +0400)]
[PATCH] git-local-fetch: Avoid confusing error messages on packed repositories

If the source repository was packed, and git-local-fetch needed to
fetch a pack file, it spewed a misleading error message about not
being able to find the unpacked object.  Fixed by adding the
warn_if_not_exists argument to copy_file(), which controls printing
of error messages in case the source file does not exist.

Signed-off-by: Sergey Vlasov <vsu@altlinux.ru>
Signed-off-by: Junio C Hamano <junkio@cox.net>
18 years ago[PATCH] Fix "git-local-fetch -s" with packed source repository
Sergey Vlasov [Fri, 23 Sep 2005 12:28:33 +0000 (16:28 +0400)]
[PATCH] Fix "git-local-fetch -s" with packed source repository

"git-local-fetch -s" did not work with a packed repository, because
symlink() happily created a link to a non-existing object file,
therefore fetch_file() always returned success, and fetch_pack() was
not called.  Fixed by calling stat() before symlink() to ensure the
file really exists.

Signed-off-by: Sergey Vlasov <vsu@altlinux.ru>
Signed-off-by: Junio C Hamano <junkio@cox.net>
18 years ago[PATCH] git-local-fetch: Avoid calling close(-1)
Sergey Vlasov [Fri, 23 Sep 2005 12:28:28 +0000 (16:28 +0400)]
[PATCH] git-local-fetch: Avoid calling close(-1)

After open() failure, copy_file() called close(ifd) with ifd == -1
(harmless, but causes Valgrind noise).  The same thing was possible
for the destination file descriptor.

Signed-off-by: Sergey Vlasov <vsu@altlinux.ru>
Signed-off-by: Junio C Hamano <junkio@cox.net>
18 years ago[PATCH] git-local-fetch: Fix error checking and leak in setup_indices()
Sergey Vlasov [Fri, 23 Sep 2005 12:28:23 +0000 (16:28 +0400)]
[PATCH] git-local-fetch: Fix error checking and leak in setup_indices()

setup_indices() did not check the return value of opendir(), and
did not have a corresponding closedir() call.

Signed-off-by: Sergey Vlasov <vsu@altlinux.ru>
Signed-off-by: Junio C Hamano <junkio@cox.net>
18 years ago[PATCH] fetch.c: Plug memory leak in process_tree()
Sergey Vlasov [Fri, 23 Sep 2005 12:28:18 +0000 (16:28 +0400)]
[PATCH] fetch.c: Plug memory leak in process_tree()

When freeing a tree entry, must free its name too.

Signed-off-by: Sergey Vlasov <vsu@altlinux.ru>
Signed-off-by: Junio C Hamano <junkio@cox.net>
18 years ago[PATCH] fetch.c: Do not build object ref lists
Sergey Vlasov [Fri, 23 Sep 2005 12:28:13 +0000 (16:28 +0400)]
[PATCH] fetch.c: Do not build object ref lists

The fetch code does not need object ref lists; by disabling them we
can save some time and memory.

Signed-off-by: Sergey Vlasov <vsu@altlinux.ru>
Signed-off-by: Junio C Hamano <junkio@cox.net>
18 years ago[PATCH] document command to show diff of a commit
Robert Watson [Fri, 23 Sep 2005 10:06:04 +0000 (11:06 +0100)]
[PATCH] document command to show diff of a commit

Document the best way to show the change introduced by a
commit, based on the suggestion by Linus on the list.

Signed-off-by: Junio C Hamano <junkio@cox.net>