aboutsummaryrefslogtreecommitdiff
Commit message (Collapse)AuthorAge
* unpack-objects: fix --strict handlingJunio C Hamano2008-03-05
| | | | | | | | | | Earlier attempt (which was reverted) called added_object() (by the way, the function should be renamed to resolve_dependents() --- it is called when we have a complete object data, and is responsible to resolve pending deltified objects that use this object as their delta base object) without updating obj_list[nr].sha1 with the correct value. Signed-off-by: Junio C Hamano <gitster@pobox.com>
* t5300: add test for "unpack-objects --strict"Junio C Hamano2008-03-05
| | | | | | | | | | | | | | This adds test for unpacking deltified objects with --strict option. - unpacking full trees with --strict should pass; - unpacking only trees with --strict should be rejected due to missing blobs; - unpacking only trees with --strict into an existing repository with necessary blobs should succeed. Signed-off-by: Junio C Hamano <gitster@pobox.com>
* unpack-objects: prevent writing of inconsistent objectsMartin Koegler2008-03-05
| | | | | | | | | | | | | | This patch introduces a strict mode, which ensures that: - no malformed object will be written - no object with broken links will be written The patch ensures this by delaying the write of all non blob object. These object are written, after all objects they link to are written. An error can only result in unreferenced objects. Signed-off-by: Martin Koegler <mkoegler@auto.tuwien.ac.at> Signed-off-by: Junio C Hamano <gitster@pobox.com>
* fsck.c: fix bogus "empty tree" checkJunio C Hamano2008-03-05
| | | | | | | | | | | | | | | | | | | | | | ba002f3 (builtin-fsck: move common object checking code to fsck.c) did more than what it claimed to. Most notably, it wrongly made an empty tree object an error by pretending to only move code from fsck_tree() in builtin-fsck.c to fsck_tree() in fsck.c, but in fact adding a bogus check to barf on an empty tree. An empty tree object is _unusual_. Recent porcelains try reasonably hard not to let the user create a commit that contains such a tree. Perhaps warning about them in git-fsck may have some merit. HOWEVER. Being unusual and being errorneous are two quite different things. This is especially true now we seem to use the same fsck_$object() code in places other than git-fsck itself. For example, receive-pack should not reject unusual objects, even if it would be a good idea to tighten it to reject incorrect ones. Signed-off-by: Junio C Hamano <gitster@pobox.com>
* Revert "unpack-objects: prevent writing of inconsistent objects"Junio C Hamano2008-03-04
| | | | This reverts commit d5ef408b9afb5b4417f4e7e1593a96302d666650.
* Revert "receive-pack: use strict mode for unpacking objects"Junio C Hamano2008-03-04
| | | | This reverts commit 28f72a0f232dfc71b3be726e7e71d0a6d5f9ebba.
* Merge branch 'maint'Junio C Hamano2008-03-04
|\ | | | | | | | | | | | | | | * maint: Fix 'git remote show' regression on empty repository in 1.5.4 Fix incorrect wording in git-merge.txt. git-merge.sh: better handling of combined --squash,--no-ff,--no-commit options Fix random crashes in http_cleanup()
| * Fix 'git remote show' regression on empty repository in 1.5.4Shawn O. Pearce2008-03-03
| | | | | | | | | | | | | | | | | | | | | | | | | | Back in 18f7c51c we switched git-ls-remote/git-peek-remote to use the transport backend, rather than do everything itself. As part of that switch we started to produce a non-zero exit status if no refs were received from the remote peer, which happens when the remote peer has no commits pushed to it yet. (E.g. "git --git-dir=foo.git init; git ls-remote foo.git") Signed-off-by: Shawn O. Pearce <spearce@spearce.org> Signed-off-by: Junio C Hamano <gitster@pobox.com>
| * Fix incorrect wording in git-merge.txt.Matthieu Moy2008-03-03
| | | | | | | | | | | | | | | | | | | | | | | | A merge is not necessarily with a remote branch, it can be with any commit. Thanks to Paolo Ciarrocchi for pointing out the problem, and to Nicolas Pitre for pointing out the fact that a merge is not necessarily with a branch head. Signed-off-by: Matthieu Moy <Matthieu.Moy@imag.fr> Signed-off-by: Junio C Hamano <gitster@pobox.com>
| * git-merge.sh: better handling of combined --squash,--no-ff,--no-commit optionsGerrit Pape2008-03-03
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | git-merge used to use either the --squash,--no-squash, --no-ff,--ff, --no-commit,--commit option, whichever came last in the command line. This lead to some un-intuitive behavior, having git merge --no-commit --no-ff <branch> actually commit the merge. Now git-merge respects --no-commit together with --no-ff, as well as other combinations of the options. However, this broke a selftest in t/t7600-merge.sh which expected to have --no-ff completely override the --squash option, so that git merge --squash --no-ff <branch> fast-forwards, and makes a merge commit; combining --squash with --no-ff doesn't really make sense though, and is now refused by git-merge. The test is adapted to test --no-ff without the preceding --squash, and another test is added to make sure the --squash --no-ff combination is refused. The unexpected behavior was reported by John Goerzen through http://bing.sdebian.org/468568 Signed-off-by: Gerrit Pape <pape@smarden.org> Signed-off-by: Junio C Hamano <gitster@pobox.com>
| * Fix random crashes in http_cleanup()Mike Hommey2008-03-03
| | | | | | | | | | | | | | | | | | | | | | For some reason, http_cleanup was running all active slots, which could lead in situations where a freed slot would be accessed in fill_active_slots. OTOH, we are cleaning up, which means the caller doesn't care about pending requests. Just forget about them instead or running them. Signed-off-by: Mike Hommey <mh@glandium.org> Signed-off-by: Junio C Hamano <gitster@pobox.com>
* | t3407-rebase-abort.sh: Enhance existing tests, and add test for rebase --mergeMike Hommey2008-03-03
| | | | | | | | | | | | | | | | | | | | | | Removing .dotest should actually not be needed, so just test the directory don't exist after --abort, but exists after starting the rebase. Also, execute the same tests with rebase --merge, which uses a different code path. Signed-off-by: Mike Hommey <mh@glandium.org> Signed-off-by: Junio C Hamano <gitster@pobox.com>
* | git-p4: Fix import of changesets with file deletionsSimon Hausmann2008-03-03
| | | | | | | | | | | | | | | | | | | | | | | | | | Commit 3a70cdfa42199e16d2d047c286431c4274d65b1a made readP4Files abort quickly when the changeset only contains files that are marked for deletion with an empty return value, which caused the commit to not do anything. This commit changes readP4Files to distinguish between files that need to be passed to p4 print and files that have no content ("deleted") and merge them in the returned list. Signed-off-by: Simon Hausmann <simon@lst.de> Signed-off-by: Junio C Hamano <gitster@pobox.com>
* | Fix test for cleanup failure in t7300 on WindowsAlex Riesen2008-03-03
| | | | | | | | | | | | | | | | | | Keep the file open to: the OS does not allow removal of open files. The saner systems just have a saner permission model and chmod 0 is enough for the test. Signed-off-by: Alex Riesen <raa.lkml@gmail.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
* | t6120 (describe): check --long properlyJunio C Hamano2008-03-03
| | | | | | | | | | | | | | Existing test checked --long only for exactly tagged commit. We should make sure it works sensibly for commits that are not tagged. Signed-off-by: Junio C Hamano <gitster@pobox.com>
* | Add git-describe test for "verify annotated tag names on output"Shawn O. Pearce2008-03-03
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Back in 212945d4 ("Teach git-describe to verify annotated tag names before output") I taught git-describe to output the name shown in the "tag" header of an annotated tag, rather than the name it is actually stored under in this repository's ref namespace. This test case verifies this is working correctly by renaming the ref for an annotated tag to a different name that what is recorded in the tag body, and verifying that tag is returned. We also verify there is a message shown on stderr to inform the user that the tag is possibly stored under the wrong name locally. Signed-off-by: Shawn O. Pearce <spearce@spearce.org> Signed-off-by: Junio C Hamano <gitster@pobox.com>
* | Test for packed tags in git-describe outputShawn O. Pearce2008-03-03
| | | | | | | | | | | | | | | | | | | | | | | | | | In c374b91c ("git-describe: use tags found in packed-refs correctly") Junio fixed an issue where git-describe did not parse a tag object it obtained from a packed-refs file, as the peel information was read in from packed-refs and not the tag object itself. This new test case verifies the fix listed above is functioning, and does not have a regression in the future. Signed-off-by: Shawn O. Pearce <spearce@spearce.org> Signed-off-by: Junio C Hamano <gitster@pobox.com>
* | Don't allow git-describe failures to go unnoticed in t6120Shawn O. Pearce2008-03-03
| | | | | | | | | | | | | | | | | | | | If git-describe fails we never execute the test_expect_success, so we never actually test for failure. This is horribly wrong. We need to always run the test case, but the test case is only supposed to succeed if the prior git-describe returned 0. Signed-off-by: Shawn O. Pearce <spearce@spearce.org> Signed-off-by: Junio C Hamano <gitster@pobox.com>
* | describe: re-fix display_name()Junio C Hamano2008-03-03
| | | | | | | | | | | | | | | | It is implausible for lookup_tag() to return NULL in this particular codepath but we should protect ourselves against a broken repository better. Signed-off-by: Junio C Hamano <gitster@pobox.com>
* | describe: fix --long outputJunio C Hamano2008-03-03
| | | | | | | | | | | | | | | | An error while hand-merging broke the new "--long" option. This should fix it. Signed-off-by: Junio C Hamano <gitster@pobox.com>
* | git-describe: use tags found in packed-refs correctlyJunio C Hamano2008-03-03
| | | | | | | | | | | | | | | | | | | | When your refs are packed, "git-describe" can find the tag that is the best match without ever parsing the tag itself. But lookup_tag() in display_name() says "I've never seen it", creates an empty shell, and returns it. We need to make sure that we actually have parsed the tag data into it. Signed-off-by: Junio C Hamano <gitster@pobox.com>
* | fetch-pack: check parse_commit/object resultsMartin Koegler2008-03-03
| | | | | | | | | | Signed-off-by: Martin Koegler <mkoegler@auto.tuwien.ac.at> Signed-off-by: Junio C Hamano <gitster@pobox.com>
* | Update draft release notes for 1.5.5Junio C Hamano2008-03-03
| | | | | | | | Signed-off-by: Junio C Hamano <gitster@pobox.com>
* | Merge branch 'maint'Junio C Hamano2008-03-02
|\ \ | |/ | | | | | | | | | | | | | | | | | | | | | | * maint: Update draft release notes for 1.5.4.4 revert: actually check for a dirty index tests: introduce test_must_fail git-submodule: Fix typo 'url' which should be '$url' receive-pack: Initialize PATH to include exec-dir. Conflicts: builtin-revert.c
| * Update draft release notes for 1.5.4.4Junio C Hamano2008-03-02
| | | | | | | | Signed-off-by: Junio C Hamano <gitster@pobox.com>
| * revert: actually check for a dirty indexJeff King2008-03-02
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The previous code mistakenly used wt_status_prepare to check whether the index had anything commitable in it; however, that function is just an init function, and will never report a dirty index. The correct way with wt_status_* would be to call wt_status_print with the output pointing to /dev/null or similar. However, that does extra work by both examining the working tree and spewing status information to nowhere. Instead, let's just implement the useful subset of wt_status_print as an "is_index_dirty" function. Signed-off-by: Jeff King <peff@peff.net> Signed-off-by: Junio C Hamano <gitster@pobox.com>
| * tests: introduce test_must_failJunio C Hamano2008-03-02
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | When we expect a git command to notice and signal errors, we carelessly wrote in our tests: test_expect_success 'reject bogus request' ' do something && do something else && ! git command ' but a non-zero exit could come from the "git command" segfaulting. A new helper function "tset_must_fail" is introduced and it is meant to be used to make sure the command gracefully fails (iow, dying and exiting with non zero status is counted as a failure to "gracefully fail"). The above example should be written as: test_expect_success 'reject bogus request' ' do something && do something else && test_must_fail git command ' Signed-off-by: Junio C Hamano <gitster@pobox.com>
| * git-submodule: Fix typo 'url' which should be '$url'Ping Yin2008-03-02
| | | | | | | | | | | | | | | | Fix typo in 'test -z "url"' when checking whether a submodule url is empty. "url" should be "$url". Signed-off-by: Ping Yin <pkufranky@gmail.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
| * receive-pack: Initialize PATH to include exec-dir.Björn Steinbrink2008-03-02
| | | | | | | | | | | | | | | | | | | | | | 511707d (use only the $PATH for exec'ing git commands) made it a requirement to call setup_path() to include the git exec-dir in PATH before spawning any other git commands. git-receive-pack was not yet adapted to do this and therefore fails to spawn git-unpack-objects if that is not in the standard PATH. Signed-off-by: Björn Steinbrink <B.Steinbrink@gmx.de> Signed-off-by: Junio C Hamano <gitster@pobox.com>
* | Fix doc typos.Ralf Wildenhues2008-03-02
| | | | | | | | | | Signed-off-by: Ralf Wildenhues <Ralf.Wildenhues@gmx.de> Signed-off-by: Junio C Hamano <gitster@pobox.com>
* | fast-import: exit with proper message if not a git dirJean-Luc Herren2008-03-02
| | | | | | | | | | | | | | | | | | git fast-import expects to be run from an existing (possibly empty) repository. It was dying with a suboptimal message if that wasn't the case. Signed-off-by: Jean-Luc Herren <jlh@gmx.ch> Acked-by: Shawn O. Pearce <spearce@spearce.org>
* | Merge branch 'np/verify-pack'Junio C Hamano2008-03-02
|\ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * np/verify-pack: add storage size output to 'git verify-pack -v' fix unimplemented packed_object_info_detail() features make verify_one_pack() a bit less wrong wrt packed_git structure factorize revindex code out of builtin-pack-objects.c Conflicts: Makefile
| * | add storage size output to 'git verify-pack -v'Nicolas Pitre2008-03-01
| | | | | | | | | | | | | | | | | | | | | | | | | | | This can possibly break external scripts that depend on the previous output, but those script can't possibly be critical to Git usage, and fixing them should be trivial. Signed-off-by: Nicolas Pitre <nico@cam.org> Signed-off-by: Junio C Hamano <gitster@pobox.com>
| * | fix unimplemented packed_object_info_detail() featuresNicolas Pitre2008-03-01
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Since commit eb32d236df0c16b936b04f0c5402addb61cdb311, there was a TODO comment in packed_object_info_detail() about the SHA1 of base object to OBJ_OFS_DELTA objects. So here it is at last. While at it, providing the actual storage size information as well is now trivial. Signed-off-by: Nicolas Pitre <nico@cam.org> Signed-off-by: Junio C Hamano <gitster@pobox.com>
| * | make verify_one_pack() a bit less wrong wrt packed_git structureNicolas Pitre2008-03-01
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Simply freeing it is wrong. There are many things attached to this structure that are not cleaned up. In practice this doesn't matter much since this happens just before the program exits, but it is still a bit more "correct" to leak it implicitly rather than explicitly. And therefore it is also a good idea to register it with install_packed_git(). Not only might it have better chance of being properly cleaned up if such functionality is implemented for the general case, but some functions like init_revindex() expect all packed_git instances to be globally accessible. Signed-off-by: Nicolas Pitre <nico@cam.org> Signed-off-by: Junio C Hamano <gitster@pobox.com>
| * | factorize revindex code out of builtin-pack-objects.cNicolas Pitre2008-03-01
| | | | | | | | | | | | | | | | | | | | | No functional change. This is needed to fix verify-pack in a later patch. Signed-off-by: Nicolas Pitre <nico@cam.org> Signed-off-by: Junio C Hamano <gitster@pobox.com>
* | | format-patch: wrap cover-letter's shortlog sensiblyJohannes Schindelin2008-03-02
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Earlier, overly-long onelines would not be wrapped at all, and indented with 6 spaces. Instead, we now wrap around at 72 characters, with a first-line indent of 2 spaces, and the rest with 4 spaces. Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de> Signed-off-by: Junio C Hamano <gitster@pobox.com>
* | | format-patch: use the diff options for the cover letter, tooJohannes Schindelin2008-03-02
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Earlier, when you called "git format-patch --cover-letter -M", the diffstat in the cover letter would not inherit the "-M". Now it does. While at it, add a few "|| break" statements in the test's loops; otherwise, breakages inside the loops would not be caught. Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de> Signed-off-by: Junio C Hamano <gitster@pobox.com>
* | | gitweb: Mark first match when searching commit messagesJakub Narebski2008-03-02
| | | | | | | | | | | | | | | | | | | | | | | | | | | Due to greediness of a pattern, gitweb used to mark (show) last match in line, if there are more than one match in line. Now it shows first. Showing all matches in a line would require further work. Signed-off-by: Jakub Narebski <jnareb@gmail.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
* | | Merge branch 'sp/describe-tag'Junio C Hamano2008-03-02
|\ \ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * sp/describe-tag: Teach git-describe to verify annotated tag names before output Conflicts: builtin-describe.c
| * | | Teach git-describe to verify annotated tag names before outputShawn O. Pearce2008-02-28
| |/ / | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | If an annotated tag describes a commit we want to favor the name listed in the body of the tag, rather than whatever name it has been stored under locally. By doing so it is easier to converse about tags with others, even if the tags happen to be fetched to a different name than it was given by its creator. To avoid confusion when a tag is stored under a different name (and thus is not readable via git-rev-parse --verify, etc.) we show a warning message if the name of the tag does not match the ref we found it under and if that tag was also selected for output. For example: $ git tag -a -m "i am a test" testtag $ mv .git/refs/tags/testtag .git/refs/tags/bobbytag $ ./git-describe HEAD warning: tag 'testtag' is really 'bobbytag' here testtag $ git tag -d testtag error: tag 'testtag' not found. $ git tag -d bobbytag Deleted tag 'bobbytag' Signed-off-by: Shawn O. Pearce <spearce@spearce.org> Signed-off-by: Junio C Hamano <gitster@pobox.com>
* | | Merge branch 'pb/cvsimport'Junio C Hamano2008-03-02
|\ \ \ | | | | | | | | | | | | | | | | | | | | | | | | * pb/cvsimport: cvsimport: document that -M can be used multiple times cvsimport: allow for multiple -M options cvsimport: have default merge regex allow for dashes in the branch name
| * | | cvsimport: document that -M can be used multiple timesPhilippe Bruhat (BooK2008-03-01
| | | | | | | | | | | | | | | | | | | | | | | | | | | | Also document the capture behaviour (source branch name in $1) Signed-off-by: Philippe Bruhat (BooK) <book@cpan.org> Signed-off-by: Junio C Hamano <gitster@pobox.com>
| * | | cvsimport: allow for multiple -M optionsPhilippe Bruhat (BooK2008-03-01
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Use Getopt::Long instead of Getopt::Std to handle multiple -M options, for all the cases when having a single custom regex is not enough. Signed-off-by: Philippe Bruhat (BooK) <book@cpan.org> Signed-off-by: Junio C Hamano <gitster@pobox.com>
| * | | cvsimport: have default merge regex allow for dashes in the branch namePhilippe Bruhat (BooK2008-03-01
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The default value of @mergerx uses \w, which matches word character; a branch name like policy-20050608-br will not be matched. Signed-off-by: Philippe Bruhat (BooK) <book@cpan.org> Signed-off-by: Junio C Hamano <gitster@pobox.com>
* | | | Merge branch 'jc/maint-log-merge-left-right'Junio C Hamano2008-03-02
|\ \ \ \ | | | | | | | | | | | | | | | | | | | | * jc/maint-log-merge-left-right: Fix "git log --merge --left-right"
| * | | | Fix "git log --merge --left-right"Junio C Hamano2008-02-27
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The command did not reject the combination of these options, but did not show left/right markers. Signed-off-by: Junio C Hamano <gitster@pobox.com>
* | | | | Merge branch 'mh/maint-http-proxy-fix'Junio C Hamano2008-03-02
|\ \ \ \ \ | | | | | | | | | | | | | | | | | | | | | | | | * mh/maint-http-proxy-fix: Set proxy override with http_init()
| * | | | | Set proxy override with http_init()Mike Hommey2008-02-27
| |/ / / / | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | In transport.c, proxy setting (the one from the remote conf) was set through curl_easy_setopt() call, while http.c already does the same with the http.proxy setting. We now just use this infrastructure instead, and make http_init() now take the struct remote as argument so that it can take the http_proxy setting from there, and any other property that would be added later. At the same time, we make get_http_walker() take a struct remote argument too, and pass it to http_init(), which makes remote defined proxy be used for more than get_refs_via_curl(). We leave out http-fetch and http-push, which don't use remotes for the moment, purposefully. Signed-off-by: Mike Hommey <mh@glandium.org> Acked-by: Daniel Barkalow <barkalow@iabervon.org> Signed-off-by: Junio C Hamano <gitster@pobox.com>
* | | | | Merge branch 'cb/http-test'Junio C Hamano2008-03-02
|\ \ \ \ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * cb/http-test: http-push: add regression tests http-push: push <remote> :<branch> deletes remote branch