summaryrefslogtreecommitdiff
AgeCommit message (Collapse)AuthorFilesLines
2005-07-06[PATCH] Ensure list insertion method does not depend on position of ↵Libravatar Jon Seymour1-4/+2
--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[PATCH] Write sed script directly into temp file, rather than a variableLibravatar Jon Seymour4-33/+7
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[PATCH] Add t/t6003 with some --topo-order testsLibravatar Jon Seymour1-0/+417
Signed-off-by: Jon Seymour <jon.seymour@gmail.com> Signed-off-by: Linus Torvalds <torvalds@osdl.org>
2005-07-06Make gitk use --topo-order instead of --merge-orderLibravatar Linus Torvalds1-1/+1
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-06git-rev-list: remove the DUPCHECK logic, use SEEN insteadLibravatar Linus Torvalds1-3/+2
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-06Make sure we generate the whole commit list before trying to sort it ↵Libravatar Linus Torvalds1-0/+1
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[PATCH] Let umask do its work upon filesystem object creation.Libravatar Junio C Hamano5-6/+6
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[PATCH] clone-pack.c:write_one_ref() - Create leading directories.Libravatar Junio C Hamano3-1/+25
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[PATCH] Fixes a problem with --merge-order A B (A is linear descendent of a ↵Libravatar Jon Seymour1-1/+1
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[PATCH] Add a t/t6001 test case for a --merge-order bugLibravatar Jon Seymour1-0/+20
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[PATCH] Tidy up - slight simplification of rev-list.cLibravatar Jon Seymour1-7/+3
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-06Add "--topo-order" flag to use new topological sortLibravatar Linus Torvalds1-0/+7
2005-07-06[PATCH] Add a topological sort procedure to commit.cLibravatar Jon Seymour2-0/+120
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-06Use the new git-rev-parse "--[no-]flags" in "git diff".Libravatar Linus Torvalds1-2/+3
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-06Add "--flags" and "--no-flags" arguments to git-rev-parseLibravatar Linus Torvalds1-0/+14
The scripts that use this (notably "git diff") will want to split up flags and file arguments.
2005-07-06Remove insane overlapping bit ranges from epoch.cLibravatar Linus Torvalds3-15/+13
..and move the DUPCHECK to rev-list.c since both the merge-order and the upcoming topo-sort get confused by dups.
2005-07-06Clean up commit insertion in git-rev-listLibravatar Linus Torvalds1-1/+4
Jon wants the commits in a different order for merge-order.
2005-07-06Make "insert_by_date()" match "commit_list_insert()"Libravatar Linus Torvalds4-9/+8
Same argument order, same return type. This allows us to use a function pointer to choose one over the other.
2005-07-06[PATCH] Change the sed seperator in t/t6000-lib.sh.Libravatar Jon Seymour1-1/+3
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[PATCH] Introduce unit tests for git-rev-list --bisectLibravatar Jon Seymour1-0/+247
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[PATCH] Factor out useful test case infrastructure from t/t6001... into ↵Libravatar Jon Seymour2-111/+106
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[PATCH] Fix fd leak in git-cvsimport-scriptLibravatar Sven Verdoolaege1-0/+1
Remember to close temporary file Signed-off-by: Linus Torvalds <torvalds@osdl.org>
2005-07-06[PATCH] sha1_file.c;prepare_packed_git_one() - fix DIR leakLibravatar Junio C Hamano1-0/+1
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-05Merge master.kernel.org:/pub/scm/gitk/gitkLibravatar Linus Torvalds1-9/+66
2005-07-05Fix up path-cleanup in git_path() properlyLibravatar Linus Torvalds1-4/+10
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-05Increase the number of possible heads requested from git-upload-packLibravatar Linus Torvalds1-1/+1
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-05Add a "git-show-index" helper that shows the contents of a pack indexLibravatar Linus Torvalds2-1/+30
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-05Don't special-case a zero-sized compression.Libravatar Linus Torvalds1-2/+0
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-05Make "git clone" use the new git-clone-packLibravatar Linus Torvalds1-4/+1
2005-07-05Add "git-clone-pack" program to help with "git clone"Libravatar Linus Torvalds2-1/+209
2005-07-05Fix silly thinko in "head_ref()"Libravatar Linus Torvalds1-2/+2
It did a "for_each_ref()" in addition to the HEAD case, which was a left-over from an early broken test.
2005-07-05Move "get_ack()" to common git_connect functionsLibravatar Linus Torvalds3-18/+20
git-clone-pack will want it too. Soon.
2005-07-05Remove multi-head support from fetch-packLibravatar Linus Torvalds1-38/+3
It was a misguided attempt to mix fetching and cloning. I'll make a separate clone thing.
2005-07-05Remove unnecessary usage of strncmp() in git-rev-list arg parsing.Libravatar Linus Torvalds1-2/+2
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-05Merge head 'cvs2git' of http://netz.smurf.noris.de/git/gitLibravatar Linus Torvalds5-367/+831
2005-07-05Work around git-http-pull breakage in git-fetch-scriptLibravatar Linus Torvalds1-1/+2
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-05git-fetch-script: use git-fetch-pack for local and ssh fetches.Libravatar Linus Torvalds1-33/+18
Also, clean it up a lot.
2005-07-05Add "git_path()" and "head_ref()" helper functions.Libravatar Linus Torvalds7-14/+37
"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-05Merge with Linus' current treeLibravatar Matthias Urlichs5-367/+831
2005-07-05Merge with http://www.liacs.nl/~sverdool/git.git#cvs2gitLibravatar Matthias Urlichs1-54/+95
2005-07-05cvsimport: getopt accepted a -q option (undocumented and unused).Libravatar Matthias Urlichs1-1/+1
Removed.
2005-07-05git-cvsimport-script: move working directory forwardLibravatar Sven Verdoolaege1-5/+27
If HEAD happened to point to a cvs branch, move the working directory forward to the tip of the branch. Additionally, if master and "origin" are equal, move master forward to new origin first.
2005-07-04git-rev-list: make sure the output is sorted by recencyLibravatar Linus Torvalds1-1/+1
We didn't sort the refs by date, so if you had multiple refs, the end result would not be properly sorted.
2005-07-04Make rev-list flush the stdio buffers after each rev.Libravatar Linus Torvalds1-1/+2
We'd rather get the revisions in a slow but timely manner than have to wait for them.
2005-07-04Make git-fetch-pack actually do all the unpacking etc.Libravatar Linus Torvalds2-25/+100
It returns the result SHA1 on stdout, so you can do remote=$(git-fetch-pack host:dir branchname) and it will unpack the objects and "remote" will be the SHA1 name of the branch on the other side. You can then save that off, or merge it, or whatever.
2005-07-04Make git-fetch-pack and git-upload-pack negotiate needs/haves fullyLibravatar Linus Torvalds2-10/+116
Now the only piece missing is actually generating the pack-file.
2005-07-04Clean up output of "for_each_ref()" when GIT_DIR is "."Libravatar Linus Torvalds1-0/+5
Remove the "./" at the head, it just looks much nicer.
2005-07-04git-cvsimport-script: remove unused variableLibravatar Sven Verdoolaege1-2/+0
2005-07-04Commit first cut at "git-fetch-pack"Libravatar Linus Torvalds3-4/+216
It's meant to be used by "git fetch" for the local and ssh case. It doesn't actually do the fetching now, but it does discover the common commit point.
2005-07-04Move ref path matching to connect.c libraryLibravatar Linus Torvalds3-21/+22
It's a generic thing for matching refs from the other side.