Horst von Brand [Fri, 16 Sep 2005 04:08:24 +0000 (00:08 -0400)]
[PATCH] Require less in RPM spec
... and the next one will be the one to do Debian, naturally.
Signed-off-by: Junio C Hamano <junkio@cox.net>
Junio C Hamano [Fri, 16 Sep 2005 00:38:26 +0000 (17:38 -0700)]
Revert breakage introduced by
c80522e30fdc190f8c8c7fc983bbe040a1b03e93.
Signed-off-by: Junio C Hamano <junkio@cox.net>
jdl@freescale.com [Thu, 15 Sep 2005 22:40:13 +0000 (17:40 -0500)]
[PATCH] Documentation/git-rev-list.txt typo fix
Fix the "superscript" problem on the git-rev-list doc page.
Signed-off-by: Jon Loeliger <jdl@freescale.com>
Signed-off-by: Junio C Hamano <junkio@cox.net>
Linus Torvalds [Thu, 15 Sep 2005 22:14:29 +0000 (15:14 -0700)]
[PATCH] Re-organize "git-rev-list --objects" logic
The logic to calculate the full object list used to be very inter-twined
with the logic that looked up the commits.
For no good reason - it's actually a lot simpler to just do that logic
as a separate pass.
This improves performance a bit, and uses slightly less memory in my
tests, but more importantly it makes the code simpler to work with and
follow what it does.
The performance win is less than I had hoped for, but I get:
Before:
[torvalds@g5 linux]$ /usr/bin/time git-rev-list --objects v2.6.12..HEAD | wc -l
13.64user 0.42system 0:14.13elapsed 99%CPU (0avgtext+0avgdata 0maxresident)k
0inputs+0outputs (0major+47947minor)pagefaults 0swaps
58945
After:
[torvalds@g5 linux]$ /usr/bin/time git-rev-list --objects v2.6.12..HEAD | wc -l
11.80user 0.36system 0:12.16elapsed 99%CPU (0avgtext+0avgdata 0maxresident)k
0inputs+0outputs (0major+42684minor)pagefaults 0swaps
58945
ie it improved by 2 seconds, and took a 5000+ fewer pages (hey, that's
20MB out of 174MB to go). And got the same number of objects (in theory,
the more expensive one might find some more shared objects to avoid. In
practice it obviously doesn't).
I know how to make it use _lots_ less memory, which will probably speed it
up. But that's for another time, and I'd prefer to see this go in first.
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
Signed-off-by: Junio C Hamano <junkio@cox.net>
Junio C Hamano [Thu, 15 Sep 2005 23:13:43 +0000 (16:13 -0700)]
Plug diff leaks.
It is a bit embarrassing that it took this long for a fix since the
problem was first reported on Aug 13th.
Message-ID: <87y876gl1r.wl@mail2.atmark-techno.com>
From: Yasushi SHOJI <yashi@atmark-techno.com>
Newsgroups: gmane.comp.version-control.git
Subject: [patch] possible memory leak in diff.c::diff_free_filepair()
Date: Sat, 13 Aug 2005 19:58:56 +0900
This time I used valgrind to make sure that it does not overeagerly
discard memory that is still being used.
Signed-off-by: Junio C Hamano <junkio@cox.net>
Junio C Hamano [Thu, 15 Sep 2005 22:06:39 +0000 (15:06 -0700)]
Avoid wasting memory while keeping track of what we have during fetch.
Signed-off-by: Junio C Hamano <junkio@cox.net>
Linus Torvalds [Thu, 15 Sep 2005 21:43:17 +0000 (14:43 -0700)]
[PATCH] Avoid wasting memory in git-rev-list
As pointed out on the list, git-rev-list can use a lot of memory.
One low-hanging fruit is to free the commit buffer for commits that we
parse. By default, parse_commit() will save away the buffer, since a lot
of cases do want it, and re-reading it continually would be unnecessary.
However, in many cases the buffer isn't actually necessary and saving it
just wastes memory.
We could just free the buffer ourselves, but especially in git-rev-list,
we actually end up using the helper functions that automatically add
parent commits to the commit lists, so we don't actually control the
commit parsing directly.
Instead, just make this behaviour of "parse_commit()" a global flag.
Maybe this is a bit tasteless, but it's very simple, and it makes a
noticable difference in memory usage.
Before the change:
[torvalds@g5 linux]$ /usr/bin/time git-rev-list v2.6.12..HEAD > /dev/null
0.26user 0.02system 0:00.28elapsed 99%CPU (0avgtext+0avgdata 0maxresident)k
0inputs+0outputs (0major+3714minor)pagefaults 0swaps
after the change:
[torvalds@g5 linux]$ /usr/bin/time git-rev-list v2.6.12..HEAD > /dev/null
0.26user 0.00system 0:00.27elapsed 100%CPU (0avgtext+0avgdata 0maxresident)k
0inputs+0outputs (0major+2433minor)pagefaults 0swaps
note how the minor faults have decreased from 3714 pages to 2433 pages.
That's all due to the fewer anonymous pages allocated to hold the comment
buffers and their metadata.
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
Signed-off-by: Junio C Hamano <junkio@cox.net>
Junio C Hamano [Thu, 15 Sep 2005 21:56:37 +0000 (14:56 -0700)]
Be more backward compatible with git-ssh-{push,pull}.
HPA reminded me that these programs knows about the name of the
counterpart on the other end and simply symlinking the old name to
new name locally would not be enough.
Signed-off-by: Junio C Hamano <junkio@cox.net>
H. Peter Anvin [Thu, 15 Sep 2005 19:33:14 +0000 (12:33 -0700)]
[PATCH] rsh.c env and quoting cleanup, take 2
This patch does proper quoting, and uses "env" to be compatible with
tcsh. As a side benefit, I believe the code is a lot cleaner to read.
[jc: I am accepting this not because I necessarily agree with the
quoting approach taken by it, but because (1) the code is only used
by ssh-fetch/ssh-upload pair which I do not care much about (if you
have ssh account on the remote end you should be using git-send-pack
git-fetch-pack pair over ssh anyway), and (2) HPA is one of the more
important customers belonging to the Linux kernel community and I
want to help his workflow -- which includes not wasting his time by
asking him to switch to git-send-pack/git-fetch-pack pair, nor to use
a better shell ;-). I might not have taken this patch if it mucked
with git_connect in connect.c in its current form.]
Signed-off-by: H. Peter Anvin <hpa@zytor.com>
Signed-off-by: Junio C Hamano <junkio@cox.net>
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>
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>
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>
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>
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>
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)
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>
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.
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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 (—) 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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
Junio C Hamano [Wed, 7 Sep 2005 22:59:24 +0000 (15:59 -0700)]
GIT 0.99.6
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>
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>
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>
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>
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>
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>
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>
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>
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>
Junio C Hamano [Tue, 6 Sep 2005 20:51:33 +0000 (13:51 -0700)]
Merge branch 'master' of .
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>