1
0
mirror of https://github.com/git/git.git synced 2024-10-06 07:31:21 +02:00
Commit Graph

1048 Commits

Author SHA1 Message Date
Junio C Hamano
0acfc97252 [PATCH] git-format-patch: Prepare patches for e-mail submission.
This is the script I use to prepare patches for e-mail submission.

Signed-off-by: Junio C Hamano <junkio@cox.net>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
2005-07-07 18:07:12 -07:00
Linus Torvalds
924e121954 Mark more characters shell-safe.
I still worry about just quoting things when passing it off to "ssh" or
"sh -c", so I'm being anal.  But _, ^ and , are certainly ok and while
both ~ and @ can have speacial meaning to shell/ssh they are benign.
2005-07-07 17:59:23 -07:00
Linus Torvalds
659cacf5a9 git-fsck-cache: don't complain about lacking references when they are all in packs.
We used to not count them at all, which then made us complain that there
were no refs.
2005-07-07 17:05:41 -07:00
Linus Torvalds
e27a56a676 Merge master.kernel.org:/pub/scm/linux/kernel/git/chrisw/git 2005-07-07 15:56:49 -07:00
Junio C Hamano
1038f0c0a1 [PATCH] Typofix an error message in pack-check.c
The current error message does not make any sense.

Signed-off-by: Junio C Hamano <junkio@cox.net>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
2005-07-07 15:54:57 -07:00
Junio C Hamano
776566000f [PATCH] Prevent t6000 series from dropping useless sed.script in t/
The Makefile in the test suite directory considers any file
matching t[0-9][0-9][0-9][0-9]-*.sh as the top-level test script
to be executed.  Unfortunately this was not documented, and the
common test library, t6000-lib.sh was named to match that
pattern.  This caused t6000-lib.sh to be called from Makefile as
the top-level program, causing it to leave t/sed.script file
behind.  Rename it to t6000lib.sh to prevent this, and document
the naming convention a bit more clearly.

Signed-off-by: Junio C Hamano <junkio@cox.net>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
2005-07-07 15:53:35 -07:00
Junio C Hamano
e95ab1edf3 [PATCH] Short-circuit git-clone-pack while cloning locally (take 2).
When we are cloning a repository on a local filesystem, it is
faster to just create a hard linkfarm of .git/object hierarchy
and copy the .git/refs files.  By default, the script uses the
clone-pack method, but it can be told with the -l flag to do the
hard linkfarm (falling back on recursive file copy) to replicate
the .git/object hierarchy.

Signed-off-by: Junio C Hamano <junkio@cox.net>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
2005-07-07 15:53:35 -07:00
Chris Wright
a9db297485 Infrastructure for git rpm builds. Adds GIT_VERSION to Makefile and new make
targets: git.spec, dist, and rpm.  A simple 'make rpm' will build the rpm.
Also adds git.spec.in which is used to generate git.spec.

Signed-off-by: Chris Wright <chrisw@osdl.org>
2005-07-07 13:09:50 -07:00
Linus Torvalds
dd7ba8b494 git-clone-pack: fix sparse warning
Local function that wasn't marked static
2005-07-06 18:51:56 -07:00
Jon Seymour
84b18a8e63 [PATCH] Tidy up - remove use of (*f)() idiom from epoch.c
Replace (*f)() with f() where the former idiom was used in epoch.c

Signed-off-by: Jon Seymour <jon.seymour@gmail.com>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
2005-07-06 18:47:38 -07:00
Jon Seymour
a7336ae514 [PATCH] Ensure list insertion method does not depend on position of --merge-order argument
This change ensures that git-rev-list --merge-order produces the same result
irrespective of what position the --merge-order argument appears in the argument
list.

Signed-off-by: Jon Seymour <jon.seymour@gmail.com>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
2005-07-06 18:03:53 -07:00
Jon Seymour
28346d2d3c [PATCH] Write sed script directly into temp file, rather than a variable
When sed uses \n rather than ; as a separator (for BSD sed(1) compat),
it is cleaner to use a file directly, rather than an environment
variable containing \n characters.

This change changes t/t6000 write to sed.script directly and changes
the other tests to remove knowledge of sed.script.

Signed-off-by: Jon Seymour <jon.seymour@gmail.com>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
2005-07-06 18:00:28 -07:00
Jon Seymour
f573571a21 [PATCH] Add t/t6003 with some --topo-order tests
Signed-off-by: Jon Seymour <jon.seymour@gmail.com>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
2005-07-06 18:00:28 -07:00
Linus Torvalds
889adfe314 Make gitk use --topo-order instead of --merge-order
It's cheaper to calculate, and doesn't give different results depending
on the order of the arguments passed in (and is thus more appropriate
for something like gitk that can validly take the unordered "--all" flag
to show all branches).

The previous dup fix seems to have fixed --topo-order.  Holler if you
still see problems.
2005-07-06 16:55:53 -07:00
Linus Torvalds
960cea2dd1 git-rev-list: remove the DUPCHECK logic, use SEEN instead
That's what we should have done in the first place, since it not only
avoids another unnecessary flag, it also protects the commits from
showing up as duplicates later when they show up as parents of another
commit (in the pop_most_recent_commit() path).

