1
0
Fork 0
mirror of https://github.com/git/git.git synced 2024-11-14 21:23:03 +01:00
Commit graph

29048 commits

Author SHA1 Message Date
Sven Verdoolaege
866d13108e git-cvsimport-script: typo head -> heads 2005-07-03 23:40:48 +02:00
Linus Torvalds
2396ec85bd Add "git-prune-packed" that removes objects that exist in a pack.
This, together with "git repack" can be used to clean up unpacked
git archives.
2005-07-03 14:27:34 -07:00
Linus Torvalds
b2d46199d2 Add "git repack" command that does an incremental pack 2005-07-03 13:38:01 -07:00
Linus Torvalds
1c4a291202 Add "--non-empty" flag to git-pack-objects
It skips writing the pack-file if it ends up being empty.
2005-07-03 13:36:58 -07:00
Linus Torvalds
12d2a18780 "git rev-list --unpacked" shows only unpacked commits
More infrastructure to do efficient incremental packs.
2005-07-03 13:29:54 -07:00
Linus Torvalds
eb019375ab Add "--incremental" flag to git-pack-objects
It won't add an object that is already in a pack to the new pack.
2005-07-03 13:08:40 -07:00
Linus Torvalds
960bba0d8c Add "--all" flag to rev-parse that shows all refs
And make git-rev-list just silently ignore non-commit refs if we're not
asking for all objects.
2005-07-03 13:07:52 -07:00
Linus Torvalds
dade09c226 Add "has_sha1_pack()" function to query whether the object is available in a pack
We'll want this for incremental packing.
2005-07-03 13:06:36 -07:00
Linus Torvalds
c33303839c Make git-fsck-cache check HEAD integrity
In particular, check that it's a symlink, and points to refs/heads/.  We
depend on that these days not only for "git checkout", but also because
fsck and others only check for references in the .git/refs/
subdirectory, not things like HEAD itself.
2005-07-03 10:40:38 -07:00
Linus Torvalds
6da4016aea Fix sparse warnings.
Mainly making a lot of local functions and variables be marked "static",
but there was a "zero as NULL" warning in there too.
2005-07-03 10:10:45 -07:00
Matthias Urlichs
9da07f3493 cvsimport: Missing tests for verbosity flag. 2005-07-03 19:03:30 +02:00
Linus Torvalds
44c9e8594e Fix up header file dependencies and add sparse checking rules
We're pretty sparse-clean already, thanks to earlier efforts, but some
things inevitably creep in.
2005-07-03 10:02:35 -07:00
Linus Torvalds
944d858969 Fix up "for_each_ref()" to be more usable, and use it in git-fsck-cache
It needed to take the GIT_DIR information into account, something that
the original receive-pack usage just never cared about.
2005-07-03 10:01:38 -07:00
Linus Torvalds
7ec4e60819 Fix gcc warning in send-pack.c
send_pack() was declared to return "int" (although nobody cared), but
didn't actually return anything.
2005-07-03 10:00:01 -07:00
Linus Torvalds
4d235c8044 Avoid gcc warnings in sha1_file.c
A couple of bogus "might be used undefined" warnings are avoided
by moving the initializations unnecessarily early.
2005-07-03 09:58:44 -07:00
Sven Verdoolaege
34155390a5 Support :ext: access method. 2005-07-03 13:02:06 +02:00
Sven Verdoolaege
8d0ea31175 Honour CVS_SERVER. 2005-07-03 12:26:51 +02:00
Sven Verdoolaege
a92bebe697 git-cvsimport-script: clean up documentation
Remove documentation of irrelevant "type" option.

Signed-off-by: Sven Verdoolaege <skimo@kotnet.org>
2005-07-03 11:40:45 +02:00
Sven Verdoolaege
f9714a4a0c Make specification of CVS module to convert optional.
If we're inside a checked out CVS repository, there is
no need to explicitly specify the module as it is
available in CVS/Repository.
Also read CVS/Root if it's available and -d is not specified.
Finally, explicitly pass root to cvsps as CVS/Root takes
precedence over CVSROOT.

