summaryrefslogtreecommitdiff
path: root/t
AgeCommit message (Collapse)AuthorFilesLines
2008-12-04Test that git-am does not lose -C/-p/--whitespace optionsLibravatar Junio C Hamano11-0/+229
These tests make sure that "git am" does not lose command line options specified when it was started, after it is interrupted by a patch that does not apply earlier in the series. Signed-off-by: Junio C Hamano <gitster@pobox.com>
2008-12-03Merge branch 'dm/svn-remote'Libravatar Junio C Hamano1-0/+19
* dm/svn-remote: git-svn: Make branch use correct svn-remote
2008-12-03git-svn: Make branch use correct svn-remoteLibravatar Deskin Miller1-0/+19
The 'branch' subcommand incorrectly had the svn-remote to use hardcoded as 'svn', the default remote name. This meant that branches derived from other svn-remotes would try to use the branch and tag configuration for the 'svn' remote, potentially copying would-be branches to the wrong place in SVN, into the branch namespace for another project. Fix this by using the remote name extracted from the svn info for the specified git ref. Add a testcase for this behaviour. [jc: squashed in a fix to test from Michael J Gruber for older svn (1.4)] Signed-off-by: Deskin Miller <deskinm@umich.edu> Acked-by: Eric Wong <normalperson@yhbt.net> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2008-12-03Merge branch 'jc/rm-i-t-a'Libravatar Junio C Hamano2-2/+30
* jc/rm-i-t-a: git add --intent-to-add: do not let an empty blob be committed by accident git add --intent-to-add: fix removal of cached emptiness builtin-rm.c: explain and clarify the "local change" logic Extend index to save more flags
2008-12-02t4030-diff-textconv: Make octal escape sequence more portableLibravatar Johannes Sixt1-1/+1
There are printfs around that do not grok '\1', but need '\01'. Discovered on AIX 4.3.x. Signed-off-by: Johannes Sixt <j6t@kdbg.org> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2008-12-02bisect: fix "git bisect skip <commit>" and add tests casesLibravatar Christian Couder1-1/+18
The patch that allows "git bisect skip" to be passed a range of commits using the "<commit1>..<commit2>" notation is flawed because it introduces a regression when it was passed a simple rev or commit. "git bisect skip <commit>" doesn't work any more, because <commit> is quoted but not properly unquoted. This patch fixes that and add tests cases to better check when it is passed commits and range of commits. While at it, this patch also properly quotes the non range arguments using the "sq" function. Signed-off-by: Christian Couder <chriscool@tuxfamily.org>
2008-11-30send-email: do not reverse the command line argumentsLibravatar Junio C Hamano1-0/+13
The loop picks elements from @ARGV one by one, sifts them into arguments meant for format-patch and the script itself, and pushes them to @files and @rev_list_opts arrays. Pick elements from @ARGV starting at the beginning using shift, instead of at the end using pop, as push appends them to the end of the array. Signed-off-by: Junio C Hamano <gitster@pobox.com>
2008-11-30git add --intent-to-add: do not let an empty blob be committed by accidentLibravatar Junio C Hamano1-0/+28
Writing a tree out of an index with an "intent to add" entry is blocked. This implies that you cannot "git commit" from such a state; however you can still do "git commit -a" or "git commit $that_path". Signed-off-by: Junio C Hamano <gitster@pobox.com>
2008-11-28git add --intent-to-add: fix removal of cached emptinessLibravatar Junio C Hamano1-2/+2
This uses the extended index flag mechanism introduced earlier to mark the entries added to the index via "git add -N" with CE_INTENT_TO_ADD. The logic to detect an "intent to add" entry for the purpose of allowing "git rm --cached $path" is tightened to check not just for a staged empty blob, but with the CE_INTENT_TO_ADD bit. This protects an empty blob that was explicitly added and then modified in the work tree from being dropped with this sequence: $ >empty $ git add empty $ echo "non empty" >empty $ git rm --cached empty Signed-off-by: Junio C Hamano <gitster@pobox.com>
2008-11-27Merge branch 'ta/quiet-pull'Libravatar Junio C Hamano1-0/+60
* ta/quiet-pull: Retain multiple -q/-v occurrences in git pull Teach/Fix pull/fetch -q/-v options
2008-11-27Merge branch 'ph/send-email'Libravatar Junio C Hamano1-0/+8
* ph/send-email: git send-email: ask less questions when --compose is used. git send-email: add --annotate option git send-email: interpret unknown files as revision lists git send-email: make the message file name more specific.
2008-11-27Merge branch 'maint'Libravatar Junio C Hamano1-0/+8
* maint: sha1_file.c: resolve confusion EACCES vs EPERM sha1_file: avoid bogus "file exists" error message git checkout: don't warn about unborn branch if -f is already passed bash: offer refs instead of filenames for 'git revert' bash: remove dashed command leftovers git-p4: fix keyword-expansion regex fast-export: use an unsorted string list for extra_refs Add new testcase to show fast-export does not always exports all tags
2008-11-27Merge branch 'mv/fast-export' into maintLibravatar Junio C Hamano1-0/+8
* mv/fast-export: fast-export: use an unsorted string list for extra_refs Add new testcase to show fast-export does not always exports all tags
2008-11-26Merge branch 'maint'Libravatar Junio C Hamano1-0/+21
* maint: Teach "git diff" to honour --[no-]ext-diff
2008-11-26t9129-git-svn-i18n-commitencoding: Make compare_svn_head_with() compatible ↵Libravatar Marcel Koeppen1-1/+1
with OSX sed The sed call used in compare_svn_head_with() uses the + quantifier, which is not supported in the OSX version of sed. It is replaced by the equivalent \{1,\}. Signed-off-by: Marcel Koeppen <git-dev@marzelpan.de> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2008-11-26Teach "git diff" to honour --[no-]ext-diffLibravatar Junio C Hamano1-0/+21
The original intention of 72909be (Add diff-option --ext-diff, 2007-06-30) was to optionally allow the use of external diff viewer in "git log" family (while keeping them disabled by default). It exposed the "allow external diff" bit to the UI, but forgot to adjust the "git diff" codepath that was set up to always allow use of the external diff viewer. Noticed by Nazri Ramliy; tests by René Scharfe squashed in. Signed-off-by: Junio C Hamano <gitster@pobox.com>
2008-11-23fast-export: use an unsorted string list for extra_refsLibravatar Johannes Schindelin1-1/+1
The list extra_refs contains tags and the objects referenced by them, so that they can be handled at the end. When a tag references a commit, that commit is added to the list using the same name. Also, the function handle_tags_and_duplicates() relies on the order the items were added to extra_refs, so clearly we do not want to use a sorted list here. Noticed by Miklos Vajna. Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de> Tested-by: Miklos Vajna <vmiklos@frugalware.org> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2008-11-23Add new testcase to show fast-export does not always exports all tagsLibravatar Miklos Vajna1-0/+8
Signed-off-by: Miklos Vajna <vmiklos@frugalware.org> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2008-11-23Fix t4030-diff-textconv.shLibravatar Alex Riesen1-1/+1
Avoid passing cygwin pathnames to Perl. Some Perls have problems using them Signed-off-by: Alex Riesen <raa.lkml@gmail.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2008-11-16Merge branch 'bc/maint-keep-pack'Libravatar Junio C Hamano1-3/+15
* bc/maint-keep-pack: repack: only unpack-unreachable if we are deleting redundant packs
2008-11-16Merge branch 'jk/commit-v-strip'Libravatar Junio C Hamano1-1/+1
* jk/commit-v-strip: status: show "-v" diff even for initial commit wt-status: refactor initial commit printing define empty tree sha1 as a macro
2008-11-14repack: only unpack-unreachable if we are deleting redundant packsLibravatar Brandon Casey1-3/+15
The -A option calls pack-objects with the --unpack-unreachable option so that the unreachable objects in local packs are left in the local object store loose. But if the -d option to repack was _not_ used, then these unpacked loose objects are redundant and unnecessary. Update tests in t7701. Signed-off-by: Brandon Casey <casey@nrlssc.navy.mil> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2008-11-14Teach/Fix pull/fetch -q/-v optionsLibravatar Tuncer Ayaz1-0/+60
Implement git-pull --quiet and git-pull --verbose by adding the options to git-pull and fixing verbosity handling in git-fetch. Signed-off-by: Junio C Hamano <gitster@pobox.com>
2008-11-13Merge git://git.bogomips.org/git-svnLibravatar Junio C Hamano2-0/+89
* git://git.bogomips.org/git-svn: git-svn: proper detection of bare repositories git-svn: respect i18n.commitencoding config git-svn: don't escape tilde ('~') for http(s) URLs
2008-11-12Merge branch 'jk/maint-commit-v-strip'Libravatar Junio C Hamano1-0/+73
* jk/maint-commit-v-strip: commit: Fix stripping of patch in verbose mode.
2008-11-12Merge branch 'np/pack-safer'Libravatar Junio C Hamano2-8/+91
* np/pack-safer: t5303: fix printf format string for portability t5303: work around printf breakage in dash pack-objects: don't leak pack window reference when splitting packs extend test coverage for latest pack corruption resilience improvements pack-objects: allow "fixing" a corrupted pack without a full repack make find_pack_revindex() aware of the nasty world make check_object() resilient to pack corruptions make packed_object_info() resilient to pack corruptions make unpack_object_header() non fatal better validation on delta base object offsets close another possibility for propagating pack corruption
2008-11-12Merge branch 'mk/maint-cg-push'Libravatar Junio C Hamano1-0/+50
* mk/maint-cg-push: git push: Interpret $GIT_DIR/branches in a Cogito compatible way Conflicts: t/t5516-fetch-push.sh
2008-11-12Merge branch 'bc/maint-keep-pack'Libravatar Junio C Hamano1-0/+73
* bc/maint-keep-pack: t7700: test that 'repack -a' packs alternate packed objects pack-objects: extend --local to mean ignore non-local loose objects too sha1_file.c: split has_loose_object() into local and non-local counterparts t7700: demonstrate mishandling of loose objects in an alternate ODB builtin-gc.c: use new pack_keep bitfield to detect .keep file existence repack: do not fall back to incremental repacking with [-a|-A] repack: don't repack local objects in packs with .keep file pack-objects: new option --honor-pack-keep packed_git: convert pack_local flag into a bitfield and add pack_keep t7700: demonstrate mishandling of objects in packs with a .keep file
2008-11-12Merge branch 'mv/remote-rename'Libravatar Junio C Hamano1-0/+48
* mv/remote-rename: git-remote: document the migration feature of the rename subcommand git-remote rename: migrate from remotes/ and branches/ remote: add a new 'origin' variable to the struct Implement git remote rename
2008-11-12Merge branch 'jk/deny-push-to-current'Libravatar Junio C Hamano1-29/+58
* jk/deny-push-to-current: receive-pack: detect push to current branch of non-bare repo t5516: refactor oddball tests
2008-11-12Merge branch 'jk/diff-convfilter'Libravatar Junio C Hamano2-5/+21
* jk/diff-convfilter: enable textconv for diff in verbose status/commit wt-status: load diff ui config only textconv regular files userdiff: require explicitly allowing textconv refactor userdiff textconv code Conflicts: t/t4030-diff-textconv.sh
2008-11-12Merge branch 'jk/diff-convfilter-test-fix'Libravatar Junio C Hamano5-6/+124
* jk/diff-convfilter-test-fix: Avoid using non-portable `echo -n` in tests. add userdiff textconv tests document the diff driver textconv feature diff: add missing static declaration Conflicts: Documentation/gitattributes.txt
2008-11-12Merge branch 'st/tag'Libravatar Junio C Hamano1-0/+11
* st/tag: tag: Add more tests about mixing incompatible modes and options tag: Check that options are only allowed in the appropriate mode
2008-11-12t7700: test that 'repack -a' packs alternate packed objectsLibravatar Brandon Casey1-0/+16
Previously, when 'repack -a' was called and there were no packs in the local repository without a .keep file, the repack would fall back to calling pack-objects with '--unpacked --incremental'. This resulted in the created pack file, if any, to be missing the packed objects in the alternate object store. Test that this specific case has been fixed. Signed-off-by: Brandon Casey <casey@nrlssc.navy.mil> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2008-11-12Merge branch 'maint'Libravatar Junio C Hamano1-0/+6
* maint: Start 1.6.0.5 cycle Fix pack.packSizeLimit and --max-pack-size handling checkout: Fix "initial checkout" detection Remove the period after the git-check-attr summary Conflicts: RelNotes
2008-11-12Fix pack.packSizeLimit and --max-pack-size handlingLibravatar Nicolas Pitre1-0/+6
If the limit was sufficiently low, having a single object written could bust the limit (by design), but caused the remaining allowed size to go negative for subsequent objects, which for an unsigned variable is a rather huge limit. Signed-off-by: Nicolas Pitre <nico@cam.org> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2008-11-12status: show "-v" diff even for initial commitLibravatar Jeff King1-1/+1
Since we can use the same "diff against empty tree" trick as we do for the non-initial case, it is trivial to make this work. Signed-off-by: Jeff King <peff@peff.net> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2008-11-12Merge branch 'jk/maint-commit-v-strip' into jk/commit-v-stripLibravatar Junio C Hamano1-0/+73
* jk/maint-commit-v-strip: commit: Fix stripping of patch in verbose mode.
2008-11-12commit: Fix stripping of patch in verbose mode.Libravatar Jeff King1-0/+73
When the "-v" option is given, we put diff of what is to be committed into the commit template, and then strip it back out again after the user has edited it. We used to look for the diff by searching for the "diff --git a/" header. With diff.mnemonicprefix set in the configuration, however, this pattern does not match. The pattern is loosened to cover this case. Also, if the user puts their own diff in the message (e.g., as a sample output), then we will accidentally trigger the pattern, removing part of their output. We can avoid doing this stripping altogether if the user didn't use "-v" in the first place, so we know that any match we find will be a false positive. [jc: this fix was split out of a series originally meant for master.] Signed-off-by: Jeff King <peff@peff.net> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2008-11-12pack-objects: extend --local to mean ignore non-local loose objects tooLibravatar Brandon Casey1-1/+1
With this patch, --local means pack only local objects that are not already packed. Additionally, this fixes t7700 testing whether loose objects in an alternate object database are repacked. Signed-off-by: Brandon Casey <drafnel@gmail.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2008-11-12t7700: demonstrate mishandling of loose objects in an alternate ODBLibravatar Brandon Casey1-0/+19
Loose objects residing in an alternate object database should not be packed when the -l option to repack is used. Signed-off-by: Brandon Casey <drafnel@gmail.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2008-11-12repack: don't repack local objects in packs with .keep fileLibravatar Brandon Casey1-1/+1
If the user created a .keep file for a local pack, then it can be inferred that the user does not want those objects repacked. This fixes the repack bug tested by t7700. Signed-off-by: Brandon Casey <casey@nrlssc.navy.mil> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2008-11-12t7700: demonstrate mishandling of objects in packs with a .keep fileLibravatar Brandon Casey1-0/+38
Objects residing in pack files that have an associated .keep file are not supposed to be repacked into new pack files, but they are. Signed-off-by: Brandon Casey <casey@nrlssc.navy.mil> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2008-11-11git send-email: interpret unknown files as revision listsLibravatar Pierre Habouzit1-0/+8
Filter out all the arguments git-send-email doesn't like to a git format-patch command, that dumps its content to a safe directory. Barf when a file/revision conflict occurs, allow it to be overriden --[no-]format-patch. Signed-off-by: Pierre Habouzit <madcoder@debian.org> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2008-11-11git-remote rename: migrate from remotes/ and branches/Libravatar Miklos Vajna1-0/+33
Remote definition that came from $GIT_DIR/remotes/nick and $GIT_DIR/branches/nick are migrated to [remotes "nick"] section in the configuration file. Signed-off-by: Miklos Vajna <vmiklos@frugalware.org> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2008-11-11git push: Interpret $GIT_DIR/branches in a Cogito compatible wayLibravatar Martin Koegler1-0/+50
Current git versions ignore everything after # (called <head> in the following) when pushing. Older versions (before cf818348f1ab57), interpret #<head> as part of the URL, which make git bail out. As branches origin from Cogito, it is the best to correct this by using the behaviour of cg-push, that is to push HEAD to remote refs/heads/<head>. Signed-off-by: Martin Koegler <mkoegler@auto.tuwien.ac.at> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2008-11-09t5303: fix printf format string for portabilityLibravatar Junio C Hamano1-1/+1
printf "\x01" is bad; write printf "\001" for portability. Testing with dash is a good way to find this kind of POSIX.1 violation breakages. Signed-off-by: Junio C Hamano <gitster@pobox.com>
2008-11-09t5303: work around printf breakage in dashLibravatar Junio C Hamano1-1/+1
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2008-11-09Merge branch 'maint'Libravatar Junio C Hamano1-0/+18
* maint: Documentation: bisect: change a few instances of "git-cmd" to "git cmd" Documentation: rev-list: change a few instances of "git-cmd" to "git cmd" checkout: Don't crash when switching away from an invalid branch.
2008-11-09receive-pack: detect push to current branch of non-bare repoLibravatar Jeff King1-0/+37
Pushing into the currently checked out branch of a non-bare repository can be dangerous; the HEAD then loses sync with the index and working tree, and it looks in the receiving repo as if the pushed changes have been reverted in the index (since they were never there in the first place). This patch adds a safety valve that checks for this condition and either generates a warning or denies the update. We trigger the check only on a non-bare repository, since a bare repo does not have a working tree (and in fact, pushing to the HEAD branch is a common workflow for publishing repositories). The behavior is configurable via receive.denyCurrentBranch, defaulting to "warn" so as not to break existing setups (though it may, after a deprecation period, switch to "refuse" by default). For users who know what they are doing and want to silence the warning (e.g., because they have a post-receive hook that reconciles the HEAD and working tree), they can turn off the warning by setting it to false or "ignore". Signed-off-by: Jeff King <peff@peff.net> Signed-off-by: Junio C Hamano <gitster@pobox.com>