This will hopefully also fix --topo-sort.
2005-07-06 16:52:49 -07:00
Linus Torvalds
e6c3505b44 Make sure we generate the whole commit list before trying to sort it topologically
This was my cherry-pickng merge bug.  But topo-order still shows strange
behaviour with multiple heads, so keep gitk using --merge-order for now.
2005-07-06 10:51:43 -07:00
Junio C Hamano
f312de018b [PATCH] Let umask do its work upon filesystem object creation.
IIRC our strategy was to let the users' umask take care of the
final mode bits.  This patch fixes places that deviate from it.

Signed-off-by: Junio C Hamano <junkio@cox.net>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
2005-07-06 10:39:59 -07:00
Junio C Hamano
b2cb94254b [PATCH] clone-pack.c:write_one_ref() - Create leading directories.
The function write_one_ref() is passed the list of refs received
from the other end, which was obtained by directory traversal
under $GIT_DIR/refs; this can contain paths other than what
git-init-db prepares and would fail to clone when there is
such.

Signed-off-by: Junio C Hamano <junkio@cox.net>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
2005-07-06 10:39:58 -07:00
Jon Seymour
ff9206e72c [PATCH] Fixes a problem with --merge-order A B (A is linear descendent of a merge B)
This patch passes the test case introduced by the previous patch.

Signed-off-by: Jon Seymour <jon.seymour@gmail.com>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
2005-07-06 10:29:30 -07:00
Jon Seymour
4d3a63ba3a [PATCH] Add a t/t6001 test case for a --merge-order bug
This test case demonstrates a problem with --merge-order.

A
|
B
|\
C D
|/
E
|
F

git-rev-list --merge-order A B doesn't produce the expected output of

A
B
D
C
E
F

The problem is fixed by a subsequent patch.

Signed-off-by: Jon Seymour <jon.seymour@gmail.com>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
2005-07-06 10:29:30 -07:00
Jon Seymour
d2775a817a [PATCH] Tidy up - slight simplification of rev-list.c
This patch implements a small tidy up of rev-list.c to reduce
(but not eliminate) the amount of ugliness associated
with the merge_order flag.

Signed-off-by: Jon Seymour <jon.seymour@gmail.com>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
2005-07-06 10:28:02 -07:00
Linus Torvalds
d2d02a4906 Add "--topo-order" flag to use new topological sort 2005-07-06 10:25:04 -07:00
Jon Seymour
ab580acea4 [PATCH] Add a topological sort procedure to commit.c
This introduces an in-place topological sort procedure to commit.c.

Given a list of commits, sort_in_topological_order() will perform an in-place
topological sort of that list.

The invariant that applies to the resulting list is:

       a reachable from b => ord(b) < ord(a)

This invariant is weaker than the --merge-order invariant, but is cheaper
to calculate (assuming the list has been identified) and will serve any
purpose where only a minimal topological order guarantee is required.

Signed-off-by: Jon Seymour <jon.seymour@gmail.com>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
2005-07-06 10:19:04 -07:00
Linus Torvalds
9e9824ba0e Use the new git-rev-parse "--[no-]flags" in "git diff".
This allows you to do

	git diff v2.6.12..v2.6.13-rc1 drivers/pcmcia

to see the diff between v2.6.12 and v2.6.13-rc1 as limited by the
filename argument.
2005-07-06 10:09:58 -07:00
Linus Torvalds
f79b65aa65 Add "--flags" and "--no-flags" arguments to git-rev-parse
The scripts that use this (notably "git diff") will want to split up
flags and file arguments.
2005-07-06 10:08:08 -07:00
Linus Torvalds
bce6286670 Remove insane overlapping bit ranges from epoch.c
..and move the DUPCHECK to rev-list.c since both the merge-order and the
upcoming topo-sort get confused by dups.
2005-07-06 09:56:16 -07:00
Linus Torvalds
7e21c29b56 Clean up commit insertion in git-rev-list
Jon wants the commits in a different order for merge-order.
2005-07-06 09:38:06 -07:00
Linus Torvalds
f755494cec Make "insert_by_date()" match "commit_list_insert()"
Same argument order, same return type.  This allows us to use a function
pointer to choose one over the other.
2005-07-06 09:31:17 -07:00
Jon Seymour
f6069c5995 [PATCH] Change the sed seperator in t/t6000-lib.sh.
This trivial patch removes the semicolon as the sed seperator in the t/t6000-lib.sh test script
and replaces it with white space.  This makes BSD sed(1) much happier.

Signed-off-by: Mark Allen <mrallen1@yahoo.com>
Signed-off-by: Jon Seymour <jon.seymour@gmail.com>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
2005-07-06 09:26:13 -07:00
Jon Seymour
8904591a9b [PATCH] Introduce unit tests for git-rev-list --bisect
This patch introduces some unit tests for the git-rev-list --bisect functionality.