Signed-off-by: Sven Verdoolaege <skimo@kotnet.org>
2005-07-03 11:40:44 +02:00
Sven Verdoolaege
1cd3674add Fixed a typo in Documentation/git-cvsimport-script.txt. 2005-07-03 09:43:00 +02:00
Linus Torvalds
8a65ff7666 Generalize the "show each ref" code in receice-pack
This turns it into a generic "do xyz for each ref" library function.
2005-07-02 20:23:36 -07:00
Junio C Hamano
ad8c80a58f [PATCH] Show more details of packfile with verify-pack -v.
This implements show_pack_info() function used in verify-pack
command when -v flag is used to obtain something like
unpack-objects used to give when it was first written.

It shows the following for each non-deltified object found in
the pack:

    SHA1 type size offset

For deltified objects, it shows this instead:

    SHA1 type size offset depth base_sha1

In order to get the output in the order that appear in the pack
file for debugging purposes, you can do this:

 $ git-verify-pack -v packfile | sort -n -k 4,4

Signed-off-by: Junio C Hamano <junkio@cox.net>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
2005-06-30 22:33:47 -07:00
Junio C Hamano
f3bf922409 [PATCH] verify-pack updates.
Nico pointed out that having verify_pack.c and verify-pack.c was
confusing.  Rename verify_pack.c to pack-check.c as suggested,
and enhances the verification done quite a bit.

 - Built-in sha1_file unpacking knows that a base object of a
   deltified object _must_ be in the same pack, and takes
   advantage of that fact.

 - Earlier verify-pack command only checked the SHA1 sum for the
   entire pack file and did not look into its contents.  It now
   checks everything idx file claims to have unpacks correctly.

 - It now has a hook to give more detailed information for
   objects contained in the pack under -v flag.

Signed-off-by: Junio C Hamano <junkio@cox.net>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
2005-06-30 22:33:47 -07:00
Junio C Hamano
c62266f37c [PATCH] Avoid unnecessarily inflating and interpreting delta
This teaches packed_delta_info() that it only needs to look at
the type of the base object to figure out both type and size of
a deltified object.  This saves quite a many calls to inflate()
when dealing with a deep delta chain.

Signed-off-by: Junio C Hamano <junkio@cox.net>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
2005-06-30 22:33:47 -07:00
Matthias Urlichs
f21140605c cvsimport: add documentation. 2005-06-30 22:54:33 +02:00
Matthias Urlichs
2be4fcc345 cvsimport: Added option '-p': pass options to cvsps
Added option '-x' to cvsps call
2005-06-30 22:54:01 +02:00
Matthias Urlichs
4c24e089a3 cvsimport: Exit if an existing repository doesn't have the right branch. 2005-06-30 22:10:32 +02:00
Matthias Urlichs
e371046b64 cvs import: Strip whitespace at the end of the log entry
for compatibility with old cvs2git.
2005-06-30 22:09:42 +02:00
Linus Torvalds
d0efc8a71d Do ref matching on the sender side rather than on receiver
This makes the receiver always send a full list of valid refs, which
will allow us to do better packs, as well as handle creation of new
refs.  Eventually.  Right now we just moved the matching and enabled it.

So now you can do

	git-send-pack host:path branch1 branch2

to only send branches "branch1" and "branch2".
2005-06-30 12:28:24 -07:00
Linus Torvalds
f65fdf04a1 Add support for "forcing" a ref on the remote side
A "old ref" of all zeroes is considered a "don't care" ref, and allows
us to say "write the new ref regardless of what the old ref contained
(or even if it existed at all)".

This allows (if git-send-pack were to do it) creating new refs, and
fixing up old ones.
2005-06-30 11:04:59 -07:00
Linus Torvalds
94fdb7aa17 git-send-pack: actually send the object pack
This concludes this lesson.  I've actually successfully sent an update
using the git-send-pack command.

