Code

git.git
19 years ago[PATCH] Fix fetch completeness assumptions
Daniel Barkalow [Thu, 15 Sep 2005 01:31:42 +0000 (21:31 -0400)]
[PATCH] Fix fetch completeness assumptions

Don't assume that any commit we have is complete; assume that any ref
we have is complete.

Signed-off-by: Daniel Barkalow <barkalow@iabervon.org>
Signed-off-by: Junio C Hamano <junkio@cox.net>
19 years ago[PATCH] Document git-fetch options
Sergey Vlasov [Wed, 14 Sep 2005 12:48:05 +0000 (16:48 +0400)]
[PATCH] Document git-fetch options

Add documentation for git-fetch options

Signed-off-by: Junio C Hamano <junkio@cox.net>
19 years agoUnoptimize info/refs creation.
Junio C Hamano [Wed, 14 Sep 2005 20:15:53 +0000 (13:15 -0700)]
Unoptimize info/refs creation.

The code did not catch the case where you removed an existing ref
without changing anything else.  We are not talking about hundreds of
refs anyway, so remove that optimization.

Signed-off-by: Junio C Hamano <junkio@cox.net>
19 years agoRetire info/rev-cache
Junio C Hamano [Wed, 14 Sep 2005 20:08:55 +0000 (13:08 -0700)]
Retire info/rev-cache

It was one of those things that were well intentioned but did not turn
out to be useful in practice.

Signed-off-by: Junio C Hamano <junkio@cox.net>
19 years ago[PATCH] Use '-d' as the first flag to 'install'
Peter Eriksen [Wed, 14 Sep 2005 10:41:52 +0000 (12:41 +0200)]
[PATCH] Use '-d' as the first flag to 'install'

... in order to please Solaris 'install'.  GNU install is not harmed
with this.

[jc: Documentation/Makefile also fixed.]

Signed-off-by: Junio C Hamano <junkio@cox.net>
19 years ago[PATCH] git-http-fetch: Allow caching of retrieved objects by proxy servers
Sergey Vlasov [Tue, 13 Sep 2005 15:38:58 +0000 (19:38 +0400)]
[PATCH] git-http-fetch: Allow caching of retrieved objects by proxy servers

By default the curl library adds "Pragma: no-cache" header to all
requests, which disables caching by proxy servers.  However, most
files in a GIT repository are immutable, and caching them is safe and
could be useful.

