summaryrefslogtreecommitdiff
path: root/t
Commit message (Collapse)AuthorAgeFilesLines
* Introduce GIT_TEMPLATE_DIRJohannes Schindelin2006-12-191-1/+2
| | | | | | | | | | | Instead of passing --template explicitely to init-db and clone, you can just set the environment variable GIT_TEMPLATE_DIR. Also make use of it in the tests, to make sure that the templates are copied. Signed-off-by: Johannes Schindelin <Johannes.Schindelin@gmx.de> Signed-off-by: Junio C Hamano <junkio@cox.net>
* Revert "fix testsuite: make sure they use templates freshly built from the ↵Junio C Hamano2006-12-1911-36/+26
| | | | | | | | | source" This reverts commit 74d20040cafdced657efbf49795183d209a3a07b. Version from Johannes to introduce GIT_TEMPLATE_DIR is simpler, although I unconsciously stayed away from introducing yet another environment variable.
* fix testsuite: make sure they use templates freshly built from the sourceJunio C Hamano2006-12-1811-26/+36
| | | | | | | | | | | The initial t/trash repository for testing was created properly but over time we gained many tests that create secondary test repositories with init-db or clone and they were not careful enough. This fixes it. Signed-off-by: Junio C Hamano <junkio@cox.net>
* Merge branch 'js/branch-config'Junio C Hamano2006-12-172-0/+54
|\ | | | | | | | | | | * js/branch-config: git-branch: rename config vars branch.<branch>.*, too add a function to rename sections in the config
| * git-branch: rename config vars branch.<branch>.*, tooJohannes Schindelin2006-12-161-0/+6
| | | | | | | | | | | | | | | | When renaming a branch, the corresponding config section should be renamed, too. Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de> Signed-off-by: Junio C Hamano <junkio@cox.net>
| * add a function to rename sections in the configJohannes Schindelin2006-12-161-0/+48
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Given a config like this: # A config [very.interesting.section] not The command $ git repo-config --rename-section very.interesting.section bla.1 will lead to this config: # A config [bla "1"] not Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de> Signed-off-by: Junio C Hamano <junkio@cox.net>
* | Fix check_file_directory_conflict().Junio C Hamano2006-12-171-0/+9
|/ | | | | | | | | | | | When replacing an existing file A with a directory A that has a file A/B in it in the index, 'update-index --replace --add A/B' did not properly remove the file to make room for the new directory. There was a trivial logic error, most likely a cut & paste one, dating back to quite early days of git. Signed-off-by: Junio C Hamano <junkio@cox.net>
* Add --add option to git-repo-configBrian Gernhardt2006-12-151-0/+10
| | | | | | | | | | | | | | | For multivars, the "git-repo-config name value ^$" is useful but nonintuitive and troublesome to do repeatedly (since the value is not at the end of the command line). This commit simply adds an --add option that adds a new value to a multivar. Particularly useful for tracking a new branch on a remote: git-repo-config --add remote.origin.fetch +next:origin/next Includes documentation and test. Signed-off-by: Brian Gernhardt <benji@silverinsanity.com> Signed-off-by: Junio C Hamano <junkio@cox.net>
* Enable reflogs by default in any repository with a working directory.Shawn O. Pearce2006-12-151-2/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | New and experienced Git users alike are finding out too late that they forgot to enable reflogs in the current repository, and cannot use the information stored within it to recover from an incorrectly entered command such as `git reset --hard HEAD^^^` when they really meant HEAD^^ (aka HEAD~2). So enable reflogs by default in all future versions of Git, unless the user specifically disables it with: [core] logAllRefUpdates = false in their .git/config or ~/.gitconfig. We only enable reflogs in repositories that have a working directory associated with them, as shared/bare repositories do not have an easy means to prune away old log entries, or may fail logging entirely if the user's gecos information is not valid during a push. This heuristic was suggested on the mailing list by Junio. Documentation was also updated to indicate the new default behavior. We probably should start to teach usuing the reflog to recover from mistakes in some of the tutorial material, as new users are likely to make a few along the way and will feel better knowing they can recover from them quickly and easily, without fsck-objects' lost+found features. Signed-off-by: Shawn O. Pearce <spearce@spearce.org> Signed-off-by: Junio C Hamano <junkio@cox.net>
* make commit message a little more consistent and confortingNicolas Pitre2006-12-151-2/+0
| | | | | | | | | | | | It is nicer to let the user know when a commit succeeded all the time, not only the first time. Also the commit sha1 is much more useful than the tree sha1 in this case. This patch also introduces a -q switch to supress this message as well as the summary of created/deleted files. Signed-off-by: Nicolas Pitre <nico@cam.org> Signed-off-by: Junio C Hamano <junkio@cox.net>
* Merge branch 'jc/read-tree-ignore'Junio C Hamano2006-12-131-8/+74
|\ | | | | | | | | | | | | * jc/read-tree-ignore: read-tree: document --exclude-per-directory Loosen "working file will be lost" check in Porcelain-ish read-tree: further loosen "working file will be lost" check.
| * read-tree: further loosen "working file will be lost" check.Junio C Hamano2006-12-051-8/+74
| | | | | | | | | | | | | | | | | | | | | | | | | | This follows up commit ed93b449 where we removed overcautious "working file will be lost" check. A new option "--exclude-per-directory=.gitignore" can be used to tell the "git-read-tree" command that the user does not mind losing contents in untracked files in the working tree, if they need to be overwritten by a merge (either a two-way "switch branches" merge, or a three-way merge). Signed-off-by: Junio C Hamano <junkio@cox.net>
* | Merge branch 'lh/branch-rename'Junio C Hamano2006-12-131-0/+41
|\ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * lh/branch-rename: git-branch: let caller specify logmsg rename_ref: use lstat(2) when testing for symlink git-branch: add options and tests for branch renaming Conflicts: builtin-branch.c
| * | rename_ref: use lstat(2) when testing for symlinkLars Hjemli2006-12-051-0/+7
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The current check for symlinked reflogs was based on stat(2), which is utterly embarrassing. Fix it, and add a matching testcase. Signed-off-by: Lars Hjemli <hjemli@gmail.com> Signed-off-by: Junio C Hamano <junkio@cox.net>
| * | git-branch: add options and tests for branch renamingLars Hjemli2006-12-051-0/+34
| |/ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Extend git-branch with the following options: git-branch -m|-M [<oldbranch>] newbranch The -M variation is required to force renaming over an exsisting branchname. This also indroduces $GIT_DIR/RENAME_REF which is a "metabranch" used when renaming branches. It will always hold the original sha1 for the latest renamed branch. Additionally, if $GIT_DIR/logs/RENAME_REF exists, all branch rename events are logged there. Finally, some testcases are added to verify the new options. Signed-off-by: Lars Hjemli <hjemli@gmail.com> Signed-off-by: Junio C Hamano <junkio@cox.net>
* | Merge branch 'rr/cvsexportcommit'Junio C Hamano2006-12-131-28/+80
|\ \ | | | | | | | | | | | | * rr/cvsexportcommit: Make cvsexportcommit work with filenames with spaces and non-ascii characters.
| * | Make cvsexportcommit work with filenames with spaces and non-ascii characters.Robin Rosenberg2006-12-111-28/+80
| |/ | | | | | | | | | | | | | | | | | | | | | | | | | | | | This patch uses git-apply to do the patching which simplifies the code a lot and also uses one pass to git-diff. git-apply gives information on added, removed files as well as which files are binary. Removed the test for checking for matching binary files when deleting them since git-apply happily deletes the file. This is matter of taste since we allow some fuzz for text patches also. Error handling was cleaned up, but not much tested. Signed-off-by: Robin Rosenberg <robin.rosenberg@dewire.com> Signed-off-by: Junio C Hamano <junkio@cox.net>
* | Merge branch 'js/merge'Junio C Hamano2006-12-133-14/+128
|\ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * js/merge: merge-recursive: add/add really is modify/modify with an empty base Get rid of the dependency on RCS' merge program merge-file: support -p and -q; fix compile warnings Add builtin merge-file, a minimal replacement for RCS merge xdl_merge(): fix and simplify conflict handling xdl_merge(): fix thinko xdl_merge(): fix an off-by-one bug merge-recursive: use xdl_merge(). xmerge: make return value from xdl_merge() more usable. xdiff: add xdl_merge()
| * | merge-recursive: add/add really is modify/modify with an empty baseJohannes Schindelin2006-12-121-1/+11
| | | | | | | | | | | | | | | | | | | | | Unify the handling for cases C (add/add) and D (modify/modify). Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de> Signed-off-by: Junio C Hamano <junkio@cox.net>
| * | Merge branch 'master' into js/mergeJunio C Hamano2006-12-124-4/+101
| |\ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * master: (42 commits) git-svn: correctly handle packed-refs in refs/remotes/ add test case for recursive merge git-svn: correctly display fatal() error messages git-svn: allow dcommit to take an alternate head git-svn: enable logging of information not supported by git Clarify fetch error for missing objects. Move Fink and Ports check to after config file shortlog: fix segfault on empty authorname shortlog: remove "[PATCH]" prefix from shortlog output Make sure the empty tree exists when needed in merge-recursive. Don't use memcpy when source and dest. buffers may overlap no need to install manpages as executable Documentation: simpler shared repository creation shortlog: fix segfault on empty authorname Add branch.*.merge warning and documentation update Fix perl/ build. git-svn: use do_switch for --follow-parent if the SVN library supports it Fix documentation copy&paste typo git-svn: extra error check to ensure we open a file correctly Documentation: update git-clone man page with new behavior ...
| * | | Get rid of the dependency on RCS' merge programJohannes Schindelin2006-12-121-13/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Now that we have git-merge-file, an RCS merge lookalike, we no longer need it. So long, merge, and thanks for all the fish! Signed-off-by: Johannes Schindelin <Johannes.Schindelin@gmx.de> Signed-off-by: Junio C Hamano <junkio@cox.net>
| * | | Add builtin merge-file, a minimal replacement for RCS mergeJohannes Schindelin2006-12-061-0/+116
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | merge-file has the same syntax as RCS merge, but supports only the "-L" option. For good measure, a test is added, which is quite minimal, though. [jc: further fix for compliation errors included.] Signed-off-by: Johannes Schindelin <Johannes.Schindelin@gmx.de> Signed-off-by: Junio C Hamano <junkio@cox.net>
* | | | Remove uncontested renamed files during merge.Shawn Pearce2006-12-131-0/+97
| |/ / |/| | | | | | | | | | | | | | | | | | | | | | | | | | | | | Prior to 65ac6e9c3f47807cb603af07a6a9e1a43bc119ae we deleted a file from the working directory during a merge if the file existed before the merge started but was renamed by the branch being merged in. This broke in 65ac6e as git-merge-recursive did not actually update the working directory on an uncontested rename. Signed-off-by: Shawn O. Pearce <spearce@spearce.org> Signed-off-by: Junio C Hamano <junkio@cox.net>
* | | add test case for recursive mergeJunio C Hamano2006-12-121-0/+70
| |/ |/| | | | | | | | | | | This test case is based on the bug report by Shawn Pearce. Signed-off-by: Johannes Schindelin <Johannes.Schindelin@gmx.de> Signed-off-by: Junio C Hamano <junkio@cox.net>
* | diff -b: ignore whitespace at end of lineJohannes Schindelin2006-12-041-4/+2
| | | | | | | | | | | | | | | | This is _not_ the same as "treat eol as whitespace", since that would mean that multiple empty lines would be treated as equal to e.g. a space. Signed-off-by: Johannes Schindelin <Johannes.Schindelin@gmx.de> Signed-off-by: Junio C Hamano <junkio@cox.net>
* | Merge branch 'maint'Junio C Hamano2006-12-041-0/+13
|\ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | * maint: receive-pack: do not insist on fast-forward outside refs/heads/ git-mv: search more precisely for source directory in index Conflicts: receive-pack.c
| * | git-mv: search more precisely for source directory in indexJohannes Schindelin2006-12-041-0/+13
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | A move of a directory should find the entries in the index by searching for the name _including_ the slash. Otherwise, the directory can be shadowed by a file when it matches the prefix and is lexicographically smaller, e.g. "ab.c" shadows "ab/". Noticed by Sergey Vlasov. [jc: added Sergey's original reproduction recipe as a test case at the end of t7001.] Signed-off-by: Johannes Schindelin <Johannes.Schindelin@gmx.de> Signed-off-by: Junio C Hamano <junkio@cox.net>
* | | Set permissions of each new file before "cvs add"ing it.Jim Meyering2006-12-041-0/+16
| |/ |/| | | | | | | | | | | | | | | | | Otherwise, an executable script in git would end up being checked into the CVS repository without the execute bit. [jc: with an additional test script from Robin Rosenberg.] Signed-off-by: Jim Meyering <jim@meyering.net> Signed-off-by: Junio C Hamano <junkio@cox.net>
* | git-svn: update tests for recent changesEric Wong2006-11-274-2/+10
| | | | | | | | | | | | | | | | | | | | | | | | * Enable test for delta transfers in full-svn-test. * Run tests against the root of the repository so we won't have to revisit 308906fa6e98132cab839a4f42701386fba368ef and efe4631def181d32f932672a7ea31e52ee0ab308 again. The graft-branches test still runs as before. Signed-off-by: Eric Wong <normalperson@yhbt.net> Signed-off-by: Junio C Hamano <junkio@cox.net>
* | Merge branch 'jc/push-delete-ref'Junio C Hamano2006-11-261-0/+10
|\ \ | | | | | | | | | | | | * jc/push-delete-ref: Allow git push to delete remote ref.
| * | Allow git push to delete remote ref.Junio C Hamano2006-11-241-0/+10
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This allows you to say git send-pack $URL :refs/heads/$branch to delete the named remote branch. The refspec $src:$dst means replace the destination ref with the object known as $src on the local side, so this is a natural extension to make an empty $src mean "No object" to delete the target. Signed-off-by: Junio C Hamano <junkio@cox.net>
* | | Merge branch 'jc/merge'Junio C Hamano2006-11-263-27/+6
|\ \ \ | |/ / |/| | | | | | | | | | | | | | | | | | | | * branch 'jc/merge': git-merge: do not leak rev-parse output used for checking internally. git-merge: tighten error checking. merge: allow merging into a yet-to-be-born branch. git-merge: make it usable as the first class UI remove merge-recursive-old
| * | remove merge-recursive-oldJunio C Hamano2006-11-213-27/+6
| | | | | | | | | | | | | | | | | | This frees the Porcelain-ish that comes with the core Python-free. Signed-off-by: Junio C Hamano <junkio@cox.net>
* | | config option log.showroot to show the diff of root commitsPeter Baumann2006-11-241-0/+1
| |/ |/| | | | | | | | | | | | | This allows one to see a root commit as a diff in commands like git-log, git-show and git-whatchanged. Signed-off-by: Peter Baumann <Peter.B.Baumannn@stud.informatik.uni-erlangen.de> Signed-off-by: Junio C Hamano <junkio@cox.net>
* | trust-executable-bit: fix breakage for symlinksJunio C Hamano2006-11-221-2/+12
|/ | | | | | | | | | An earlier commit f28b34a broke symlinks when trust-executable-bit is not set because it incorrectly assumed that everything was a regular file. Reported by Juergen Ruehle. Signed-off-by: Junio C Hamano <junkio@cox.net>
* git-fetch: follow lightweit tags as well.Junio C Hamano2006-11-191-0/+16
| | | | | | | | This side-ports commit fd19f620 from Cogito, in which I fixed exactly the same bug. Somehow nobody noticed this for a long time in git. Signed-off-by: Junio C Hamano <junkio@cox.net>
* git-pull: allow pulling into an empty repositoryLinus Torvalds2006-11-161-0/+33
| | | | | | | | | | | | | | | | We used to complain that we cannot merge anything we fetched with a local branch that does not exist yet. Just treat the case as a natural extension of fast forwarding and make the local branch'es tip point at the same commit we just fetched. After all an empty repository without an initial commit is an ancestor of any commit. [jc: I added a trivial test. We've become sloppy but we should stick to the discipline of covering new behaviour with new tests. ] Signed-off-by: Linus Torvalds <torvalds@osdl.org> Signed-off-by: Junio C Hamano <junkio@cox.net>
* Merge branch 'maint'Junio C Hamano2006-11-135-1/+168
|\ | | | | | | | | | | | | | | * maint: Rework cvsexportcommit to handle binary files for all cases. Catch errors when writing an index that contains invalid objects. test-lib.sh: A command dying due to a signal is an unexpected failure. git-update-index(1): fix use of quoting in section title
| * Rework cvsexportcommit to handle binary files for all cases.Robin Rosenberg2006-11-133-0/+145
| | | | | | | | | | | | | | | | | | Also adds test cases for adding removing and deleting binary and text files plus two tests for the checks on binary files. Signed-off-by: Robin Rosenberg <robin.rosenberg@dewire.com> Signed-off-by: Junio C Hamano <junkio@cox.net>
| * Catch errors when writing an index that contains invalid objects.Johannes Sixt2006-11-131-0/+22
| | | | | | | | | | | | | | | | | | If git-write-index is called without --missing-ok, it reports invalid objects that it finds in the index. But without this patch it dies right away or may run into an infinite loop. Signed-off-by: Johannes Sixt <johannes.sixt@telecom.at> Signed-off-by: Junio C Hamano <junkio@cox.net>
| * test-lib.sh: A command dying due to a signal is an unexpected failure.Johannes Sixt2006-11-131-1/+1
| | | | | | | | | | | | | | | | When test_expect_failure detects that a command failed, it still has to treat a program that crashed from a signal as unexpected failure. Signed-off-by: Johannes Sixt <johannes.sixt@telecom.at> Signed-off-by: Junio C Hamano <junkio@cox.net>
* | Merge branch 'maint'Junio C Hamano2006-11-092-1/+75
|\ \ | |/ | | | | | | | | | | | | * maint: git-rebase: Use --ignore-if-in-upstream option when executing git-format-patch. git-svn: fix dcommit losing changes when out-of-date from svn git-svn: don't die on rebuild when --upgrade is specified git-svn: avoid printing filenames of files we're not tracking
| * git-svn: fix dcommit losing changes when out-of-date from svnEric Wong2006-11-092-1/+75
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | There was a bug in dcommit (and commit-diff) which caused deltas to be generated against the latest version of the changed file in a repository, and not the revision we are diffing (the tree) against locally. This bug can cause recent changes to the svn repository to be silently clobbered by git-svn if our repository is out-of-date. Thanks to Steven Grimm for noticing the bug. The (few) people using the commit-diff command are now required to use the -r/--revision argument. dcommit usage is unchanged. Signed-off-by: Eric Wong <normalperson@yhbt.net> Signed-off-by: Junio C Hamano <junkio@cox.net>
* | git-pickaxe: retire pickaxeJunio C Hamano2006-11-081-9/+0
| | | | | | | | | | | | | | | | | | Just make it take over blame's place. Documentation and command have all stopped mentioning "git-pickaxe". The built-in synonym is left in the command table, so you can still say "git pickaxe", but it probably is a good idea to retire it as well. Signed-off-by: Junio C Hamano <junkio@cox.net>
* | Merge branch 'jc/pickaxe'Junio C Hamano2006-11-072-0/+10
|\ \
| * | git-pickaxe: blame rewritten.Junio C Hamano2006-10-192-0/+10
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Currently it does what git-blame does, but only faster. More importantly, its internal structure is designed to support content movement (aka cut-and-paste) more easily by allowing more than one paths to be taken from the same commit. Signed-off-by: Junio C Hamano <junkio@cox.net>
* | | Merge branch 'jc/read-tree'Junio C Hamano2006-11-072-23/+195
|\ \ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * jc/read-tree: t6022: ignoring untracked files by merge-recursive when they do not matter merge-recursive: adjust to loosened "working file clobbered" check merge-recursive: make a few functions static. merge-recursive: use abbreviated commit object name. merge: loosen overcautious "working file will be lost" check.
| * | | t6022: ignoring untracked files by merge-recursive when they do not matterJunio C Hamano2006-10-271-23/+142
| | | | | | | | | | | | | | | | Signed-off-by: Junio C Hamano <junkio@cox.net>
| * | | merge: loosen overcautious "working file will be lost" check.Junio C Hamano2006-10-271-0/+53
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The three-way merge complained unconditionally when a path that does not exist in the index is involved in a merge when it existed in the working tree. If we are merging an old version that had that path tracked, but the path is not tracked anymore, and if we are merging that old version in, the result will be that the path is not tracked. In that case we should not complain. Signed-off-by: Junio C Hamano <junkio@cox.net>
* | | | Merge branch 'lj/refs'Junio C Hamano2006-11-013-11/+104
|\ \ \ \ | |/ / / |/| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * lj/refs: (63 commits) Fix show-ref usagestring t3200: git-branch testsuite update sha1_name.c: avoid compilation warnings. Make git-branch a builtin ref-log: fix D/F conflict coming from deleted refs. git-revert with conflicts to behave as git-merge with conflicts core.logallrefupdates thinko-fix git-pack-refs --all core.logallrefupdates create new log file only for branch heads. Remove bashism from t3210-pack-refs.sh ref-log: allow ref@{count} syntax. pack-refs: call fflush before fsync. pack-refs: use lockfile as everybody else does. git-fetch: do not look into $GIT_DIR/refs to see if a tag exists. lock_ref_sha1_basic does not remove empty directories on BSD Do not create tag leading directories since git update-ref does it. Check that a tag exists using show-ref instead of looking for the ref file. Use git-update-ref to delete a tag instead of rm()ing the ref file. Fix refs.c;:repack_without_ref() clean-up path Clean up "git-branch.sh" and add remove recursive dir test cases. ...