Probably tons of work still to do, and nasty debugging, but it's now
actually potentially useful.
2005-06-30 10:17:39 -07:00
Linus Torvalds
2eca23daf5 git-receive-pack: implement ref switch command handling
After unpacking the object pack successfully, we go through the list of
refs, and verify that they still contain their expected values.  Then we
replace them with the new ones.
2005-06-30 10:15:22 -07:00
Sven Verdoolaege
0fa2824f35 cvsimport: perform string comparison on "HEAD" 2005-06-30 17:23:22 +02:00
Matthias Urlichs
dbc1aeace6 git-cvsimport-script: Removed redundant @old and @new clear. 2005-06-30 12:28:31 +02:00
Matthias Urlichs
4f7c0caa8f git-cvsimport-script: Remove setting Sticky; it may cause problems 2005-06-30 12:19:48 +02:00
Matthias Urlichs
4abdecbf85 cvs import: Call git-update-cache multiple times
instead of with a too-long argument list.
2005-06-30 11:55:57 +02:00
Linus Torvalds
56b6ed8881 Add comment on what send-pack still needs to do
Me tired.
2005-06-29 23:07:01 -07:00
Linus Torvalds
eb1af2df0b git-receive-pack: start parsing ref update commands
We don't act on them yet, but we parse them.
2005-06-29 23:01:14 -07:00
Linus Torvalds
7f8e982834 Slow but steady progress on git pack receive/send 2005-06-29 22:50:48 -07:00
Linus Torvalds
e4b5c7fff4 git-send-pack: start parsing local/remote reference differences
Right now it just shows which refs it picks up, and whether they are
the same or changed on the remote end. Getting there..
2005-06-29 22:31:41 -07:00
Linus Torvalds
1a3e71767c Turn on optimization again
It got turned off by mistake just because I had been doing debugging,
and committed the Makefile that had other changes ...
2005-06-29 21:08:21 -07:00
Jon Seymour
9d89d19c48 [PATCH] Remove unnecessary sort from t6001 testcase
This patch removes an unnecessary sort from the t6001 testcase.

Sorts were previously necessary when testing non --merge-order cases
because the output order wasn't entirely deterministic unless commit
date was fixed.

However, commit dates are now fixed, so the need for a sort has
disappeared.  So the sort has been removed.

Signed-off-by: Jon Seymour <jon.seymour@gmail.com>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
2005-06-29 20:53:10 -07:00
Jon Seymour
3ed3567890 [PATCH] Fix broken t6001 test case
This fix fixes a t/t6001 test case break that was hidden by a bug in the
test case infrastructure.

Signed-off-by: Jon Seymour <jon.seymour@gmail.com>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
2005-06-29 20:53:10 -07:00
Jon Seymour
2ba1beebd3 [PATCH] Demonstrate broken t6001 test case function
Junio discovered a problem where an actual test case break was hidden
because pipelines are not handled properly by the test infrastructure in
t6001.

This patch fixes the broken infrastructure (and demonstrates the break
explicitly).

A subsequent patch in this series will fix the test case so that it
doesn't fail.

Signed-off-by: Jon Seymour <jon.seymour@gmail.com>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
2005-06-29 20:53:10 -07:00
Jon Seymour
99c2bc9300 [PATCH] Fix for git-rev-list --merge-order B ^A (A,B share common base) [rev 2]
This patch makes --merge-order produce the same list as git-rev-list
without --merge-order specified.

In particular, if the graph looks like this:

A
| B
|/
C
|
D

The both git-rev-list B ^A and git-rev-list --merge-order will produce B.

The unit tests have been changed to reflect the fact that the prune
points are now formally part of the start list that is used to perform
the --merge-order sort.

That is: git-rev-list --merge-order A ^D used to produce

= A
| C

It now produces:

^ A
| C

Signed-off-by: Jon Seymour <jon.seymour@gmail.com>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
2005-06-29 20:53:10 -07:00
Jon Seymour
da4b932a0c [PATCH] Test case that demonstrates problem with --merge-order ^ processing
Added a test case that shows that --merge-order doesn't produce the
correct result in the following case.

A
|
| B
|/
C
|
D

git-rev-list --merge-order A ^B should produce just A. Instead
it produces BCD.

A subsequent patch will fix this defect.

Signed-off-by: Jon Seymour <jon.seymour@gmail.com>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
2005-06-29 20:53:10 -07:00
Linus Torvalds
f3a3214e83 Make send/receive-pack be closer to doing something interesting 2005-06-29 20:50:15 -07:00
Linus Torvalds
61221472a5 Start of "git-send-pack", the local part of sending off a pack
Like git-receive-pack, this is only partway done.
2005-06-29 19:09:05 -07:00
Linus Torvalds
575f497456 Add first cut at "git-receive-pack"
It's not working yet, but it's at the point where I want to be able to
track my changes.  The theory of operation is that this is the "remote"
side of a "git push".  It can tell us what references the remote side
has, receives out reference update commands and a pack-file, and can
execute the unpacking command.
2005-06-29 17:52:11 -07:00
Linus Torvalds
ad6ce07c44 Remove bogus dup commit warning with --merge-order
It makes gitk unhappy, and besides, non-merge-order doesn't complain, so
why do it here..
2005-06-29 11:40:58 -07:00