summaryrefslogtreecommitdiff
AgeCommit message (Collapse)AuthorFilesLines
2005-11-30merge-one-file: leave unmerged index entries upon automerge failure.Libravatar Linus Torvalds1-5/+1
When automerge fails, we used to collapse the path to stage0 from "our" branch, to help "diff-files" users to view the half-merged state against the current HEAD. Now diff-files has been taught how to compare with unmerged stage2,leaving them unmerged is a better thing to do, especially this prevents the unresolved conflicts to be committed by mistake. Signed-off-by: Junio C Hamano <junkio@cox.net>
2005-11-30diff-files: -1/-2/-3 to diff against unmerged stage.Libravatar Linus Torvalds2-8/+64
While resolving conflicted merge, it was not easy to compare the working tree file with unmerged index entries. This commit introduces new options -1/-2/-3 (with synonyms --base, --ours, and --theirs) to compare working tree files with specified stages. When none of these options are given, the command defaults to -2 if the index file is unmerged, otherwise it acts as before. [jc: majorly butchered from the version Linus originally posted.] Signed-off-by: Junio C Hamano <junkio@cox.net>
2005-11-29git-diff: do not turn off -p/-M with any diff options.Libravatar Junio C Hamano1-2/+15
When the user gives a diff option (e.g. --cached) to "git diff", we turned off the built-in default option -p, which is usually not what user wants to see. This commit makes lack of --name-status, --name-only nor -r to add -p, and lack of -B*, -C* nor -M* to add -M to the flags given to the underlying diff. Signed-off-by: Junio C Hamano <junkio@cox.net>
2005-11-29Merge http://www.kernel.org/pub/scm/gitk/gitkLibravatar Junio C Hamano1-54/+88
2005-11-29[PATCH] Add tests for git-mv in subdirectoriesLibravatar Alex Riesen1-0/+27
Junio C Hamano, Sat, Nov 26, 2005 03:45:52 +0100: > I haven't seriously used git-mv myself, so > somebody needs to test it, and if it actually works and Ack on > it, please. It actually works in subdirs. Signed-off-by: Junio C Hamano <junkio@cox.net>
2005-11-29[PATCH] Make git-mv work in subdirectories, tooLibravatar Johannes Schindelin1-9/+3
Turns out, all git programs git-mv uses are capable of operating in a subdirectory just fine. So don't complain about it. [jc: I think that sounds sane. You need to grab the exit status from `git-rev-parse --git-dir`, which I added. Alex Riesen says this worked fine.] Signed-off-by: Johannes Schindelin <Johannes.Schindelin@gmx.de> Signed-off-by: Junio C Hamano <junkio@cox.net>
2005-11-30gitk: Add a preferences dialog with some basic stuffLibravatar Paul Mackerras1-54/+88
There is a lot more that could be put in, such as a selector for the font family etc., but this is a start. Signed-off-by: Paul Mackerras <paulus@samba.org>
2005-11-29SVN import: Use one log callLibravatar Matthias Urlichs2-29/+21
One "svn log" (or its equivalent) per revision adds delay and server load. Instead, open two SVN connections -- one for the log, and one for the files. Positive side effect: Only those log entries which actually contain data are committed => no more empty commits. Also, change the "-l" option to set the maximum revision to be pulled, not the number of revisions. Signed-off-by: Junio C Hamano <junkio@cox.net>
2005-11-29Fix typos and minor format issues.Libravatar jdl@freescale.com1-7/+7
Signed-off-by: Jon Loeliger <jdl@freescale.com> Signed-off-by: Junio C Hamano <junkio@cox.net>
2005-11-29http-push cleanupLibravatar Nick Hengeveld1-2/+3
The malloc patch from Jan Andres fixed the problem that was causing a segfault when freeing the lock token, and Johannes Schindelin found and fixed a problem when no URL is specified on the command line. Signed-off-by: Nick Hengeveld <nickh@reactrix.com> Signed-off-by: Junio C Hamano <junkio@cox.net>
2005-11-28git-clone --shared should imply --localLibravatar Pavel Roskin1-1/+1
The "--shared" option to git-clone is silently ignored if "--local" is not specified. The manual doesn't mention such dependency. Make "--shared" imply "--local". Signed-off-by: Pavel Roskin <proski@gnu.org> Signed-off-by: Junio C Hamano <junkio@cox.net>
2005-11-28write_name_quoted(): make one of the path a counted string.Libravatar Junio C Hamano4-16/+29
This is to prepare for ls-tree updates. Signed-off-by: Junio C Hamano <junkio@cox.net>
2005-11-28Documentation: Describe merge operation a bit better.Libravatar Junio C Hamano1-0/+95
In git-merge documentation, add a section to describe what happens to the index and working tree during merge, and what their cleanliness requirements are before the merge. Signed-off-by: Junio C Hamano <junkio@cox.net>
2005-11-28Fix typo in http-push.cLibravatar Jan Andres1-1/+1
Typo resulted in accessing past the beginning of a string causing segfaults. [jc: signoffs?]
2005-11-28name-rev: fix parent counting.Libravatar Junio C Hamano1-2/+2
Noticed by linux@horizon.com. The first merge parent (typically "our branch") is ^1, not ^0, and the first other branch is ^2. Signed-off-by: Junio C Hamano <junkio@cox.net>
2005-11-28rebase: one safety net, one bugfix and one optimization.Libravatar Junio C Hamano1-1/+27
When a .dotest from a previously failed rebase or patch application exists, rebase got confused and tried to apply mixture of what was already there and what is being rebased. Check the existence of the directory and barf. It failed with an mysterious "fatal: cannot read mbox" message if the branch being rebased is fully in sync with the base. Also if the branch is a proper descendant of the base, there is no need to run rebase logic. Prevent these from happening by checking where the merge-base is. Signed-off-by: Junio C Hamano <junkio@cox.net>
2005-11-28Merge http://www.kernel.org/pub/scm/gitk/gitkLibravatar Junio C Hamano1-41/+35
2005-11-28git-mv: quote $src in regexp properly.Libravatar Junio C Hamano1-1/+1
Noticed and fixed by Matthias Urlichs and Josef Weidendorfer. Signed-off-by: Junio C Hamano <junkio@cox.net>
2005-11-28[PATCH] gitk: Use i18n.commitencoding configuration item.Libravatar Junio C Hamano1-1/+8
Hardcoding "utf-8" in the script breaks projects that use local encoding, so allow setting i18n.commitEncoding. Signed-off-by: Junio C Hamano <junkio@cox.net> Signed-off-by: Paul Mackerras <paulus@samba.org>
2005-11-28config.c: constness tightening to avoid compilation warning.Libravatar Junio C Hamano1-1/+1
Signed-off-by: Junio C Hamano <junkio@cox.net>
2005-11-28gitk: Fix diff this->selected and selected->this functionsLibravatar Paul Mackerras1-12/+10
The change in 8b7e5d76e836396a097bb6f61cf930ea872a7bd3, which makes a couple of git-diff-tree calls supply only one id rather than two, fixes the display when showing what a single commit did with dense revlists, but broke the diff this->selected and diff selected->this right-click menu functions. Yann Dirson pointed this out and had a patch that fixed the diff menu functions by passing a "singlecommit" flag around. This fixes it a bit differently, by making the ids and diffids variables be either a single id, in the case of showing what a commit did, or {oldid newid}, in the case of the diff menu functions. That way we can just pass $ids to git-diff-tree as is. Most of the changes in fact are just reversing the order of ids in $ids and $diffids, because they used to be {child parent}, but git-diff-tree requires old id before new id. Signed-off-by: Paul Mackerras <paulus@samba.org>
2005-11-28mailinfo: Do not use -u=<encoding>; say --encoding=<encoding>Libravatar Junio C Hamano2-5/+12
Specifying the value for a single letter, single dash option parameter with equal sign looked funny, and more importantly calling the flag to override encoding from utf-8 to something else "-u" (obviously abbreviated from "utf-8") did not make any sense. So spell it out. Signed-off-by: Junio C Hamano <junkio@cox.net>
2005-11-27mailinfo: Use i18n.commitencodingLibravatar Junio C Hamano1-8/+9
This uses i18n.commitencoding configuration item to pick up the default commit encoding for the repository when converting form e-mail encoding to commit encoding (the default is utf8). Signed-off-by: Junio C Hamano <junkio@cox.net>
2005-11-27mailinfo: allow -u to fall back on latin1 to utf8 conversion.Libravatar Junio C Hamano1-24/+35
When the message body does not identify what encoding it is in, -u assumes it is in latin-1 and converts it to utf8, which is the recommended encoding for git commit log messages. With -u=<encoding>, the conversion is made into the specified one, instead of utf8, to allow project-local policies. Signed-off-by: Junio C Hamano <junkio@cox.net>
2005-11-27Introduce i18n.commitencoding.Libravatar Junio C Hamano3-0/+9
This is to hold what the project-local rule as to the charset/encoding for the commit log message is. Lack of it defaults to utf-8. Signed-off-by: Junio C Hamano <junkio@cox.net>
2005-11-27Fix gitk this->selected diffsLibravatar Yann Dirson1-21/+32
The change made in 8b7e5d76e836396a097bb6f61cf930ea872a7bd3 to accomodate dense revlists in single-commit diffs has broken computing of diffs between arbitrary trees, which does need to consider two commit ids. This patch changes the two git-diff-tree calls to get the necessary two ids in this case. It does so by propagating a "singlecommit" flag through all functions involved via an additional argument. Signed-off-by: Yann Dirson <ydirson@altern.org> Signed-off-by: Junio C Hamano <junkio@cox.net>
2005-11-27Merge http://www.kernel.org/pub/scm/gitk/gitkLibravatar Junio C Hamano1-43/+45
2005-11-27git-mv: follow -k request even on failing renamesLibravatar Josef Weidendorfer1-0/+5
-k requests to keep running on an error condition. Previously, git-mv stopped on failing renames even with -k. There are some error conditions which are not checked in the first phase of git-mv, eg. 'permission denied'. Still, option -k should work. Signed-off-by: Josef Weidendorfer <Josef.Weidendorfer@gmx.de> Signed-off-by: Junio C Hamano <junkio@cox.net>
2005-11-27Small fixes in Documentation/git-mv.txtLibravatar Josef Weidendorfer1-4/+4
The two synopsis lines have to be prefixed with a space so that asciidoc inserts a line break inbetween for the manual page. Signed-off-by: Josef Weidendorfer <Josef.Weidendorfer@gmx.de> Signed-off-by: Junio C Hamano <junkio@cox.net>
2005-11-27git-mv: fully detect 'directory moved into itself'Libravatar Josef Weidendorfer1-1/+1
This gives a better error message when trying to move a directory into some subdirectory of itself; ie. no real bug fix: renaming already failed before, but with a strange "invalid argument". Signed-off-by: Josef Weidendorfer <Josef.Weidendorfer@gmx.de> Signed-off-by: Junio C Hamano <junkio@cox.net>
2005-11-27git-mv: keep git index consistent with file system on failed renameLibravatar Josef Weidendorfer1-2/+10
When doing multiple renames, and a rename in the middle fails, git-mv did not store the successful renames in the git index; this is fixed by delaying the error message on a failed rename to after the git updating. Signed-off-by: Josef Weidendorfer <Josef.Weidendorfer@gmx.de> Signed-off-by: Junio C Hamano <junkio@cox.net>
2005-11-27git-mv: shrink usage, no usage on errorLibravatar Josef Weidendorfer1-27/+19
Small fixes to be consistent with other git scripts: - usage message is only about options and arguments - on error, exit(1) without the usage message Additionally, "beautifies" output with -n a little bit Signed-off-by: Josef Weidendorfer <Josef.Weidendorfer@gmx.de> Signed-off-by: Junio C Hamano <junkio@cox.net>
2005-11-27setup_git_directory(): check repository format version.Libravatar Junio C Hamano1-0/+1
After figuring out the GIT_DIR location, make sure the repository is of the right vintage, by calling check_repository_format(). . Signed-off-by: Junio C Hamano <junkio@cox.net>
2005-11-27init-db: check template and repository format.Libravatar Junio C Hamano3-42/+64
This makes init-db repository version aware. It checks if an existing config file says the repository being reinitialized is of a wrong version and aborts before doing further harm. When copying the templates, it makes sure the they are of the right repository format version. Otherwise the templates are ignored with an warning message. It copies the templates before creating the HEAD, and if the config file is copied from the template directory, reads it, primarily to pick up the value of core.symrefsonly. It changes the way the result of the filemode reliability test is written to the configuration file using git_config_set(). The test is done even if the config file was copied from the templates. And finally, our own repository format version is written to the config file. Signed-off-by: Junio C Hamano <junkio@cox.net>
2005-11-27Check repository format version in enter_repo().Libravatar Junio C Hamano1-0/+1
After daemon, upload-pack and receive-pack find out where the git directory is and chdir() there, make sure that repository is in a format we understand, after putenv("GIT_DIR=.") so that it knows to pick up the configuration file from there. Signed-off-by: Junio C Hamano <junkio@cox.net>
2005-11-27Repository format version check.Libravatar Junio C Hamano3-0/+22
This adds the repository format version code, first done by Martin Atukunda. Signed-off-by: Junio C Hamano <junkio@cox.net>
2005-11-26format-patch: output filename reported to stdout verbatim.Libravatar Junio C Hamano1-2/+2
Prepending asterisk to the output was just adding noise, and making scripts like proposed git-send-mail by Andreas Ericsson do unnecessary work. Signed-off-by: Junio C Hamano <junkio@cox.net>
2005-11-25name-rev: fix off-by-one error in --stdin.Libravatar Junio C Hamano1-4/+3
It dropped the last hexdigit in the object name. [jc: Noticed and patch supplied by ALASCM, reworked to apply at the right place by me] Signed-off-by: Junio C Hamano <junkio@cox.net>
2005-11-25git-mv is not able to handle big directoriesLibravatar Alexander Litvinov1-9/+22
Use update-index --stdin to handle large number of files without breaking exec() argument storage limit. [jc: with minor cleanup from the version posted on the list] Signed-off-by: Junio C Hamano <junkio@cox.net>
2005-11-25shell.c: complain on insufficient arguments.Libravatar Junio C Hamano1-2/+1
Originally noticed by Tommi Virtanen, but done slightly differently. Signed-off-by: Junio C Hamano <junkio@cox.net>
2005-11-25git-sh-setup: move the repository check to a core program.Libravatar Junio C Hamano1-7/+2
Any core commands that use setup_git_directory() now check if given GIT_DIR is really a valid repository, so the same check in git-sh-setup can use it without reimplementing it in shell. This commit changes git-sh-setup to use git-var command for that, although any other commands would do. Note that we export GIT_DIR explicitly when calling git-var; without it, the caller of this script would use GIT_DIR that we return (which is to assume ./.git unless the caller has it elsewhere) while git-var would go up to find a .git directory in our parent directories, which would be checking a different directory from what our callers will be using. Signed-off-by: Junio C Hamano <junkio@cox.net>
2005-11-25setup_git_directory: make sure GIT_DIR is a valid repository.Libravatar Junio C Hamano1-5/+37
setup_git_directory() always trusted what the user told where GIT_DIR was, and assumed that is a valid .git/ directory. This commit changes it to at least do the same level validation as is_toplevel_directory() does -- has refs/, has objects/ unless GIT_OBJECT_DIRECTORY is set, and has valid HEAD symlink or symref. Signed-off-by: Junio C Hamano <junkio@cox.net>
2005-11-25git-var: make it work in subdirectory.Libravatar Junio C Hamano1-0/+2
Use setup_git_directory() so that it can find its .git directory. Signed-off-by: Junio C Hamano <junkio@cox.net>
2005-11-25git-sh-setup: die if outside git repository.Libravatar Junio C Hamano26-31/+34
Now all the users of this script detect its exit status and die, complaining that it is outside git repository. So move the code that dies from all callers to git-sh-setup script. Signed-off-by: Junio C Hamano <junkio@cox.net>
2005-11-25parse-remote and ls-remote clean-up.Libravatar Junio C Hamano2-2/+3
There is no reason to use git-sh-setup from git-ls-remote. git-parse-remote can help the caller to use .git/remotes shortcut if it is run inside a git repository, but can still be useful outside a git repositoryas long as the caller does not use any shortcut. Use "git-rev-parse --git-dir" to figure out where the GIT_DIR is, instead of using git-sh-setup. This also makes "git-ls-remote origin" to work from inside a subdirectory of a git managed repository as a side effect. Signed-off-by: Junio C Hamano <junkio@cox.net>
2005-11-25Prevent "git-commit -a path1 path2..."Libravatar Junio C Hamano1-1/+4
When you want to create a partial commit, giving -a by mistake would ignore the given path. Prevent it. Signed-off-by: Junio C Hamano <junkio@cox.net>
2005-11-25config.c: avoid shadowing global.Libravatar Junio C Hamano1-5/+5
This is purely cosmetic, but avoid shadowing "FILE *config_file" global in git_config_set_multivar() function. Signed-off-by: Junio C Hamano <junkio@cox.net>
2005-11-25Fix a warning about unused value.Libravatar YOSHIFUJI Hideaki / 吉藤英明1-1/+1
Fix a warning: git.c:276: warning: value computed is not used Signed-off-by: YOSHIFUJI Hideaki <yoshfuji@linux-ipv6.org> Signed-off-by: Junio C Hamano <junkio@cox.net>
2005-11-25cvsimport: Don't let local settings hinder cvs user-migration.Libravatar Andreas Ericsson1-1/+1
Avoid this by passing "--norc" to cvsps. Signed-off-by: Andreas Ericsson <ae@op5.se> Signed-off-by: Junio C Hamano <junkio@cox.net>
2005-11-24Rename git-config-set to git-repo-configLibravatar Johannes Schindelin6-51/+51
... and adjust all references. Signed-off-by: Johannes Schindelin <Johannes.Schindelin@gmx.de> Signed-off-by: Junio C Hamano <junkio@cox.net>