Signed-off-by: Jon Seymour <jon.seymour@gmail.com>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
2005-07-06 09:26:13 -07:00
Jon Seymour
ce11895d5c [PATCH] Factor out useful test case infrastructure from t/t6001... into t/t6000-lib.sh
Functions that are useful to other t6xxx testcases are moved into t6000-lib.sh

To use these functions in a test case, use a test-case pre-amble like:

. ./test-lib.sh
. ../t6000-lib.sh # t6xxx specific functions

Signed-off-by: Jon Seymour <jon.seymour@gmail.com>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
2005-07-06 09:26:13 -07:00
Sven Verdoolaege
c619ad510b [PATCH] Fix fd leak in git-cvsimport-script
Remember to close temporary file

Signed-off-by: Linus Torvalds <torvalds@osdl.org>
2005-07-06 08:47:08 -07:00
Junio C Hamano
5b35bcd53a [PATCH] sha1_file.c;prepare_packed_git_one() - fix DIR leak
The function calls opendir() without a matching closedir().

Signed-off-by: Junio C Hamano <junkio@cox.net>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
2005-07-06 08:47:08 -07:00
Linus Torvalds
b43d44779b Merge master.kernel.org:/pub/scm/gitk/gitk 2005-07-05 19:00:26 -07:00
Linus Torvalds
f17a1b1bec Fix up path-cleanup in git_path() properly
GIT_DIR=.  ends up being what some of the pack senders use, and we
sometimes messed up when cleaning up the path, ie a ".//HEAD" was
cleaned up into "/HEAD", not "HEAD" like it should be.

We should do some other cleanup, and probably also verify that symlinks
don't point to outside the git area.
2005-07-05 18:10:59 -07:00
Linus Torvalds
319aae2756 Increase the number of possible heads requested from git-upload-pack
Now that git-clone-pack exists, we actually have somebody requesting
more than just a single head in a pack.  So allow the Jeff's of this
world to clone things with tens of heads.
2005-07-05 17:19:20 -07:00
Linus Torvalds
0271611e39 Add a "git-show-index" helper that shows the contents of a pack index
This was invaluable for debugging the zero-sized compression issue, and
might be useful for scripting too, if people want to see the contents of
a pack.
2005-07-05 17:08:02 -07:00
Linus Torvalds
291ec0f2d2 Don't special-case a zero-sized compression.
zlib actually writes a header for that case, and while ignoring that
header will get us the right data, it will also end up messing up our
stream position.  So we actually want zlib to "uncompress" even an empty
object.
2005-07-05 17:06:09 -07:00
Linus Torvalds
72347a233e Make "git clone" use the new git-clone-pack 2005-07-05 15:47:34 -07:00
Linus Torvalds
1fcc8ea55d Add "git-clone-pack" program to help with "git clone" 2005-07-05 15:45:37 -07:00
Linus Torvalds
2f34ba32dd Fix silly thinko in "head_ref()"
It did a "for_each_ref()" in addition to the HEAD case, which was a
left-over from an early broken test.
2005-07-05 15:45:00 -07:00
Linus Torvalds
41cb7488b9 Move "get_ack()" to common git_connect functions
git-clone-pack will want it too. Soon.
2005-07-05 15:44:09 -07:00
Linus Torvalds
4f7770c87c Remove multi-head support from fetch-pack
It was a misguided attempt to mix fetching and cloning. I'll make
a separate clone thing.
2005-07-05 14:39:30 -07:00
Linus Torvalds
12ba7eaf1d Remove unnecessary usage of strncmp() in git-rev-list arg parsing.
Not only is it unnecessary, it incorrectly allows extraneous characters
at the end of the argument.

Junio noticed the --merge-order thing, and Jon points out that if we fix
that one, we should fix --show-breaks too.
2005-07-05 12:12:50 -07:00
Linus Torvalds
bbca20acce Merge head 'cvs2git' of http://netz.smurf.noris.de/git/git 2005-07-05 12:03:14 -07:00
Linus Torvalds
f03f2ba0a5 Work around git-http-pull breakage in git-fetch-script
Need to add a final slash.  And make it verbose by default, since it's
so slow that otherwise people will think it's died.
2005-07-05 12:02:10 -07:00
Linus Torvalds
0a623e7ce8 git-fetch-script: use git-fetch-pack for local and ssh fetches.
Also, clean it up a lot.
2005-07-05 11:38:37 -07:00
Linus Torvalds
723c31fea2 Add "git_path()" and "head_ref()" helper functions.
"git_path()" returns a static pathname pointer into the git directory
using a printf-like format specifier.

"head_ref()" works like "for_each_ref()", except for just the HEAD.
2005-07-05 11:31:32 -07:00
Matthias Urlichs
f4b3a4c30b Merge with Linus' current tree 2005-07-05 15:32:29 +02:00
Matthias Urlichs
f13bbe7f56 Merge with http://www.liacs.nl/~sverdool/git.git#cvs2git 2005-07-05 14:23:36 +02:00