AgeCommit message (Collapse)Author
2007-07-24user-manual: fix typolets.Junio C Hamano
Signed-off-by: Junio C Hamano <>
2007-07-24Mark user-manual as UTF-8Junio C Hamano
There have been several complaints against's user-manual page. The document is generated in ISO-8859-1 by the xsltproc toolchain (I suspect this is because released docbook.xsl we use has xsl:output element that says the output is ISO-8859-1) but server delivers it with "charset=UTF-8", and all h*ll breaks loose. This attempts to force UTF-8 on the generating end. Signed-off-by: Junio C Hamano <>
2007-07-24Teach revision machinery about --no-walkJohannes Schindelin
The flag "no_walk" is present in struct rev_info since a long time, but so far has been in use exclusively by "git show". With this flag, you can see all your refs, ordered by date of the last commit: $ git log --abbrev-commit --pretty=oneline --decorate --all --no-walk which is extremely helpful if you have to juggle with a lot topic branches, and do not remember in which one you introduced that uber debug option, or simply want to get an overview what is cooking. (Note that the "git log" invocation above does not output the same as $ git show --abbrev-commit --pretty=oneline --decorate --all --quiet since "git show" keeps the alphabetic order that "--all" returns the refs in, even if the option "--date-order" was passed.) For good measure, this also adds the "--do-walk" option which overrides "--no-walk". Signed-off-by: Johannes Schindelin <> Signed-off-by: Junio C Hamano <>
2007-07-24filter-branch: Big syntax change; support rewriting multiple refsJohannes Schindelin
We used to take the first non-option argument as the name for the new branch. This syntax is not extensible to support rewriting more than just HEAD. Instead, we now have the following syntax: git filter-branch [<filter options>...] [<rev-list options>] All positive refs given in <rev-list options> are rewritten. Yes, in-place. If a ref was changed, the original head is stored in refs/original/$ref now, for your inspecting pleasure, in addition to the reflogs (since it is easier to inspect "git show-ref | grep original" than to inspect all the reflogs). This commit also adds the --force option to remove .git-rewrite/ and all refs from refs/original/ before filtering. Signed-off-by: Johannes Schindelin <> Signed-off-by: Junio C Hamano <>
2007-07-24rebase -i: exchange all "if [ .. ]" by "if test .."Johannes Schindelin
This patch is literally :%s/if \[ *\(.*[^ ]\) *\]/if test \1/ in vi, after making sure that the other instances of "[..]" are not actually invocations of "test". Signed-off-by: Johannes Schindelin <> Signed-off-by: Junio C Hamano <>
2007-07-24Shut "git rebase -i" up when no --verbose was givenJohannes Schindelin
Up to now, git rebase -i was quite chatty, showing through all the nice core programs it called. Now it only shows a progress meter by default. Signed-off-by: Johannes Schindelin <> Signed-off-by: Junio C Hamano <>
2007-07-24mailinfo: fix 'fatal: cannot convert from utf-8 to utf-8'Johannes Schindelin
For some reason, I got this error message. Maybe it does not make sense, but then we should not really try to convert the text when it is not necessary. Signed-off-by: Johannes Schindelin <> Signed-off-by: Junio C Hamano <>
2007-07-22gitweb: Fix support for legacy gitweb config for snapshotsJakub Narebski
Earlier commit which cleaned up snapshot support and introduced support for multiple snapshot formats changed the format of $feature{'snapshot'}{'default'} (gitweb configuration) and gitweb.snapshot configuration variable (repository configuration). It supported old gitweb.snapshot values of 'gzip', 'bzip2' and 'zip' and tried to support, but failed to do that, old values of $feature{'snapshot'}{'default'}; at least those corresponding to old gitweb.snapshot values of 'gzip', 'bzip2' and 'zip', i.e. ['x-gzip', 'gz', 'gzip'] ['x-bzip2', 'bz2', 'bzip2'] ['x-zip', 'zip', ''] This commit moves legacy configuration support out of feature_snapshot subroutine to separate filter_snapshot_fmts subroutine. The filter_snapshot_fmts is used on result on result of gitweb_check_feature('snapshot'). This way feature_snapshot deals _only_ with repository config. As a byproduct you can now use 'gzip' and 'bzip2' as aliases to 'tgz' and 'tbz2' also in $feature{'snapshot'}{'default'}, not only in gitweb.snapshot. While at it do some whitespace cleanup: use tabs for indent, but spaces for align. Noticed-by: Matt McCutchen <> Signed-off-by: Jakub Narebski <> Tested-by: Matt McCutchen <> Signed-off-by: Junio C Hamano <>
2007-07-22fsck --lost-found: write blob's contents, not their SHA-1Johannes Schindelin
When looking for a lost blob, it is much nicer to be able to grep through .git/lost-found/other/* than to write an inefficient loop over the file names. So write the contents of the dangling blobs, not their object names. Signed-off-by: Johannes Schindelin <> Signed-off-by: Junio C Hamano <>
2007-07-22Avoid to duplicate commit message when is not encodedMarco Costalba
When a commit message doesn't have encoding information and encoding output is utf-8 (default) then an useless xstrdup() of commit message is done. If we assume most of users live in an utf-8 world, this useless copy is the common case. Performance issue found with KCachegrind. Signed-off-by: Marco Costalba <> Signed-off-by: Junio C Hamano <>
2007-07-22Synonyms: -i == --regexp-ignore-case, -E == --extended-regexpJunio C Hamano
These options to log family were too long to type. Give them shorter synonyms. Fix the parsing of the long options while at it. Signed-off-by: Junio C Hamano <>
2007-07-22Documentation/gitignore.txt: Fix the seriously misleading priority explanationDavid Kastrup
Signed-off-by: David Kastrup <> Signed-off-by: Junio C Hamano <>
2007-07-22Fix VISUAL/EDITOR preference order in Documentation/config.txt.Junio C Hamano
I screwed up when amending ef0c2abf. Signed-off-by: Junio C Hamano <>
2007-07-22gitweb: snapshot cleanups & support for offering multiple formatsMatt McCutchen
- Centralize knowledge about snapshot formats (mime types, extensions, commands) in %known_snapshot_formats and improve how some of that information is specified. In particular, zip files are no longer a special case. - Add support for offering multiple snapshot formats to the user so that he/she can download a snapshot in the format he/she prefers. The site-wide or project configuration now gives a list of formats to offer, and if more than one format is offered, the "_snapshot_" link becomes something like "snapshot (_tar.bz2_ _zip_)". - If only one format is offered, a tooltip on the "_snapshot_" link tells the user what it is. - Fix out-of-date "tarball" -> "archive" in comment. Alert for gitweb site administrators: This patch changes the format of $feature{'snapshot'}{'default'} in gitweb_config.perl from a list of three pieces of information about a single format to a list of one or more formats you wish to offer from the set ('tgz', 'tbz2', 'zip'). Update your gitweb_config.perl appropriately. There was taken care for old-style gitweb configuration to work as it used to, but this backward compatibility works only for the values which correspond to gitweb.snapshot values of 'gzip', 'bzip2' and 'zip', i.e. ['x-gzip', 'gz', 'gzip'] ['x-bzip2', 'bz2', 'bzip2'] ['x-zip', 'zip', ''] The preferred names for gitweb.snapshot in repository configuration have also changed from 'gzip' and 'bzip2' to 'tgz' and 'tbz2', but the old names are still recognized for compatibility. Signed-off-by: Matt McCutchen <> Signed-off-by: Jakub Narebski <> Signed-off-by: Junio C Hamano <>
2007-07-21rebase -i: call editor just once for a multi-squashJohannes Schindelin
Sometimes you want to squash more than two commits. Before this patch, the editor was fired up for each squash command. Now the editor is started only with the last squash command. Signed-off-by: Johannes Schindelin <> Signed-off-by: Junio C Hamano <>
2007-07-21Fix up duplicate parents removalLinus Torvalds
This removes duplicate parents properly, making gitk happy again. Signed-off-by: Linus Torvalds <> Signed-off-by: Junio C Hamano <>
2007-07-20gitweb cleanup: Move @diff_opts declaration earlierJakub Narebski
Move @diff_opts declaration earlier, so that all gitweb options are together (and not separated by %feature hash and some subroutines), with the exception of $GITWEB_CONFIG which must be after all option variables including %feature hash. While at it, in the moved comment, note that diff option '-C' implies '-M', instead of suggesting that '-M', '-C' is required. Signed-off-by: Jakub Narebski <> Signed-off-by: Junio C Hamano <>
2007-07-20Add GIT_EDITOR environment and core.editor configuration variablesAdam Roben
These variables let you specify an editor that will be launched in preference to the EDITOR and VISUAL environment variables. The order of preference is GIT_EDITOR, core.editor, EDITOR, VISUAL. [jc: added a test and config variable documentation] Signed-off-by: Adam Roben <> Signed-off-by: Junio C Hamano <>
2007-07-20Document how to tell git to not launch a pagerSteven Grimm
Signed-off-by: Steven Grimm <> Signed-off-by: Junio C Hamano <>
2007-07-19Rename read_pipe() with read_fd() and make its buffer nul-terminated.Carlos Rica
The new name is closer to the purpose of the function. A NUL-terminated buffer makes things easier when callers need that. Since the function returns only the memory written with data, almost always allocating more space than needed because final size is unknown, an extra NUL terminating the buffer is harmless. It is not included in the returned size, so the function remains working as before. Also, now the function allows the buffer passed to be NULL at first, and alloc_nr is now used for growing the buffer, instead size=*2. Signed-off-by: Carlos Rica <> Signed-off-by: Junio C Hamano <>
2007-07-19Merge branch 'master' of git:// C Hamano
* 'master' of git:// git-p4: Cleanup, used common function for listing imported p4 branches git-p4: Fix upstream branch detection for submit/rebase with multiple branches. git-p4: Cleanup, make listExistingP4Branches a global function for later use. git-p4: input to "p4 files" by stdin instead of arguments git-p4: use subprocess in p4CmdList
2007-07-19filter-branch: get rid of "set -e"Johannes Schindelin
It was reported by Alex Riesen that "set -e" can break something as trivial as "unset CDPATH" in bash. So get rid of "set -e". Signed-off-by: Johannes Schindelin <> Signed-off-by: Junio C Hamano <>
2007-07-19git-svn: Minimalistic patch which allows svn usernames with space(s).Richard MUSIL
Changed filter for username in svn-authors file, so even 'user name' is accepted. Acked-by: Eric Wong <> Signed-off-by: Junio C Hamano <>
2007-07-19Do a better job at guessing unknown character setsLinus Torvalds
At least in the kernel development community, we're generally slowly converting to UTF-8 everywhere, and the old default of Latin1 in emails is being supplanted by UTF-8, and it doesn't necessarily show up as such in the mail headers (because, quite frankly, when people send patches around, they want the email client to do as little as humanly possible about the patch) Despite that, it's often the case that email addresses etc still have Latin1, so I've seen emails where this is a mixed bag, with Signed-off parts being copied from email (and containing Latin1 characters), and the rest of the email being a patch in UTF-8. So this suggests a very natural change: if the target character set is utf-8 (the default), and if the source already looks like utf-8, just assume that it doesn't need any conversion at all. Only assume that it needs conversion if it isn't already valid utf-8, in which case we (for historical reasons) will assume it's Latin1. Basically no really _valid_ latin1 will ever look like utf-8, so while this changes our historical behaviour, it doesn't do so in practice, and makes the default behaviour saner for the case where the input was already in proper format. We could do a more fancy guess, of course, but this correctly handled a series of patches I just got from Andrew that had a mixture of Latin1 and UTF-8 (in different emails, but without any character set indication). Signed-off-by: Linus Torvalds <> Signed-off-by: Junio C Hamano <>
2007-07-19Document "git stash message..."しらいしななこ
The command was recently updated to take message on the command line, but this feature has not been documented. Signed-off-by: Nanako Shiraishi <> Signed-off-by: Junio C Hamano <>
2007-07-19unpack-trees.c: assume submodules are clean during check-outSven Verdoolaege
In particular, when moving back to a commit without a given submodule and then moving back forward to a commit with the given submodule, we shouldn't complain that updating would lose untracked file in the submodule, because git currently does not checkout subprojects during superproject check-out. Signed-off-by: Sven Verdoolaege <> Signed-off-by: Junio C Hamano <>
2007-07-19Merge branch 'maint'Junio C Hamano
* maint: Force listingblocks to be monospaced in manpages Do not expect unlink(2) to fail on a directory.
2007-07-18Force listingblocks to be monospaced in manpagesJulian Phillips
For the html output we can use a stylesheet to make sure that the listingblocks are presented in a monospaced font. For the manpages do it manually by inserting a ".ft C" before and ".ft" after the block in question. In order for these roff commands to get through to the manpage they have to be element encoded to prevent quoting. Signed-off-by: Julian Phillips <> Signed-off-by: Junio C Hamano <>
2007-07-18git-p4: Cleanup, used common function for listing imported p4 branchesSimon Hausmann
Signed-off-by: Simon Hausmann <>
2007-07-18git-p4: Fix upstream branch detection for submit/rebase with multiple branches.Simon Hausmann
Don't use git name-rev to locate the upstream git-p4 branch for rebase and submit but instead locate the branch by comparing the depot paths. name-rev may produce results like wrongbranch~12 as it uses the first match. Signed-off-by: Simon Hausmann <> Signed-off-by: Marius Storm-Olsen <>
2007-07-18git-p4: Cleanup, make listExistingP4Branches a global function for later use.Simon Hausmann
Signed-off-by: Simon Hausmann <> Signed-off-by: Marius Storm-Olsen <>
2007-07-18Do not expect unlink(2) to fail on a directory.Junio C Hamano
When "git checkout-index" checks out path A/B/C, it makes sure A and A/B are truly directories; if there is a regular file or symlink at A, we prefer to remove it. We used to do this by catching an error return from mkdir(2), and on EEXIST did unlink(2), and when it succeeded, tried another mkdir(2). Thomas Glanzmann found out the above does not work on Solaris for a root user, as unlink(2) was so old fashioned there that it allowed to unlink a directory. As pointed out, this still doesn't guarantee that git won't call "unlink()" on a directory (race conditions etc), but that's fundamentally true (there is no "funlink()" like there is "fstat()"), and besides, that is in no way git-specific (ie it's true of any application that gets run as root). Acked-by: Linus Torvalds <> Signed-off-by: Junio C Hamano <>
2007-07-17Update INSTALLJunio C Hamano
We haven't used bignum in rev-list from openssl nor elsewhere for a long time. Also git-gui is now part of git.git itself, and depends on wish. Signed-off-by: Junio C Hamano <>
2007-07-17git-p4: input to "p4 files" by stdin instead of argumentsScott Lamb
This approach, suggested by Alex Riesen, bypasses the need for xargs-style argument list handling. The handling in question looks broken in a corner case with SC_ARG_MAX=4096 and final argument over 96 characters. Signed-off-by: Scott Lamb <> Signed-off-by: Simon Hausmann <>
2007-07-17git-p4: use subprocess in p4CmdListScott Lamb
This allows bidirectional piping - useful for "-x -" to avoid commandline arguments - and is a step toward bypassing the shell. Signed-off-by: Scott Lamb <> Signed-off-by: Simon Hausmann <>
2007-07-17Fix git-branch documentation when using remote refsFrancis Moreau
Signed-off-by: Francis Moreau <> Signed-off-by: Junio C Hamano <>
2007-07-16git-svn: fix commiting renames over DAV with funky file namesEric Wong
Renaming files with non-URI friendly characters caused breakage when committing to DAV repositories (over http(s)). Even if I try leaving out the $self->{url} from the return value of url_path(), a partial (without host), unescaped path name does not work. Filenames for DAV repos need to be URI-encoded before being passed to the library. Since this bug did not affect file:// and svn:// repos, the git-svn test library needed to be expanded to include support for starting Apache with mod_dav_svn enabled. This new test is not enabled by default, but can be enabled by setting SVN_HTTPD_PORT to any available TCP/IP port on Additionally, for running this test, the following variables (with defaults shown) can be changed for the suitable system. The default values are set for Debian systems: SVN_HTTPD_MODULE_PATH=/usr/lib/apache2/modules SVN_HTTPD_PATH=/usr/sbin/apache2 Signed-off-by: Eric Wong <> Signed-off-by: Junio C Hamano <>
2007-07-16contrib/emacs/Makefile: Also install .el files.David Kastrup
Signed-off-by: David Kastrup <> Signed-off-by: Junio C Hamano <>
2007-07-15GIT v1.5.3-rc2v1.5.3-rc2Junio C Hamano
Signed-off-by: Junio C Hamano <>
2007-07-15Demote git-p4import to contrib status.Sean
Move and Documentation/git-p4import.txt into a contrib/p4import directory. Add a README there directing people to contrib/fast-import/git-p4 as a better alternative. Signed-off-by: Sean Estabrooks <> Signed-off-by: Junio C Hamano <>
2007-07-15Remove p4 rpm from
Signed-off-by: Sean Estabrooks <> Signed-off-by: Junio C Hamano <>
2007-07-15Remove "WITH_P4IMPORT" knob from the MakefileSean
Signed-off-by: Sean Estabrooks <> Signed-off-by: Junio C Hamano <>
2007-07-15git-cvsserver: detect/diagnose write failure, etc.Jim Meyering
There were many operations that did not notice and report errors to the CVS client, which would have resulted in corrupt working tree. Signed-off-by: Jim Meyering <> Signed-off-by: Junio C Hamano <>
2007-07-15Use $(RM) in Makefiles instead of 'rm -f'Emil Medve
Signed-off-by: Emil Medve <> Signed-off-by: Junio C Hamano <>
2007-07-15Merge branch 'master' of git:// C Hamano
* 'master' of git:// Teach fast-import to recursively copy files/directories Fix git-p4 on Windows to not use the Posix sysconf function. Correct trivial typo in fast-import documentation
2007-07-15Documentation/git-commit-tree: remove description of a nonexistent limitationJunio C Hamano
Noticed by Geoff Richards. Signed-off-by: Junio C Hamano <>
2007-07-15Make every builtin-*.c file #include "builtin.h"Peter Hagervall
Make every builtin-*.c file #include "builtin.h". Also takes care of some declaration/definition mismatches. Signed-off-by: Peter Hagervall <> Signed-off-by: Junio C Hamano <>
2007-07-15Teach fast-import to recursively copy files/directoriesShawn O. Pearce
Some source material (e.g. Subversion dump files) perform directory renames by telling us the directory was copied, then deleted in the same revision. This makes it difficult for a frontend to convert such data formats to a fast-import stream, as all the frontend has on hand is "Copy a/ to b/; Delete a/" with no details about what files are in a/, unless the frontend also kept track of all files. The new 'C' subcommand within a commit allows the frontend to make a recursive copy of one path to another path within the branch, without needing to keep track of the individual file paths. The metadata copy is performed in memory efficiently, but is implemented as a copy-immediately operation, rather than copy-on-write. With this new 'C' subcommand frontends could obviously implement an 'R' (rename) on their own as a combination of 'C' and 'D' (delete), but since we have already offered up 'R' in the past and it is a trivial thing to keep implemented I'm not going to deprecate it. Signed-off-by: Shawn O. Pearce <>
2007-07-15Fix git-p4 on Windows to not use the Posix sysconf function.Marius Storm-Olsen
Add condition for Windows, since it doesn't support the os.sysconf module. We hardcode the commandline limit to 2K, as that should work on most Windows platforms. Signed-off-by: Marius Storm-Olsen <> Acked-by: Simon Hausmann <> Signed-off-by: Shawn O. Pearce <>
2007-07-14git-svn: remove leading slashes from fetch lines in the generate configEric Wong
We were previously sensitive to leading slashes in the fetch lines and incorrectly writing them to the config if the user used them (needlessly) in the command-line. This fixes the issue and allows us to play nicely with legacy configs that have leading slashes in fetch lines. Thanks to Bradford Smith for figuring this out for me: > > This works: > > git-svn clone -Ttrunk/testing > -ttags/testing -bbranches/testing testing > > This doesn't: > > git-svn clone -T/trunk/testing > -t/tags/testing -b/branches/testing testing Signed-off-by: Eric Wong <> Signed-off-by: Junio C Hamano <>