This patch removes the "Pragma: no-cache" header from requests for all
files except the pack list (objects/info/packs) and references
(refs/*), which are really mutable and should not be cached.

Signed-off-by: Sergey Vlasov <vsu@altlinux.ru>
Signed-off-by: Junio C Hamano <junkio@cox.net>
(cherry picked from 3b2a4c46fd5093ec79fb60e1b14b8d4a58c74612 commit)

19 years agogit-branch -d <branch>: delete unused branch.
Junio C Hamano [Wed, 14 Sep 2005 08:43:53 +0000 (01:43 -0700)]
git-branch -d <branch>: delete unused branch.

The new flag '-d' lets you delete a branch.  For safety, it does not
lets you delete the branch you are currently on, nor a branch that
has been fully merged into your current branch.

The credit for the safety check idea goes to Daniel Barkalow.

Signed-off-by: Junio C Hamano <junkio@cox.net>
19 years agoRevert "[PATCH] plug memory leak in diff.c::diff_free_filepair()"
Junio C Hamano [Wed, 14 Sep 2005 21:06:50 +0000 (14:06 -0700)]
Revert "[PATCH] plug memory leak in diff.c::diff_free_filepair()"

This reverts 068eac91ce04b9aca163acb1927c3878c45d1a07 commit.

19 years ago[PATCH] Fix alloc_filespec() initialization
Linus Torvalds [Wed, 14 Sep 2005 20:41:24 +0000 (13:41 -0700)]
[PATCH] Fix alloc_filespec() initialization

This simplifies and fixes the initialization of a "diff_filespec" when
allocated.

The old code would not initialize "sha1_valid". Noticed by valgrind.

Signed-off-by: Linus Torvalds <torvalds@osdl.org>
Signed-off-by: Junio C Hamano <junkio@cox.net>
19 years agoMake merge comment git-pull makes for an octopus a bit prettier.
Junio C Hamano [Wed, 14 Sep 2005 06:49:55 +0000 (23:49 -0700)]
Make merge comment git-pull makes for an octopus a bit prettier.

Signed-off-by: Junio C Hamano <junkio@cox.net>
19 years agoread-tree: fix bogus debugging statement.
Junio C Hamano [Wed, 14 Sep 2005 05:27:42 +0000 (22:27 -0700)]
read-tree: fix bogus debugging statement.

We wanted to detect case #16 which should be rare, but botched the
case when some paths are missing, causing a segfault.  My fault.

Signed-off-by: Junio C Hamano <junkio@cox.net>
19 years agogit-merge-recursive: Trivial RE fixes.
Junio C Hamano [Wed, 14 Sep 2005 04:09:03 +0000 (21:09 -0700)]
git-merge-recursive: Trivial RE fixes.

Signed-off-by: Junio C Hamano <junkio@cox.net>
19 years ago[PATCH] Use the 'die' function where it is appropriate.
Fredrik Kuivinen [Tue, 13 Sep 2005 21:41:39 +0000 (23:41 +0200)]
[PATCH] Use the 'die' function where it is appropriate.

Signed-off-by: Fredrik Kuivinen <freku045@student.liu.se>
Signed-off-by: Junio C Hamano <junkio@cox.net>
19 years ago[PATCH] Use a temporary index file when we merge the common ancestors.
Fredrik Kuivinen [Tue, 13 Sep 2005 21:41:16 +0000 (23:41 +0200)]
[PATCH] Use a temporary index file when we merge the common ancestors.

With this change we can get rid of a call to 'git-update-index
--refresh'.

Signed-off-by: Fredrik Kuivinen <freku045@student.liu.se>
Signed-off-by: Junio C Hamano <junkio@cox.net>
19 years ago[PATCH] Adjust git-merge-recursive.py for the new tool names.
Fredrik Kuivinen [Tue, 13 Sep 2005 21:40:47 +0000 (23:40 +0200)]
[PATCH] Adjust git-merge-recursive.py for the new tool names.

Signed-off-by: Fredrik Kuivinen <freku045@student.liu.se>
Signed-off-by: Junio C Hamano <junkio@cox.net>
19 years ago[PATCH] Don't output 'Automatic merge failed, ...'
Fredrik Kuivinen [Tue, 13 Sep 2005 21:40:23 +0000 (23:40 +0200)]
[PATCH] Don't output 'Automatic merge failed, ...'

git-merge.sh does this for us.

Signed-off-by: Fredrik Kuivinen <freku045@student.liu.se>
Signed-off-by: Junio C Hamano <junkio@cox.net>
19 years ago[PATCH] Be more like the 'resolve' strategy.
Fredrik Kuivinen [Tue, 13 Sep 2005 21:39:34 +0000 (23:39 +0200)]
[PATCH] Be more like the 'resolve' strategy.

If there are non-mergeable changes leave the head contents in the
cache and update the working directory with the output from merge(1).

In the add/add and delete/modify conflict cases leave unmerged cache
entries in the index.

Signed-off-by: Fredrik Kuivinen <freku045@student.liu.se>
Signed-off-by: Junio C Hamano <junkio@cox.net>
19 years ago[PATCH] Define relative .git/objects/info/alternates semantics.
Junio C Hamano [Tue, 13 Sep 2005 07:05:22 +0000 (00:05 -0700)]
[PATCH] Define relative .git/objects/info/alternates semantics.

An entry in the alternates file can name a directory relative to
the object store it describes.  A typical linux-2.6 maintainer
repository would have "../../../torvalds/linux-2.6.git/objects" there,
because the subsystem maintainer object store would live in

    /pub/scm/linux/kernel/git/$u/$system.git/objects/

and the object store of Linus tree is in

    /pub/scm/linux/kernel/git/torvalds/linux-2.6.git/objects/

This unfortunately is different from GIT_ALTERNATE_OBJECT_DIRECTORIES
which is relative to the cwd of the running process, but there is no
way to make it consistent with the behaviour of the environment
variable.  The process typically is run in $system.git/ directory for
a naked repository, or one level up for a repository with a working
tree, so we just define it to be relative to the objects/ directory
to be different from either ;-).

Later, the dumb transport could be updated to read from info/alternates
and make requests for the repository the repository borrows from.

Signed-off-by: Junio C Hamano <junkio@cox.net>
19 years agoDetect ls-remote failure properly.
Junio C Hamano [Tue, 13 Sep 2005 20:16:45 +0000 (13:16 -0700)]
Detect ls-remote failure properly.

The part that can fail is before the pipe, so we need to propagate the
error properly to the main process.

Signed-off-by: Junio C Hamano <junkio@cox.net>
19 years ago[PATCH] Rename the 'fredrik' merge strategy to 'recursive'.
Fredrik Kuivinen [Tue, 13 Sep 2005 06:22:26 +0000 (08:22 +0200)]
[PATCH] Rename the 'fredrik' merge strategy to 'recursive'.

Otherwise we would regret when Fredrik comes up with another merge
algorithm with different pros-and-cons with the current one.

Signed-off-by: Fredrik Kuivinen <freku045@student.liu.se>
Signed-off-by: Junio C Hamano <junkio@cox.net>
19 years agoFix off-by-one error in git-merge
Junio C Hamano [Tue, 13 Sep 2005 05:20:42 +0000 (22:20 -0700)]
Fix off-by-one error in git-merge

'git-merge -s' without a strategy name does not fail and does
not give usage as it should.

Signed-off-by: Junio C Hamano <junkio@cox.net>
19 years agoPropagate errors from fetch-pack correctly to git-fetch.
Junio C Hamano [Tue, 13 Sep 2005 05:20:02 +0000 (22:20 -0700)]
Propagate errors from fetch-pack correctly to git-fetch.

When git-fetch-pack fails, the command does not notice the failure
and instead pretended nothing was fetched and there was nothing wrong.

Signed-off-by: Junio C Hamano <junkio@cox.net>
19 years agoFix CDPATH problem.
Junio C Hamano [Tue, 13 Sep 2005 02:47:07 +0000 (19:47 -0700)]
Fix CDPATH problem.

CDPATH has two problems:

 * It takes scripts to unexpected places (somebody had
   CDPATH=..:../..:$HOME and the "cd" in git-clone.sh:get_repo_base
   took him to $HOME/.git when he said "clone foo bar" to clone a
   repository in "foo" which had "foo/.git").  CDPATH mechanism does
   not implicitly give "." at the beginning of CDPATH, which is
   the most irritating part.

 * The extra echo when it does its thing confuses scripts further.

Most of our scripts that use "cd" includes git-sh-setup so the problem
is primarily fixed there.  git-clone starts without a repository, and
it needs its own fix.

Signed-off-by: Junio C Hamano <junkio@cox.net>
19 years agoDocument git-grep and link it from the main git(7) page.
Junio C Hamano [Tue, 13 Sep 2005 02:39:15 +0000 (19:39 -0700)]
Document git-grep and link it from the main git(7) page.

Also adjust missing description in the git.txt page while we are at it.

Signed-off-by: Junio C Hamano <junkio@cox.net>
19 years ago[PATCH] Make 'git checkout' a bit more forgiving when switching branches.
Junio C Hamano [Sun, 11 Sep 2005 21:12:08 +0000 (14:12 -0700)]
[PATCH] Make 'git checkout' a bit more forgiving when switching branches.

If you make a commit on a path, and then make the path
cache-dirty afterwards without changing its contents, 'git
checkout' to switch to another branch is prevented because
switching the branches done with 'read-tree -m -u $current
$next' detects that the path is cache-dirty, but it does not
bother noticing that the contents of the path has not been
actualy changed.

Since switching branches would involve checking out paths
different in the two branches, hence it is reasonably expensive
operation, we can afford to run update-index before running
read-tree to reduce this kind of false change from triggering
the check needlessly.

Signed-off-by: Junio C Hamano <junkio@cox.net>
19 years ago[PATCH] Omit patches that have already been merged from format-patch output.
Junio C Hamano [Sun, 11 Sep 2005 18:35:20 +0000 (11:35 -0700)]
[PATCH] Omit patches that have already been merged from format-patch output.

This switches the logic to pick which commits to include in the output
from git-rev-list to git-cherry; as a side effect, 'format-patch ^up mine'
would stop working although up..mine would continue to work.

Signed-off-by: Junio C Hamano <junkio@cox.net>
19 years ago[PATCH] There are several undocumented dependencies
Horst von Brand [Mon, 12 Sep 2005 00:00:49 +0000 (20:00 -0400)]
[PATCH] There are several undocumented dependencies

There are several undocumented dependencies in the .spec and in the
INSTALL files. The following is from Fedora, perhaps other RPM
distributions call the packages differently.

Also, the manpages aren't always installed gzipped.

Updates to git-core.spec.in file:
 - Some git scripts use Perl
 - gitk needs wish, which is part of TCL/Tk.
 - curl is used all over
 - Need the ssh program from openssh-clients

Updates to INSTALL:
 - Mention wish
 - Mention ssh

Signed-off-by: Horst H. von Brand <vonbrand@inf.utfsm.cl>
19 years agoImprove "git grep" flags handling
Linus Torvalds [Mon, 12 Sep 2005 23:46:53 +0000 (16:46 -0700)]
Improve "git grep" flags handling

This allows any arbitrary flags to "grep", and knows about the few
special grep flags that take an argument too.

It also allows some flags for git-ls-files, although their usefulness
is questionable.

With this, something line

git grep -w -1 pattern

works, without the script enumerating every possible flag.

[jc: this is the version Linus sent out after I showed him a
 barf-o-meter test version that avoids shell arrays.  He must
 have typed this version blindly, since he said:

    I'm not barfing, but that's probably because my brain just shut
    down and is desperately trying to gouge my eyes out with a spoon.

 I slightly fixed it to catch the remaining arguments meant to be
 given git-ls-files.]

Signed-off-by: Linus Torvalds <torvalds@osdl.org>
Signed-off-by: Junio C Hamano <junkio@cox.net>
19 years ago[PATCH] Make the ProgramError class printable.
Fredrik Kuivinen [Mon, 12 Sep 2005 21:31:56 +0000 (23:31 +0200)]
[PATCH] Make the ProgramError class printable.

Signed-off-by: Fredrik Kuivinen <freku045@student.liu.se>
Signed-off-by: Junio C Hamano <junkio@cox.net>
19 years ago[PATCH] Make sure we die if we don't get enough arguments.
Fredrik Kuivinen [Mon, 12 Sep 2005 21:31:22 +0000 (23:31 +0200)]
[PATCH] Make sure we die if we don't get enough arguments.

Signed-off-by: Fredrik Kuivinen <freku045@student.liu.se>
Signed-off-by: Junio C Hamano <junkio@cox.net>
19 years ago[PATCH] Introduce a 'die' function.
Fredrik Kuivinen [Mon, 12 Sep 2005 21:30:47 +0000 (23:30 +0200)]
[PATCH] Introduce a 'die' function.

Signed-off-by: Fredrik Kuivinen <freku045@student.liu.se>
Signed-off-by: Junio C Hamano <junkio@cox.net>
19 years ago[PATCH] Exit with status code 2 if we get an exception.
Fredrik Kuivinen [Mon, 12 Sep 2005 21:29:54 +0000 (23:29 +0200)]
[PATCH] Exit with status code 2 if we get an exception.

Signed-off-by: Fredrik Kuivinen <freku045@student.liu.se>
Signed-off-by: Junio C Hamano <junkio@cox.net>
19 years ago[PATCH] Fix assertion failure when merging common ancestors.
Fredrik Kuivinen [Mon, 12 Sep 2005 21:29:06 +0000 (23:29 +0200)]
[PATCH] Fix assertion failure when merging common ancestors.

Bug reported by Junio.

Signed-off-by: Fredrik Kuivinen <freku045@student.liu.se>
Signed-off-by: Junio C Hamano <junkio@cox.net>
19 years agoAllow finding things that begin with a dash in 'git grep'
Junio C Hamano [Mon, 12 Sep 2005 20:24:55 +0000 (13:24 -0700)]
Allow finding things that begin with a dash in 'git grep'

Signed-off-by: Junio C Hamano <junkio@cox.net>
19 years ago[PATCH] Add "git grep" helper
Linus Torvalds [Mon, 12 Sep 2005 19:06:10 +0000 (12:06 -0700)]
[PATCH] Add "git grep" helper

Very convenient shorthand for

git-ls-files [file-patterns] | xargs grep <pattern>

which I tend to do all the time.

Yes, it's trivial, but it's really nice. I can do

git grep '\<some_variable\>' arch/i386 include/asm-i386

and it does exactly what you'd think it does. And since it just uses the
normal git-ls-files file patterns, you can do things like

git grep something 'include/*.h'

and it will search all header files under the include/ subdirectory.

Signed-off-by: Linus Torvalds <torvalds@osdl.org>
Signed-off-by: Junio C Hamano <junkio@cox.net>
19 years ago[PATCH] Add note about IANA confirmation
Linus Torvalds [Mon, 12 Sep 2005 18:23:00 +0000 (11:23 -0700)]
[PATCH] Add note about IANA confirmation

The git port (9418) is officially listed by IANA now.

So document it.

Signed-off-by: Linus Torvalds <torvalds@osdl.org>
Signed-off-by: Junio C Hamano <junkio@cox.net>
19 years agoUse int instead of socklen_t
Junio C Hamano [Sun, 11 Sep 2005 20:58:41 +0000 (13:58 -0700)]
Use int instead of socklen_t

This should work around the compilation problem Johannes Schindelin
and others had on Mac OS/X.

Quoting Linus:

    Any operating system where socklen_t is anything else than "int" is
    terminally broken. The people who introduced that typedef were confused,
    and I actually had to argue with them that it was fundamentally wrong:
    there is no other valid type than "int" that makes sense for it.

Signed-off-by: Junio C Hamano <junkio@cox.net>
19 years ago[PATCH] Apply N -> A status change in diff-helper
Herbert Xu [Mon, 12 Sep 2005 01:03:43 +0000 (11:03 +1000)]
[PATCH] Apply N -> A status change in diff-helper

When the git diff status 'N' was changed to 'A', diff-helper.c was
not updated accordingly.  This means that it no longer shows the
diff for newly added files.

This patch makes that change in diff-helper.c.

Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
Signed-off-by: Junio C Hamano <junkio@cox.net>
19 years ago[PATCH] archimport - better handling of temp dirs
martin@catalyst.net.nz [Sun, 11 Sep 2005 09:26:05 +0000 (21:26 +1200)]
[PATCH] archimport - better handling of temp dirs

Switched from backwards hard-coded tmp directory creation to using
File::Temp::tempdir() to create the directory inside $TMP_PATH or
what the user has provided via the -t parameter.

Signed-off-by: Martin Langhoff <martin@catalyst.net.nz>
Signed-off-by: Junio C Hamano <junkio@cox.net>
19 years ago[PATCH] archimport - use GIT_DIR instead of hardcoded ".git"
martin@catalyst.net.nz [Sun, 11 Sep 2005 09:26:05 +0000 (21:26 +1200)]
[PATCH] archimport - use GIT_DIR instead of hardcoded ".git"

Use GIT_DIR from the environment instead of a hardcoded '.git' string.

Signed-off-by: Martin Langhoff <martin@catalyst.net.nz>
Signed-off-by: Junio C Hamano <junkio@cox.net>
19 years ago[PATCH] archimport - update in-script doco, options tidyup
martin@catalyst.net.nz [Sun, 11 Sep 2005 09:26:05 +0000 (21:26 +1200)]
[PATCH] archimport - update in-script doco, options tidyup

Updated the usage/help message to match asciidoc documentation. The perldoc
documentation now includes the first paragraph from the asciidoc documentation
and points users to the manpage.

Updated TODO section.

Removed some redundant options from the getopt() invocation.

Signed-off-by: Martin Langhoff <martin@catalyst.net.nz>
Signed-off-by: Junio C Hamano <junkio@cox.net>
19 years ago[PATCH] archimport documentation tidyup
martin@catalyst.net.nz [Sun, 11 Sep 2005 09:26:05 +0000 (21:26 +1200)]
[PATCH] archimport documentation tidyup

New "merges" headline, clarified some parts that were not easy to understand.

Signed-off-by: Martin Langhoff <martin@catalyst.net.nz>
Signed-off-by: Junio C Hamano <junkio@cox.net>
19 years ago[PATCH] archimport documentation update
martin@catalyst.net.nz [Sun, 11 Sep 2005 09:26:05 +0000 (21:26 +1200)]
[PATCH] archimport documentation update

Updated and expanded the command description, and added a reference of the
command line options.

Signed-off-by: Martin Langhoff <martin@catalyst.net.nz>
Signed-off-by: Junio C Hamano <junkio@cox.net>
19 years ago[PATCH] Escape asciidoc's built-in em-dash replacement
Yasushi SHOJI [Sun, 11 Sep 2005 17:29:10 +0000 (02:29 +0900)]
[PATCH] Escape asciidoc's built-in em-dash replacement

AsciiDoc replace '--' with em-dash (&#8212) by default. em-dash
looks a lot like a single long dash and it's very confusing when
we are talking about command options.

Section 21.2.8 'Replacements' of AsciiDoc's User Guide says that a
backslash in front of double dash prevent the replacement.  This
patch does just that.

Signed-off-by: Yasushi SHOJI <yashi@atmark-techno.com>
Signed-off-by: Junio C Hamano <junkio@cox.net>
19 years ago[PATCH] Fix buffer overflow in ce_flush().
Qingning Huo [Sun, 11 Sep 2005 13:27:47 +0000 (14:27 +0100)]
[PATCH] Fix buffer overflow in ce_flush().

Add a check before appending SHA1 signature to write_buffer,
flush it first if necessary.

Signed-off-by: Junio C Hamano <junkio@cox.net>
19 years agoAdd a new merge strategy by Fredrik Kuivinen.
Junio C Hamano [Sun, 11 Sep 2005 00:46:27 +0000 (17:46 -0700)]
Add a new merge strategy by Fredrik Kuivinen.

I really wanted to try this out, instead of asking for an adjustment
to the 'git merge' driver and waiting.  For now the new strategy is
called 'fredrik' and not in the list of default strategies to be tried.

The script wants Python 2.4 so this commit also adjusts Debian and RPM
build procecure files.

Signed-off-by: Junio C Hamano <junkio@cox.net>
19 years ago'git-merge': Documentation.
Junio C Hamano [Fri, 9 Sep 2005 08:15:47 +0000 (01:15 -0700)]
'git-merge': Documentation.

... and add link from git.txt, as usual.

Signed-off-by: Junio C Hamano <junkio@cox.net>
19 years agoUse Daniel's read-tree in the merge strategy 'resolve'.
Junio C Hamano [Sun, 11 Sep 2005 00:56:19 +0000 (17:56 -0700)]
Use Daniel's read-tree in the merge strategy 'resolve'.

And rename the one Linus kept calling stupid, 'stupid'.

Signed-off-by: Junio C Hamano <junkio@cox.net>
19 years agoMulti-backend merge driver.
Junio C Hamano [Thu, 8 Sep 2005 20:47:12 +0000 (13:47 -0700)]
Multi-backend merge driver.

The new command 'git merge' takes the current head and one or more
remote heads, with the commit log message for the automated case.

If the heads being merged are simple fast-forwards, it acts the
same way as the current 'git resolve'.  Otherwise, it tries
different merge strategies and takes the result from the one that
succeeded auto-merging, if there is any.

If no merge strategy succeeds auto-merging, their results are
evaluated for number of paths needed for hand resolving, and the
one with the least number of such paths is left in the working
tree.  The user is asked to resolve them by hand and make a
commit manually.

The calling convention from the 'git merge' driver to merge
strategy programs is very simple:

 - A strategy program is to be called 'git-merge-<strategy>'.

 - They take input of this form:

<common1> <common2> ... '--' <head> <remote1> <remote2>...

   That is, one or more the common ancestors, double dash, the
   current head, and one or more remote heads being merged into
   the current branch.

 - Before a strategy program is called, the working tree is
   matched to the current <head>.

 - The strategy program exits with status code 0 when it
   successfully auto-merges the given heads.  It should do
   update-cache for all the merged paths when it does so -- the
   index file will be used to record the merge result as a
   commit by the driver.

 - The strategy program exits with status code 1 when it leaves
   conflicts behind.  It should do update-cache for all the
   merged paths that it successfully auto-merged, and leave the
   cache entry in the index file as the same as <head> for paths
   it could not auto-merge, and leave its best-effort result
   with conflict markers in the working tree when it does so.

 - The strategy program exists with status code other than 0 or
   1 if it does not handle the given merge at all.

As examples, this commit comes with merge strategies based on
'git resolve' and 'git octopus'.

Signed-off-by: Junio C Hamano <junkio@cox.net>
19 years agoPlug leak in Daniel's read-tree.
Junio C Hamano [Sun, 11 Sep 2005 01:14:14 +0000 (18:14 -0700)]
Plug leak in Daniel's read-tree.

... and it is ready to be pushed out in the "master" branch.

Signed-off-by: Junio C Hamano <junkio@cox.net>
19 years ago[PATCH] Add debugging help for case #16 to read-tree.c
Junio C Hamano [Tue, 6 Sep 2005 19:53:56 +0000 (12:53 -0700)]
[PATCH] Add debugging help for case #16 to read-tree.c

This will help us detect if real-world example merges have multiple
merge-base candidates and one of them matches one head while another
matches the other head.

Signed-off-by: Junio C Hamano <junkio@cox.net>
19 years ago[PATCH] Disable debugging from read-tree.
Junio C Hamano [Mon, 5 Sep 2005 08:13:36 +0000 (01:13 -0700)]
[PATCH] Disable debugging from read-tree.

Signed-off-by: Junio C Hamano <junkio@cox.net>
19 years ago[PATCH] Document the trivial merge rules for 3(+more ancestors)-way merges.
Daniel Barkalow [Mon, 5 Sep 2005 06:05:17 +0000 (02:05 -0400)]
[PATCH] Document the trivial merge rules for 3(+more ancestors)-way merges.

Signed-off-by: Daniel Barkalow
Signed-off-by: Junio C Hamano <junkio@cox.net>
19 years ago[PATCH] Rewrite read-tree
Daniel Barkalow [Mon, 5 Sep 2005 06:04:48 +0000 (02:04 -0400)]
[PATCH] Rewrite read-tree

Adds support for multiple ancestors, removes --emu23, much simplification.

Signed-off-by: Daniel Barkalow <barkalow@iabervon.org>
Signed-off-by: Junio C Hamano <junkio@cox.net>
19 years ago[PATCH] Add function to append to an object_list.
Daniel Barkalow [Mon, 5 Sep 2005 06:04:18 +0000 (02:04 -0400)]
[PATCH] Add function to append to an object_list.

Signed-off-by: Daniel Barkalow <barkalow@iabervon.org>
Signed-off-by: Junio C Hamano <junkio@cox.net>
19 years ago[PATCH] Add a function for getting a struct tree for an ent.
Daniel Barkalow [Mon, 5 Sep 2005 06:03:51 +0000 (02:03 -0400)]
[PATCH] Add a function for getting a struct tree for an ent.

Signed-off-by: Daniel Barkalow <barkalow@iabervon.org>
Signed-off-by: Junio C Hamano <junkio@cox.net>
19 years agoFix 'git-show-branch --list <head>'
Junio C Hamano [Sun, 11 Sep 2005 01:24:46 +0000 (18:24 -0700)]
Fix 'git-show-branch --list <head>'

It mistakenly failed to output anything when given a single head.

Signed-off-by: Junio C Hamano <junkio@cox.net>
19 years agoAdd 'git bisect replay/log' documentation.
Junio C Hamano [Sat, 10 Sep 2005 22:23:09 +0000 (15:23 -0700)]
Add 'git bisect replay/log' documentation.

... lest I get yelled at by a very angry scm ;-).

Signed-off-by: Junio C Hamano <junkio@cox.net>
19 years agoKeep bisection log so that it can be replayed later.
Junio C Hamano [Sat, 10 Sep 2005 22:18:31 +0000 (15:18 -0700)]
Keep bisection log so that it can be replayed later.

The 'git bisect' command was very unforgiving in that once you made a
mistake telling it good/bad it was very hard to take it back.  Keep a
log of what you told it in an earlier session, so that it can be
replayed after removing everything after what you botched last time.

Signed-off-by: Junio C Hamano <junkio@cox.net>
19 years agoFix copy marking from diffcore-rename.
Junio C Hamano [Sat, 10 Sep 2005 19:42:32 +0000 (12:42 -0700)]
Fix copy marking from diffcore-rename.

When (A,B) ==> (B,C) rename-copy was detected, we incorrectly said
that C was created by copying B.  This is because we only check if the
path of rename/copy source still exists in the resulting tree to see
if the file is renamed out of existence.  In this case, the new B is
created by copying or renaming A, so the original B is lost and we
should say C is a rename of B not a copy of B.

Signed-off-by: Junio C Hamano <junkio@cox.net>
19 years ago[PATCH] archimport - add merge detection
martin@catalyst.net.nz [Sat, 10 Sep 2005 11:42:24 +0000 (23:42 +1200)]
[PATCH] archimport - add merge detection

We now keep track of the patches merged in each branch since they have
diverged, using the records that the Arch "logs" provide. Merge parents
for a commit are defined if we are merging a series of patches that starts
from the mergebase.

If patches from a related branch are merged out-of-order, we keep track of
how much has been merged sequentially -- the tip of that sequential merge
is our new parent from that branch.

This mechanism works very well for branches that merge in dovetail and/or
flying fish patterns, probably less well for others.

Signed-off-by: Martin Langhoff <martin@catalyst.net.nz>
Signed-off-by: Junio C Hamano <junkio@cox.net>
19 years agoMake sure we have leading directories under refs/{heads,tags}
Junio C Hamano [Sat, 10 Sep 2005 17:40:47 +0000 (10:40 -0700)]
Make sure we have leading directories under refs/{heads,tags}

Otherwise having subdirectories under refs/heads becomes rather
unwieldy.

Signed-off-by: Junio C Hamano <junkio@cox.net>
19 years ago[PATCH] Documentation/repository-layout.txt typo
Sven Verdoolaege [Sat, 10 Sep 2005 09:51:51 +0000 (11:51 +0200)]
[PATCH] Documentation/repository-layout.txt typo

Signed-off-by: Junio C Hamano <junkio@cox.net>
19 years agoshow-branch: --list and --independent
Junio C Hamano [Fri, 9 Sep 2005 22:40:45 +0000 (15:40 -0700)]
show-branch: --list and --independent

The --list option is what 'git branch' without parameter should
have been; it shows the one-line commit message for each branch
name.  The --independent option is used to filter out commits
that can be reachable from other commits, to make detection of
fast forward condition in multi-head merge easier.

Signed-off-by: Junio C Hamano <junkio@cox.net>
19 years agoRetire support for old environment variables.
Junio C Hamano [Fri, 9 Sep 2005 21:48:54 +0000 (14:48 -0700)]
Retire support for old environment variables.

We have deprecated the old environment variable names for quite a
while and now it's time to remove them.  Gone are:

    SHA1_FILE_DIRECTORIES AUTHOR_DATE AUTHOR_EMAIL AUTHOR_NAME
    COMMIT_AUTHOR_EMAIL COMMIT_AUTHOR_NAME SHA1_FILE_DIRECTORY

Signed-off-by: Junio C Hamano <junkio@cox.net>
19 years agoAdjust .gitignore for big rename.
Junio C Hamano [Fri, 9 Sep 2005 18:55:56 +0000 (11:55 -0700)]
Adjust .gitignore for big rename.

Signed-off-by: Junio C Hamano <junkio@cox.net>
19 years ago[PATCH] remove duplicate git-send-email-script.perl target in Makefile
Marco Roeland [Fri, 9 Sep 2005 18:08:50 +0000 (20:08 +0200)]
[PATCH] remove duplicate git-send-email-script.perl target in Makefile

Remove duplicate git-send-email-perl target in Makefile.

When WITH_SEND_EMAIL was defined, as in the Debian 'deb' target,
git-send-email-perl was added twice to SCRIPT_PERL, leading to a
duplicate definition in the Makefile. Creating a ".deb" then failed.

Signed-off-by: Marco Roeland <marco.roeland@xs4all.nl>
Signed-off-by: Junio C Hamano <junkio@cox.net>
19 years ago[PATCH] fix tutorial typo
jdl@freescale.com [Fri, 9 Sep 2005 15:41:15 +0000 (10:41 -0500)]
[PATCH] fix tutorial typo

Fix a minor typo in the tutorial.txt.

Signed-off-by: Jon Loeliger <jdl@freescale.com>
Signed-off-by: Junio C Hamano <junkio@cox.net>
19 years ago[PATCH] Fix tutorial reference to git-*-scripts.
jdl@freescale.com [Fri, 9 Sep 2005 14:11:35 +0000 (09:11 -0500)]
[PATCH] Fix tutorial reference to git-*-scripts.

There was a lingering reference to the git-*-scripts in
the tutorial.  This patch reworks that paragraph a bit.

Signed-off-by: Jon Loeliger <jdl@freescale.com>
Signed-off-by: Junio C Hamano <junkio@cox.net>
19 years agoIgnore datestamp-only changes when installing webdoc.
Junio C Hamano [Fri, 9 Sep 2005 08:17:54 +0000 (01:17 -0700)]
Ignore datestamp-only changes when installing webdoc.

Signed-off-by: Junio C Hamano <junkio@cox.net>
19 years agoSquelch `removal' message from 'git reset --hard'.
Junio C Hamano [Fri, 9 Sep 2005 06:14:33 +0000 (23:14 -0700)]
Squelch `removal' message from 'git reset --hard'.

We do not say anything about checking out, so mentioning removal only
gets unnecessarily alarming.

Signed-off-by: Junio C Hamano <junkio@cox.net>
19 years ago'build' scripts before installing.
Junio C Hamano [Fri, 9 Sep 2005 01:50:33 +0000 (18:50 -0700)]
'build' scripts before installing.

Earlier we renamed git-foo.sh to git-foo while installing, which
was mostly done by inertia than anything else.  This however
made writing tests to use scripts harder.

This patch builds the scripts the same way as we build binaries
from their sources.  As a side effect, you can now specify
non-standard paths you have your Perl binary is in when running
the make.

Signed-off-by: Junio C Hamano <junkio@cox.net>
19 years agoShow all merge-base candidates from show-branch --merge-base
Junio C Hamano [Thu, 8 Sep 2005 19:15:52 +0000 (12:15 -0700)]
Show all merge-base candidates from show-branch --merge-base

This would make things easier to use for Octopus.

Signed-off-by: Junio C Hamano <junkio@cox.net>
19 years agoDocumentation updates.
Junio C Hamano [Thu, 8 Sep 2005 06:04:52 +0000 (23:04 -0700)]
Documentation updates.

Fill in more missing documentation.

Signed-off-by: Junio C Hamano <junkio@cox.net>
19 years ago[PATCH] git-daemon --inetd
lars.doelle@on-line.de [Thu, 8 Sep 2005 01:50:01 +0000 (03:50 +0200)]
[PATCH] git-daemon --inetd

git-daemon using inetd. does not work properly. inetd routes stderr onto the
network line just like stdout, which was apparently not expected to be so.

As the result of this, the stream is closed by the receiver, because some
"Packing %d objects\n" originating from pack_objects is first reported over
the line instead of the expected pack_header, and so the SIGNATURE test
fails.  Here is a workaround.

Signed-off-by: Junio C Hamano <junkio@cox.net>
19 years agogit --version tells which version of git you have.
Junio C Hamano [Thu, 8 Sep 2005 04:26:52 +0000 (21:26 -0700)]
git --version tells which version of git you have.

Originally from Martin Atukunda <matlads@dsmagic.com> but adjusted for
post-rename code.

Signed-off-by: Junio C Hamano <junkio@cox.net>
19 years ago[PATCH] Do not create bogus branch from flag to git branch
Amos Waterland [Thu, 8 Sep 2005 02:13:26 +0000 (21:13 -0500)]
[PATCH] Do not create bogus branch from flag to git branch

If you run `git branch --help', you will unexpectedly have created a new
branch named "--help".  This simple patch adds logic and a usage
statement to catch this and similar problems, and adds a testcase for it.

Signed-off-by: Amos Waterland <apw@rossby.metr.ou.edu>
Signed-off-by: Junio C Hamano <junkio@cox.net>
19 years ago[PATCH] Portability fix for Solaris 10/x86
Patrick Mauritz [Mon, 5 Sep 2005 23:24:03 +0000 (01:24 +0200)]
[PATCH] Portability fix for Solaris 10/x86

 * getdomainname unavailable there.
 * needs -lsocket for linkage.
 * needs __EXTENSIONS__ at the beginning of convert-objects.c

[JC: I've done this slightly differently from what Patrick originally
sent to the list and dropped the bit that deals with installations
that has curl header and library at non-default location.  I am
resisting the slipperly slope called autoconf.]

Signed-off-by: Junio C Hamano <junkio@cox.net>
19 years agoBig tool rename.
Junio C Hamano [Thu, 8 Sep 2005 00:26:23 +0000 (17:26 -0700)]
Big tool rename.

As promised, this is the "big tool rename" patch.  The primary differences
since 0.99.6 are:

  (1) git-*-script are no more.  The commands installed do not
      have any such suffix so users do not have to remember if
      something is implemented as a shell script or not.

  (2) Many command names with 'cache' in them are renamed with
      'index' if that is what they mean.

There are backward compatibility symblic links so that you and
Porcelains can keep using the old names, but the backward
compatibility support  is expected to be removed in the near
future.

Signed-off-by: Junio C Hamano <junkio@cox.net>
19 years agoGIT 0.99.6 v0.99.6
Junio C Hamano [Wed, 7 Sep 2005 22:59:24 +0000 (15:59 -0700)]
GIT 0.99.6

19 years ago[PATCH] Simplify git script
David_Kågedal [Wed, 7 Sep 2005 07:29:20 +0000 (09:29 +0200)]
[PATCH] Simplify git script

The code for listing the available subcommands was unnecessarily
complex.

Signed-off-by: David Kågedal <davidk@lysator.liu.se>
Signed-off-by: Junio C Hamano <junkio@cox.net>
19 years agoDocumentation updates.
Junio C Hamano [Wed, 7 Sep 2005 21:28:21 +0000 (14:28 -0700)]
Documentation updates.

More commands are documented now; thanks Raymond.

Signed-off-by: Junio C Hamano <junkio@cox.net>
19 years ago[PATCH] Docs for git-build-rev-cache.
A Large Angry SCM [Wed, 7 Sep 2005 21:20:41 +0000 (17:20 -0400)]
[PATCH] Docs for git-build-rev-cache.

Signed-off-by: A Large Angry SCM <gitzilla@gmail.com>
Signed-off-by: Junio C Hamano <junkio@cox.net>
19 years ago[PATCH] Docs for git-show-rev-cache.
A Large Angry SCM [Wed, 7 Sep 2005 21:19:48 +0000 (17:19 -0400)]
[PATCH] Docs for git-show-rev-cache.

Signed-off-by: A Large Angry SCM <gitzilla@gmail.com>
Signed-off-by: Junio C Hamano <junkio@cox.net>
19 years ago[PATCH] Docs for git-reset-script.
A Large Angry SCM [Wed, 7 Sep 2005 21:18:51 +0000 (17:18 -0400)]
[PATCH] Docs for git-reset-script.

Signed-off-by: A Large Angry SCM <gitzilla@gmail.com>
Signed-off-by: Junio C Hamano <junkio@cox.net>
19 years ago[PATCH] Docs for git-checkout-script.
A Large Angry SCM [Wed, 7 Sep 2005 21:17:18 +0000 (17:17 -0400)]
[PATCH] Docs for git-checkout-script.

Signed-off-by: A Large Angry SCM <gitzilla@gmail.com>
Signed-off-by: Junio C Hamano <junkio@cox.net>
19 years agoDocumentation updates.
Junio C Hamano [Wed, 7 Sep 2005 21:08:38 +0000 (14:08 -0700)]
Documentation updates.

parse-remote and rev-parse gets full documentation.  Add skeleton for
archimport.  Link them from the main git(7) page.  Also move git-daemon
and git-request-pull out of 'undocumented' section.

Signed-off-by: Junio C Hamano <junkio@cox.net>
19 years agoFlatten tools/ directory to make build procedure simpler.
Junio C Hamano [Wed, 7 Sep 2005 19:22:56 +0000 (12:22 -0700)]
Flatten tools/ directory to make build procedure simpler.

Also make platform specific part more isolated.  Currently we only
have Darwin defined, but I've taken a look at SunOS specific patch
(which I dropped on the floor for now) as well.  Doing things this way
would make adding it easier.

Signed-off-by: Junio C Hamano <junkio@cox.net>
19 years agomailinfo: barf and exist upon nested multipart.
Junio C Hamano [Tue, 6 Sep 2005 23:46:34 +0000 (16:46 -0700)]
mailinfo: barf and exist upon nested multipart.

At least we can detect what we do not handle.

Signed-off-by: Junio C Hamano <junkio@cox.net>
19 years agoMerge branch 'master' of .
Junio C Hamano [Tue, 6 Sep 2005 20:51:33 +0000 (13:51 -0700)]
Merge branch 'master' of .

19 years ago[PATCH] Update documentation for git-get-tar-commit-id
Rene Scharfe [Tue, 6 Sep 2005 19:21:16 +0000 (21:21 +0200)]
[PATCH] Update documentation for git-get-tar-commit-id

... and add a copyright notice.

[jc: also move its entry in git.txt from undocumented section.]

Signed-off-by: Rene Scharfe <rene.scharfe@lsrfire.ath.cx>
Signed-off-by: Junio C Hamano <junkio@cox.net>
19 years ago[PATCH] git-cvsimport-script: handling of tags
H. Peter Anvin [Tue, 6 Sep 2005 17:36:01 +0000 (10:36 -0700)]
[PATCH] git-cvsimport-script: handling of tags

This patch changes git-cvsimport-script so that it creates tag objects
instead of refs to commits, and adds an option, -u, to convert
underscores in branch and tag names to dots (since CVS doesn't allow
dots in branches and tags.)

Signed-off-by: Junio C Hamano <junkio@cox.net>
19 years agoFormat fix for asciidoc documentation titles.
Junio C Hamano [Tue, 6 Sep 2005 16:06:32 +0000 (09:06 -0700)]
Format fix for asciidoc documentation titles.
Signed-off-by: Junio C Hamano <junkio@cox.net>
19 years agoMerge branch 'master' of .
Junio C Hamano [Mon, 5 Sep 2005 08:42:11 +0000 (01:42 -0700)]
Merge branch 'master' of .

19 years agoRetire git-clone-dumb-http.
Junio C Hamano [Mon, 5 Sep 2005 07:47:39 +0000 (00:47 -0700)]
Retire git-clone-dumb-http.

... and fold it into git-clone-script.

Signed-off-by: Junio C Hamano <junkio@cox.net>
19 years ago[PATCH] Update documentation of --compose to git-send-email-script.txt
Ryan Anderson [Mon, 5 Sep 2005 05:13:07 +0000 (01:13 -0400)]
[PATCH] Update documentation of --compose to git-send-email-script.txt

Signed-off-by: Ryan Anderson <ryan@michonline.com>
Signed-off-by: Junio C Hamano <junkio@cox.net>
19 years ago[PATCH] Make git-send-email-script ignore some unnecessary options when operating...
Ryan Anderson [Mon, 5 Sep 2005 05:13:07 +0000 (01:13 -0400)]
[PATCH] Make git-send-email-script ignore some unnecessary options when operating in batch mode.

Add a "--compose" option that uses $EDITOR to edit an "introductory" email to the patch series.

Signed-off-by: Ryan Anderson <ryan@michonline.com>
Signed-off-by: Junio C Hamano <junkio@cox.net>
19 years agoInstall archimport-script.
Junio C Hamano [Mon, 5 Sep 2005 06:30:08 +0000 (23:30 -0700)]
Install archimport-script.

Signed-off-by: Junio C Hamano <junkio@cox.net>
19 years agoMerge branch 'master' of .
Junio C Hamano [Sun, 4 Sep 2005 22:47:28 +0000 (15:47 -0700)]
Merge branch 'master' of .

19 years agoAdd copy/rename check for git-apply.
Junio C Hamano [Sun, 4 Sep 2005 22:40:18 +0000 (15:40 -0700)]
Add copy/rename check for git-apply.

The new test pattern is taken from HPA's klibc and klibc-kbuild trees,
which has many interesting renames (the commits
001eef5a19219e5b0601068a3d13874b88c0653e and
0037d1bc0deaf7daec3778496656cb04b4e4b9d0).  The test pattern exposes
problems in the apply.c changes currently in the proposed updates
branch.

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