summaryrefslogtreecommitdiff
path: root/t
AgeCommit message (Collapse)Author
2007-06-16Merge branch 'jc/remote'Junio C Hamano
* jc/remote: git-push: Update description of refspecs and add examples remote.c: "git-push frotz" should update what matches at the source. remote.c: fix "git push" weak match disambiguation remote.c: minor clean-up of match_explicit() remote.c: refactor creation of new dst ref remote.c: refactor match_explicit_refs()
2007-06-16Merge branch 'gp/branch'Junio C Hamano
* gp/branch: git-branch: cleanup config file when deleting branches
2007-06-16Merge branch 'fl/cvsserver'Junio C Hamano
* fl/cvsserver: cvsserver: Actually implement --export-all cvsserver: Let --base-path and pserver get along just fine cvsserver: Add some useful commandline options
2007-06-16Merge branch 'lh/submodule'Junio C Hamano
* lh/submodule: gitmodules(5): remove leading period from synopsis Add gitmodules(5) git-submodule: give submodules proper names Rename sections from "module" to "submodule" in .gitmodules git-submodule: remember to checkout after clone t7400: barf if git-submodule removes or replaces a file
2007-06-16cvsserver: Actually implement --export-allFrank Lichtenheld
Embarrassing bug number two in my options patch. Also enforce that --export-all is only ever used together with an explicit whitelist. Otherwise people might export every git repository on the whole system without realising. Signed-off-by: Frank Lichtenheld <frank@lichtenheld.de> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2007-06-16cvsserver: Let --base-path and pserver get along just fineFrank Lichtenheld
Embarassing bug number one in my options patch. Since the code for --base-path support rewrote the cvsroot value after comparing it with a possible existing value (i.e. from pserver authentication) the check always failed. Signed-off-by: Frank Lichtenheld <frank@lichtenheld.de> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2007-06-13git-svn: test for creating new directories over svn://Eric Wong
As reported by Matthieu Moy, this is causing svnserve to terminate connections, because it segfaults. This test is disabled by default and can be enabled by setting SVNSERVE_PORT to an unbound (for 127.0.0.1) TCP port in the environment (in addition to SVN_TESTS=1). I'm not comfortable with having a test start a daemon by default and take up a port that could potentially stay running if the test failed. Signed-off-by: Eric Wong <normalperson@yhbt.net> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2007-06-12git-submodule: give submodules proper namesLars Hjemli
This changes the way git-submodule uses .gitmodules: Subsections no longer specify the submodule path, they now specify the submodule name. The submodule path is found under the new key "submodule.<name>.path", which is a required key. With this change a submodule can be moved between different 'checkout paths' without upsetting git-submodule. Signed-off-by: Lars Hjemli <hjemli@gmail.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2007-06-12Rename sections from "module" to "submodule" in .gitmodulesLars Hjemli
Rename [module] to [submodule], so that it would be more forward compatible with the proposed extension by harmonizing the section names used in .gitmodules and .git/config. Signed-off-by: Lars Hjemli <hjemli@gmail.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2007-06-12t7400: barf if git-submodule removes or replaces a fileLars Hjemli
The test for an unmolested file wouldn't fail properly if the file had been removed or replaced by something other than a regular file. This fixes it. Signed-off-by: Lars Hjemli <hjemli@gmail.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2007-06-12Merge branch 'lh/submodule'Junio C Hamano
* lh/submodule: git-submodule: clone during update, not during init git-submodule: move cloning into a separate function
2007-06-09git-branch: cleanup config file when deleting branchesGerrit Pape
When deleting branches, remove the sections referring to these branches from the config file. Signed-off-by: Gerrit Pape <pape@smarden.org>
2007-06-09remote.c: "git-push frotz" should update what matches at the source.Junio C Hamano
Earlier, when the local repository has a branch "frotz" and the remote repository has a tag "frotz" (but not branch "frotz"), "git-push frotz" mistakenly updated the tag at the remote side. This was because the partial refname matching code was applied independently on both source and destination side. With this fix, when a colon-less refspec is given to git-push, we first match it with the refs in the source repository, and update the matching ref in the destination repository. Signed-off-by: Junio C Hamano <gitster@pobox.com>
2007-06-09remote.c: fix "git push" weak match disambiguationJunio C Hamano
When "git push A:B" is given, and A (or B) is not a full refname that begins with refs/, we require an unambiguous match with an existing ref. For this purpose, a match with a local branch or a tag (i.e. refs/heads/A and refs/tags/A) is called a "strong match", and any other match is called a "weak match". A partial refname is unambiguous when there is only one strong match with any number of weak matches, or when there is only one weak match and no other match. However, as reported by Sparse with Ramsay Jones recently, count_refspec_match() function had a bug where a variable in an inner block masked a different variable of the same name, which caused the weak matches to be ignored. This fixes it, and adds tests for the fix. Signed-off-by: Junio C Hamano <gitster@pobox.com>
2007-06-09t5000: silence unzip availability checkRené Scharfe
unzip -v on (at least) Ubuntu prints a screenful of version info to stdout. Get rid of it since we only want to know if unzip is installed or not. Signed-off-by: Rene Scharfe <rene.scharfe@lsrfire.ath.cx>
2007-06-09Merge branch 'js/merge'Junio C Hamano
* js/merge: git-merge-file: refuse to merge binary files
2007-06-09Merge branch 'ar/wildcardpush'Junio C Hamano
* ar/wildcardpush: Test wildcard push/fetch Fix push with refspecs containing wildcards
2007-06-09Merge branch 'ar/clone'Junio C Hamano
* ar/clone: Fix clone to setup the origin if its name ends with .git
2007-06-08cvsserver: Add some useful commandline optionsFrank Lichtenheld
Make git-cvsserver understand some options inspired by git-daemon, namely --base-path, --export-all, --strict-paths. Also allow the caller to specify a whitelist of allowed directories, again similar to git-daemon. While already adding option parsing also support the common --help and --version options. Rationale: While the gitcvs.enabled configuration option already offers means to limit git-cvsserver access to a repository, there are some use cases where other methods of access control prove to be more useful. E.g. if setting up a pserver for a collection of public repositories one might want limit the exported repositories to exactly the directory this collection is located whithout having to worry about other repositories that might lie around with the configuration variable set (never trust your users ;) Signed-off-by: Frank Lichtenheld <frank@lichtenheld.de> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2007-06-08Merge branch 'maint'Junio C Hamano
* maint: checkout: do not get confused with ambiguous tag/branch names
2007-06-08cvsserver: Make req_Root more critical of its input dataFrank Lichtenheld
The path submitted with the Root request has to be absolute (cvs does it this way and it may save us some sanity checks later) If multiple roots are specified (e.g. because we use pserver authentication which will already include the root), ensure that they say all the same. Probably neither is a security risk, and neither should ever be triggered by a sane client, but when validating input data, it's better to be save than sorry. Signed-off-by: Frank Lichtenheld <frank@lichtenheld.de> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2007-06-08checkout: do not get confused with ambiguous tag/branch namesJunio C Hamano
Although it is not advisable, we have always allowed a branch and a tag to have the same basename (i.e. it is not illegal to have refs/heads/frotz and refs/tags/frotz at the same time). When talking about a specific commit, the interpretation of 'frotz' has always been "use tag and then check branch", although we warn when ambiguities exist. However "git checkout $name" is defined to (1) first see if it matches the branch name, and if so switch to that branch; (2) otherwise it is an instruction to detach HEAD to point at the commit named by $name. We did not follow this definition when $name appeared under both refs/heads/ and refs/tags/ -- we switched to the branch but read the tree from the tagged commit, which was utterly bogus. Signed-off-by: Junio C Hamano <gitster@pobox.com>
2007-06-08Test wildcard push/fetchJunio C Hamano
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2007-06-07War on whitespaceJunio C Hamano
This uses "git-apply --whitespace=strip" to fix whitespace errors that have crept in to our source files over time. There are a few files that need to have trailing whitespaces (most notably, test vectors). The results still passes the test, and build result in Documentation/ area is unchanged. Signed-off-by: Junio C Hamano <gitster@pobox.com>
2007-06-06Fix clone to setup the origin if its name ends with .gitAlex Riesen
The problem is visible when cloning a local repo. The cloned repository will have the origin url setup incorrectly: the origin name will be copied verbatim in origin url of the cloned repository. Normally, the name is to be expanded into absolute path. Signed-off-by: Alex Riesen <raa.lkml@gmail.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2007-06-06t5000: skip ZIP tests if unzip was not foundJohannes Schindelin
Signed-off-by: Johannes Schindelin <Johannes.Schindelin@gmx.de> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2007-06-06git-submodule: clone during update, not during initLars Hjemli
This teaches 'git-submodule init' to register submodule paths and urls in .git/config instead of actually cloning them. The cloning is now handled as part of 'git-submodule update'. With this change it is possible to specify preferred/alternate urls for the submodules in .git/config before the submodules are cloned. Signed-off-by: Lars Hjemli <hjemli@gmail.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2007-06-06git-branch --track: fix tracking branch computation.Junio C Hamano
The original code did not take hierarchical branch names into account at all. Tested-by: Gerrit Pape <pape@smarden.org> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2007-06-05git-merge-file: refuse to merge binary filesJohannes Schindelin
Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2007-06-05merge-recursive: refuse to merge binary filesJohannes Schindelin
Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2007-06-03gitweb: Handle non UTF-8 text betterMartin Koegler
gitweb assumes that everything is in UTF-8. If a text contains invalid UTF-8 character sequences, the text must be in a different encoding. This commit introduces $fallback_encoding which would be used as input encoding if gitweb encounters text with is not valid UTF-8. Add basic test for this in t/t9500-gitweb-standalone-no-errors.sh Signed-off-by: Martin Koegler <mkoegler@auto.tuwien.ac.at> Signed-off-by: Jakub Narebski <jnareb@gmail.com> Tested-by: Alexandre Julliard <julliard@winehq.org> Tested-by: Ismail Dönmez <ismail@pardus.org.tr> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2007-06-03Merge branches 'lh/submodules' and 'pb/am'Junio C Hamano
* lh/submodules: Add basic test-script for git-submodule Add git-submodule command * pb/am: Remove git-applypatch git-applymbox: Remove command
2007-06-02Add basic test-script for git-submoduleLars Hjemli
This test tries to verify basic sanity of git-submodule, i.e. that it is able to clone and update a submodule repository, that its status output is sane, and that it barfs when the submodule path is occupied during init. Signed-off-by: Lars Hjemli <hjemli@gmail.com> Signed-off-by: Junio C Hamano <junkio@cox.net>
2007-06-02Merge branch 'sp/pack'Junio C Hamano
* sp/pack: Style nit - don't put space after function names Ensure the pack index is opened before access Simplify index access condition in count-objects, pack-redundant Test for recent rev-parse $abbrev_sha1 regression rev-parse: Identify short sha1 sums correctly. Attempt to delay prepare_alt_odb during get_sha1 Micro-optimize prepare_alt_odb Lazily open pack index files on demand
2007-06-02Merge branch 'maint'Junio C Hamano
* maint: Use =20 when rfc2047 encoding spaces. Create a new manpage for the gitignore format, and reference it elsewhere Documentation: robustify asciidoc GIT_VERSION replacement
2007-06-02Use =20 when rfc2047 encoding spaces.Kristian Høgsberg
Encode ' ' using '=20' even though rfc2047 allows using '_' for readability. Unfortunately, many programs do not understand this and just leave the underscore in place. Using '=20' seems to work better. [jc: with adjustment to t3901] Signed-off-by: Kristian Høgsberg <hoegsberg@gmail.com> Signed-off-by: Junio C Hamano <junkio@cox.net>
2007-05-30Test for recent rev-parse $abbrev_sha1 regressionShawn O. Pearce
My recent patch "Lazily open pack index files on demand" caused a regression in the case of parsing abbreviated SHA-1 object names. Git was unable to translate the abbreviated name into the full name if the object was packed, as the pack .idx files were not opened before being accessed. This is a simple test to repack a repository then test for an abbreviated SHA-1 within the packfile. Signed-off-by: Shawn O. Pearce <spearce@spearce.org> Signed-off-by: Junio C Hamano <junkio@cox.net>
2007-05-29Merge branch 'maint'Junio C Hamano
* maint: cvsserver: Fix some typos in asciidoc documentation cvsserver: Note that CVS_SERVER can also be specified as method variable cvsserver: Correct inetd.conf example in asciidoc documentation user-manual: fixed typo in example Add test case for $Id$ expanded in the repository git-svn: avoid md5 calculation entirely if SVN doesn't provide one Makefile: Remove git-fsck and git-verify-pack from PROGRAMS Fix stupid typo in lookup_tag() git-gui: Guess our share/git-gui/lib path at runtime if possible Correct key bindings to Control-<foo> git-gui: Tighten internal pattern match for lib/ directory
2007-05-29cvsserver: Handle 'cvs login'Frank Lichtenheld
Since this is a trivial variation of the general pserver authentication, there is really no reason not to support it. Signed-off-by: Frank Lichtenheld <frank@lichtenheld.de> Signed-off-by: Junio C Hamano <junkio@cox.net>
2007-05-29t9400: Work around CVS' deficienciesFrank Lichtenheld
If we are too fast with our changes, the file in the working copy might still have the same mtime as noted in the CVS/Entries. This will cause CVS to happily report to the server that the file is unmodified which can lead to data loss (and in our case test failure). CVS sucks! Work around that by sleeping for a second. Signed-off-by: Frank Lichtenheld <frank@lichtenheld.de> Signed-off-by: Junio C Hamano <junkio@cox.net>
2007-05-29Add test case for $Id$ expanded in the repositoryAndy Parkins
This test case would have caught the bug fixed by revision c23290d5. It puts various forms of $Id$ into a file in the repository, without allowing git to collapse them to uniformity. Then enables the $Id$ expansion on checkout, and checks that what is checked out has coped with the various forms. Signed-off-by: Andy Parkins <andyparkins@gmail.com> Signed-off-by: Junio C Hamano <junkio@cox.net>
2007-05-27Merge branch 'maint'Junio C Hamano
* maint: Fix git-svn to handle svn not reporting the md5sum of a file, and test. Fix mishandling of $Id$ expanded in the repository copy in convert.c More echo "$user_message" fixes. Add tests for the last two fixes. git-commit: use printf '%s\n' instead of echo on user-supplied strings git-am: use printf instead of echo on user-supplied strings Documentation: Add definition of "evil merge" to GIT Glossary Replace the last 'dircache's by 'index' Documentation: Clean up links in GIT Glossary
2007-05-26Merge branch 'maint-1.5.1' into maintJunio C Hamano
* maint-1.5.1: Fix git-svn to handle svn not reporting the md5sum of a file, and test. More echo "$user_message" fixes. Add tests for the last two fixes. git-commit: use printf '%s\n' instead of echo on user-supplied strings git-am: use printf instead of echo on user-supplied strings Documentation: Add definition of "evil merge" to GIT Glossary Replace the last 'dircache's by 'index' Documentation: Clean up links in GIT Glossary
2007-05-26Fix git-svn to handle svn not reporting the md5sum of a file, and test.James Y Knight
Acked-by: Eric Wong <normalperson@yhbt.net> Signed-off-by: Junio C Hamano <junkio@cox.net>
2007-05-26Add tests for the last two fixes.Junio C Hamano
This updates t4014 to check the two fixes for git-am and git-commit we observed with "echo" that does backslash interpolation by default without being asked with -e option. Signed-off-by: Junio C Hamano <junkio@cox.net>
2007-05-24Merge branch 'maint'Junio C Hamano
* maint: Fix possible coredump with fast-import --import-marks Refactor fast-import branch creation from existing commit fast-import: Fix crash when referencing already existing objects fast-import: Fix uninitialized variable Documentation: fix git-config.xml generation
2007-05-24Fix possible coredump with fast-import --import-marksShawn O. Pearce
When e8438420bb7d368bec3647b90c557b9931582267 allowed us to reload the marks table on subsequent runs of fast-import we really broke things, as we set pack_id to MAX_PACK_ID for any objects we imported into the marks table. Creating a branch from that mark should fail as we attempt to read the object through a non-existant packed_git pointer. Instead we have to use the normal Git object system to locate the older commit, as we ourselves do not have a reference to the packed_git it resides in. This bug only occurred because t9300 was not complete enough. When we added the --import-marks feature we didn't actually test its implementation enough to verify the function worked as intended. I have corrected that, and included the changes as part of this fix. Prior versions of fast-import fail the new test(s); this commit allows them to pass. Credit for this bug find goes to Simon Hausmann <simon@lst.de> as he recently identified a similiar bug in the tree lazy-loading path. Signed-off-by: Shawn O. Pearce <spearce@spearce.org>
2007-05-22t9400: Add some basic pserver testsFrank Lichtenheld
While we can easily test the cvs <-> git-cvsserver communication with :fork: and git-cvsserver server there are some pserver specifics we should test, too. Currently this are two tests of the pserver authentication. Signed-off-by: Frank Lichtenheld <frank@lichtenheld.de> Signed-off-by: Junio C Hamano <junkio@cox.net>
2007-05-22t9400: Add some more cvs update testsFrank Lichtenheld
Add some cvs update tests that include various merge situations. Also add a basic test for update -C since it fits so well in there. Signed-off-by: Frank Lichtenheld <frank@lichtenheld.de> Signed-off-by: Junio C Hamano <junkio@cox.net>
2007-05-22t9400: Add test cases for config file handlingFrank Lichtenheld
Add a few test cases for the config file parsing done by git-cvsserver. Signed-off-by: Frank Lichtenheld <frank@lichtenheld.de> Signed-off-by: Junio C Hamano <junkio@cox.net>