summaryrefslogtreecommitdiff
path: root/t
AgeCommit message (Collapse)Author
2007-12-08add status.relativePaths config variableJeff King
The output of git-status was recently changed to output relative paths. Setting this variable to false restores the old behavior for any old-timers that prefer it. Signed-off-by: Jeff King <peff@peff.net> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2007-12-07Merge branch 'jc/clean-fix'Junio C Hamano
* jc/clean-fix: t7300: add test for clean with wildcard pathspec git-clean: Honor pathspec.
2007-12-06for-each-ref: Fix quoting style constants.Johannes Sixt
for-each-ref can accept only one quoting style. For this reason it uses OPT_BIT for the quoting style switches so that it is easy to check for more than one bit being set. However, not all symbolic constants were actually single bit values. In particular: $ git for-each-ref --python error: more than one quoting style ? This fixes it. While we are here, let's also remove the space before the question mark. Signed-off-by: Johannes Sixt <johannes.sixt@telecom.at> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2007-12-06t7300: add test for clean with wildcard pathspecJeff King
Signed-off-by: Jeff King <peff@peff.net> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2007-12-06Merge branch 'maint'Junio C Hamano
* maint: git-am -i: report rewritten title git grep shows the same hit repeatedly for unmerged paths Do check_repository_format() early (re-fix) Do check_repository_format() early Add missing inside_work_tree setting in setup_git_directory_gently
2007-12-05Merge branch 'nd/maint-work-tree-fix' into maintJunio C Hamano
* nd/maint-work-tree-fix: Do check_repository_format() early (re-fix) Do check_repository_format() early Add missing inside_work_tree setting in setup_git_directory_gently
2007-12-05Do check_repository_format() early (re-fix)Nguyễn Thái Ngọc Duy
This pushes check_repository_format() (actually _gently() version) to setup_git_directory_gently() in order to prevent from using unsupported repositories. New setup_git_directory_gently()'s behaviour is stop searching for a valid gitdir and return as if there is no gitdir if a unsupported repository is found. Warning will be thrown in these cases. Signed-off-by: Nguyễn Thái Ngọc Duy <pclouds@gmail.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2007-12-05t5510: add a bit more tests for fetchJunio C Hamano
"git pull/fetch" that gets explicit refspecs from the command line should not update configured tracking refs. Signed-off-by: Junio C Hamano <gitster@pobox.com>
2007-12-05Merge branch 'kh/commit'Junio C Hamano
* kh/commit: (33 commits) git-commit --allow-empty git-commit: Allow to amend a merge commit that does not change the tree quote_path: fix collapsing of relative paths Make git status usage say git status instead of git commit Fix --signoff in builtin-commit differently. git-commit: clean up die messages Do not generate full commit log message if it is not going to be used Remove git-status from list of scripts as it is builtin Fix off-by-one error when truncating the diff out of the commit message. builtin-commit.c: export GIT_INDEX_FILE for launch_editor as well. Add a few more tests for git-commit builtin-commit: Include the diff in the commit message when verbose. builtin-commit: fix partial-commit support Fix add_files_to_cache() to take pathspec, not user specified list of files Export three helper functions from ls-files builtin-commit: run commit-msg hook with correct message file builtin-commit: do not color status output shown in the message template file_exists(): dangling symlinks do exist Replace "runstatus" with "status" in the tests t7501-commit: Add test for git commit <file> with dirty index. ...
2007-12-05Merge branch 'sp/refspec-match'Junio C Hamano
* sp/refspec-match: refactor fetch's ref matching to use refname_match() push: use same rules as git-rev-parse to resolve refspecs add refname_match() push: support pushing HEAD to real branch name
2007-12-04Do not rely on the exit status of "unset" for unset variablesH.Merijn Brand
POSIX says that exit status "0" means that "unset" successfully unset the variable. However, it is kind of ambiguous if an environment variable which was not set could be successfully unset. At least the default shell on HP-UX insists on reporting an error in such a case, so just ignore the exit status of "unset". [Dscho: extended the patch to git-submodule.sh, as Junio realized that this is the only other place where we check the exit status of "unset".] Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2007-12-04t9600: require cvsps 2.1 to perform testsJeff King
git-cvsimport won't run at all with less than cvsps 2.1, because it lacks the -A flag. But there's no point in preventing people who have an old cvsps from running the full testsuite. Tested-by: A Large Angry SCM <gitzilla@gmail.com> Signed-off-by: Jeff King <peff@peff.net> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2007-12-04fast-export: rename the signed tag mode 'ignore' to 'verbatim'Johannes Schindelin
The name 'verbatim' describes much better what this mode does with signed tags. While at it, fix the documentation what it actually does. Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2007-12-03git-commit --allow-emptyJunio C Hamano
It does not usually make sense to record a commit that has the exact same tree as its sole parent commit and that is why git-commit prevents you from making such a mistake, but when data from foreign scm is involved, it is a different story. We are equipped to represent such an (perhaps insane, perhaps by mistake, or perhaps done on purpose) empty change, and it is better to represent it bypassing the safety valve for native use. This is primarily for use by foreign scm interface scripts. Signed-off-by: Junio C Hamano <gitster@pobox.com>
2007-12-03git-commit: Allow to amend a merge commit that does not change the treeJohannes Sixt
Normally, it should not be allowed to generate an empty commit. A merge commit generated with git 'merge -s ours' does not change the tree (along the first parent), but merges are not "empty" even if they do not change the tree. Hence, commit 8588452ceb7 allowed to amend a merge commit that does not change the tree, but 4fb5fd5d301 disallowed it again in an attempt to avoid that an existing commit is amended such that it becomes empty. With this change, a commit can be edited (create a new one or amend an existing one) either if there are changes or if there are at least two parents. Signed-off-by: Johannes Sixt <johannes.sixt@telecom.at> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2007-12-03quote_path: fix collapsing of relative pathsJeff King
The code tries to collapse identical leading components between the prefix and the path. So if we're in "dir1", the path "dir1/file" should become just "file". However, we were ending up with "../dir1/file". The included test expected the wrong output. The "len" parameter to quote_path can be negative to mean "this is a NUL terminated string". Simply count it so that the loop can rely on it being the length of the path. Signed-off-by: Jeff King <peff@peff.net> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2007-12-03Merge branch 'js/prune-expire'Junio C Hamano
* js/prune-expire: Add "--expire <time>" option to 'git prune'
2007-12-03Merge branch 'js/fast-export'Junio C Hamano
* js/fast-export: Add 'git fast-export', the sister of 'git fast-import'
2007-12-03Merge branch 'js/pull-rebase'Junio C Hamano
* js/pull-rebase: Teach 'git pull' about --rebase
2007-12-03Merge branch 'jc/typebreak'Junio C Hamano
* jc/typebreak: Enable rewrite as well as rename detection in git-status rename: Break filepairs with different types.
2007-12-03Add 'git fast-export', the sister of 'git fast-import'Johannes Schindelin
This program dumps (parts of) a git repository in the format that fast-import understands. For clarity's sake, it does not use the 'inline' method of specifying blobs in the commits, but builds the blobs before building the commits. Since signed tags' signatures will not necessarily be valid (think transformations after the export, or excluding revisions, changing the history), there are 4 modes to handle them: abort (default), ignore, warn and strip. The latter just turns the tags into unsigned ones. Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2007-12-02Merge branch 'maint'Junio C Hamano
* maint: t9600: test cvsimport from CVS working tree
2007-12-02t9600: test cvsimport from CVS working treeJeff King
This test passes with v1.5.3.7, but not with v1.5.3.6. Signed-off-by: Jeff King <peff@peff.net> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2007-12-02rename: Break filepairs with different types.Junio C Hamano
When we consider if a path has been totally rewritten, we did not touch changes from symlinks to files or vice versa. But a change that modifies even the type of a blob surely should count as a complete rewrite. While we are at it, modernise diffcore-break to be aware of gitlinks (we do not want to touch them). Signed-off-by: Junio C Hamano <gitster@pobox.com>
2007-12-01Merge branch 'jc/branch-contains'Junio C Hamano
* jc/branch-contains: git-branch --contains: doc and test git-branch --contains=commit parse-options: Allow to hide options from the default usage.
2007-12-01Merge branch 'cr/tag-options'Junio C Hamano
* cr/tag-options: git-tag: test that -s implies an annotated tag "git-tag -s" should create a signed annotated tag builtin-tag: accept and process multiple -m just like git-commit Make builtin-tag.c use parse_options.
2007-12-01Merge 1.5.3.7 inJunio C Hamano
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2007-12-01Fix typo in t4008 test titleJunio C Hamano
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2007-12-01Merge branch 'maint'Junio C Hamano
* maint: Replace the word 'update-cache' by 'update-index' everywhere cvsimport: fix usage of cvsimport.module t7003-filter-branch: Fix test of a failing --msg-filter. cvsimport: miscellaneous packed-ref fixes cvsimport: use rev-parse to support packed refs Add basic cvsimport tests
2007-11-30Add "--expire <time>" option to 'git prune'Johannes Schindelin
Earlier, 'git prune' would prune all loose unreachable objects. This could be quite dangerous, as the objects could be used in an ongoing operation. This patch adds a mode to expire only loose, unreachable objects which are older than a certain time. For example, by git prune --expire 14.days you can prune only those objects which are loose, unreachable and older than 14 days (and thus probably outdated). The implementation uses st.st_mtime rather than st.st_ctime, because it can be tested better, using 'touch -d <time>' (and omitting the test when the platform does not support that command line switch). Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2007-11-30Replace the word 'update-cache' by 'update-index' everywhereJohannes Schindelin
Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2007-11-30cvsimport: fix usage of cvsimport.moduleJeff King
There were two problems: 1. We only look at the config variable if there is no module given on the command line. We checked this by comparing @ARGV == 0. However, at the time of the comparison, we have not yet parsed the dashed options, meaning that "git cvsimport" would read the variable but "git cvsimport -a" would not. This is fixed by simply moving the check after the call to getopt. 2. If the config variable did not exist, we were adding an empty string to @ARGV. The rest of the script, rather than barfing for insufficient input, would then try to import the module '', leading to rather confusing error messages. Based on patch from Emanuele Giaquinta. Signed-off-by: Jeff King <peff@peff.net> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2007-11-30receive-pack: allow deletion of corrupt refsJohannes Schindelin
Occasionally, in some setups (*cough* forks on repo.or.cz *cough*) some refs go stale, e.g. when the forkee rebased and lost some objects needed by the fork. The quick & dirty way to deal with those refs is to delete them and push them again. However, git-push first would first fetch the current commit name for the ref, would receive a null sha1 since the ref does not point to a valid object, then tell receive-pack that it should delete the ref with this commit name. delete_ref() would be subsequently be called, and check that resolve_ref() (which does _not_ check for validity of the object) returns the same commit name. Which would fail. The proper fix is to avoid corrupting repositories, but in the meantime this is a good fix in any case. Incidentally, some instances of "cd .." in the test cases were fixed, so that subsequent test cases run in t/trash/ irrespective of the outcome of the previous test cases. Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2007-11-30Merge branch 'jk/maint-cvsimport-fix' into maintJunio C Hamano
* jk/maint-cvsimport-fix: cvsimport: miscellaneous packed-ref fixes cvsimport: use rev-parse to support packed refs Add basic cvsimport tests
2007-11-30t7003-filter-branch: Fix test of a failing --msg-filter.Johannes Sixt
The test passed for the wrong reason: If the script given to --msg-filter fails, it is expected that git-filter-branch aborts. But the test forgot to tell the branch name to rewrite, and so git-filter-branch failed due to incorrect usage. Signed-off-by: Johannes Sixt <johannes.sixt@telecom.at> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2007-11-29Teach 'git pull' about --rebaseJohannes Schindelin
When calling 'git pull' with the '--rebase' option, it performs a fetch + rebase instead of a fetch + merge. This behavior is more desirable than fetch + pull when a topic branch is ready to be submitted and needs to be update. fetch + rebase might also be considered a better workflow with shared repositories in any case, or for contributors to a centrally managed repository, such as WINE's. As a convenience, you can set the default behavior for a branch by defining the config variable branch.<name>.rebase, which is interpreted as a bool. This setting can be overridden on the command line by --rebase and --no-rebase. Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2007-11-28Revert "t5516: test update of local refs on push"Jeff King
This reverts commit 09fba7a59d38d1cafaf33eadaf1d409c4113b30c. These tests are superseded by the ones in t5404 (added in 6fa92bf3 and 8736a848), which are more extensive and better organized. Signed-off-by: Jeff King <peff@peff.net> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2007-11-28cvsimport: use rev-parse to support packed refsJeff King
Previously, if refs were packed, git-cvsimport would assume that particular refs did not exist. This could lead to, for example, overwriting previous 'origin' commits that were packed. Signed-off-by: Jeff King <peff@peff.net> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2007-11-28Add basic cvsimport testsJeff King
We weren't even testing basic things before, so let's at least try importing and updating a trivial repository, which will catch total breakage. Signed-off-by: Jeff King <peff@peff.net> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2007-11-26git-tag: test that -s implies an annotated tagJeff King
This detects a regression introduced while moving git-tag to a C builtin. Signed-off-by: Jeff King <peff@peff.net> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2007-11-25Merge branch 'rv/maint-index-commit' into maintJunio C Hamano
* rv/maint-index-commit: Make GIT_INDEX_FILE apply to git-commit
2007-11-25Merge branch 'lt/maint-rev-list-gitlink' into maintJunio C Hamano
* lt/maint-rev-list-gitlink: Fix rev-list when showing objects involving submodules
2007-11-25Merge branch 'jc/maint-add-sync-stat' into maintJunio C Hamano
* jc/maint-add-sync-stat: t2200: test more cases of "add -u" git-add: make the entry stat-clean after re-adding the same contents ce_match_stat, run_diff_files: use symbolic constants for readability
2007-11-25Merge branch 'jc/maint-format-patch-encoding' into maintJunio C Hamano
* jc/maint-format-patch-encoding: test format-patch -s: make sure MIME content type is shown as needed format-patch -s: add MIME encoding header if signer's name requires so
2007-11-25Merge branch 'bs/maint-t7005' into maintJunio C Hamano
* bs/maint-t7005: t7005-editor.sh: Don't invoke real vi when it is in GIT_EXEC_PATH
2007-11-25Merge branch 'bs/maint-commit-options' into maintJunio C Hamano
* bs/maint-commit-options: git-commit: Add tests for invalid usage of -a/--interactive with paths git-commit.sh: Fix usage checks regarding paths given when they do not make sense
2007-11-25t4119: correct overeager war-on-whitespaceJunio C Hamano
Earlier a6080a0a44d5ead84db3dabbbc80e82df838533d (War on whitespace) dropped a necessary trailing whitespace from the test vector.
2007-11-25Merge branch 'jk/send-pack'Junio C Hamano
* jk/send-pack: (24 commits) send-pack: cluster ref status reporting send-pack: fix "everything up-to-date" message send-pack: tighten remote error reporting make "find_ref_by_name" a public function Fix warning about bitfield in struct ref send-pack: assign remote errors to each ref send-pack: check ref->status before updating tracking refs send-pack: track errors for each ref git-push: add documentation for the newly added --mirror mode Add tests for git push'es mirror mode Update the tracking references only if they were succesfully updated on remote Add a test checking if send-pack updated local tracking branches correctly git-push: plumb in --mirror mode Teach send-pack a mirror mode send-pack: segfault fix on forced push Reteach builtin-ls-remote to understand remotes send-pack: require --verbose to show update of tracking refs receive-pack: don't mention successful updates more terse push output Build in ls-remote ...
2007-11-25Merge branch 'js/mingw-fallouts'Junio C Hamano
* js/mingw-fallouts: fetch-pack: Prepare for a side-band demultiplexer in a thread. rehabilitate some t5302 tests on 32-bit off_t machines Allow ETC_GITCONFIG to be a relative path. Introduce git_etc_gitconfig() that encapsulates access of ETC_GITCONFIG. Allow a relative builtin template directory. Close files opened by lock_file() before unlinking. builtin run_command: do not exit with -1. Move #include <sys/select.h> and <sys/ioctl.h> to git-compat-util.h. Use is_absolute_path() in sha1_file.c. Skip t3902-quoted.sh if the file system does not support funny names. t5302-pack-index: Skip tests of 64-bit offsets if necessary. t7501-commit.sh: Not all seds understand option -i t5300-pack-object.sh: Split the big verify-pack test into smaller parts.
2007-11-25Merge branch 'mh/rebase-skip-hard'Junio C Hamano
* mh/rebase-skip-hard: Do git reset --hard HEAD when using git rebase --skip