aboutsummaryrefslogtreecommitdiff
Commit message (Collapse)AuthorAge
* sparse fix: non-ANSI function declarationRene Scharfe2006-11-18
| | | | | | | The declaration of discard_cache() in cache.h already has its "void". Signed-off-by: Rene Scharfe <rene.scharfe@lsrfire.ath.cx> Signed-off-by: Junio C Hamano <junkio@cox.net>
* git-apply: Documentation typo fixPetr Baudis2006-11-18
| | | | | | | inacurate -> inaccurate, sorry if it was a pun. ;-) Signed-off-by: Petr Baudis <pasky@suse.cz> Signed-off-by: Junio C Hamano <junkio@cox.net>
* Fix git-for-each-refs broken for tagsPetr Baudis2006-11-18
| | | | | | | | | | | Unfortunately, git-for-each-refs is currently unusable for peeking into tag comments, since it uses freed pointers, so it just prints out all sort of garbage. This makes it strdup() contents and body values. Signed-off-by: Petr Baudis <pasky@suse.cz> Signed-off-by: Junio C Hamano <junkio@cox.net>
* "git fmt-merge-msg" SIGSEGVLinus Torvalds2006-11-16
| | | | | | | | | | | | | | | | | | | | | | | | | Ok, this is a _really_ stupid case, and I don't think it matters, but hey, we should never SIGSEGV. Steps to reproduce: mkdir duh cd duh git init-db git-fmt-merge-msg < /dev/null will cause a SIGSEGV in cmd_fmt_merge_msg(), because we're doing a strncmp() with a NULL current_branch. And yeah, it's an insane schenario, and no, it doesn't really matter. The only reason I noticed was that a broken version of my "git pull" into an empty directory would cause this. This silly patch just replaces the SIGSEGV with a controlled exit with an error message. Signed-off-by: Linus Torvalds <torvalds@osdl.org> Signed-off-by: Junio C Hamano <junkio@cox.net>
* git-pull: allow pulling into an empty repositoryLinus Torvalds2006-11-16
| | | | | | | | | | | | | | | | 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>
* convert-objects: set _XOPEN_SOURCE to 600Junio C Hamano2006-11-15
| | | | | | | Otherwise OpenBSD header files drop S_ISLNK() definition which is used in an inline defined in cache.h Signed-off-by: Junio C Hamano <junkio@cox.net>
* Run "git repack -a -d" once more at end, if there's 1MB or more of ↵Jim Meyering2006-11-15
| | | | | | | | | | | | | | | | | | | | | | | | | | | | not-packed data. Although I converted upstream coreutils to git last month, I just reconverted coreutils once again, as a test, and ended up with a git repository of about 130MB (contrast with my packed git repo of size 52MB). That was because there were a lot of commits (but < 1024) after the final automatic "git-repack -a -d". Running a final git-repack -a -d && git-prune-packed cut the final repository size down to the expected size. So this looks like an easy way to improve git-cvsimport. Just run "git repack ..." at the end if there's more than some reasonable amount of not-packed data. My choice of 1MB is a little arbitrarily. I wouldn't mind missing the minimal repo size by 1MB. At the other end of the spectrum, it's probably not worthwhile to pack everything when the total repository size is less than 1MB. Here's the patch: Signed-off-by: Jim Meyering <jim@meyering.net> Signed-off-by: Junio C Hamano <junkio@cox.net>
* gitweb: Put back shortlog instead of graphiclog in the project list.Alexandre Julliard2006-11-15
| | | | | | | Looks like a repo.or.cz-specific change slipped in. Signed-off-by: Alexandre Julliard <julliard@winehq.org> Signed-off-by: Junio C Hamano <junkio@cox.net>
* git-checkout: allow pathspec to recover lost working tree directoryJunio C Hamano2006-11-15
| | | | | | | | | | | | | It is often wanted on the #git channel that this were to work to recover removed directory: rm -fr Documentation git checkout -- Documentation git checkout HEAD -- Documentation ;# alternatively Now it does. Signed-off-by: Junio C Hamano <junkio@cox.net>
* git-checkout: do not allow -f and -m at the same time.Junio C Hamano2006-11-15
| | | | | | | Instead of silently ignoring one over the other, complain on this incompatible combination. Signed-off-by: Junio C Hamano <junkio@cox.net>
* Seek back to current filepos when mmap()ing with NO_MMAPJohannes Schindelin2006-11-15
| | | | | | | | | "git-index-pack --fix-thin" relies on mmap() not changing the current file position (otherwise the pack will be corrupted when writing the final SHA1). Meet that expectation. Signed-off-by: Johannes Schindelin <Johannes.Schindelin@gmx.de> Signed-off-by: Junio C Hamano <junkio@cox.net>
* GIT 1.4.4v1.4.4Junio C Hamano2006-11-14
| | | | Signed-off-by: Junio C Hamano <junkio@cox.net>
* Merge branch 'maint'Junio C Hamano2006-11-13
|\ | | | | | | | | | | | | | | * 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-13
| | | | | | | | | | | | | | | | | | 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-13
| | | | | | | | | | | | | | | | | | 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-13
| | | | | | | | | | | | | | | | 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>
| * git-update-index(1): fix use of quoting in section titleJonas Fonseca2006-11-12
| | | | | | | | | | Signed-off-by: Jonas Fonseca <fonseca@diku.dk> Signed-off-by: Junio C Hamano <junkio@cox.net>
* | GIT 1.4.4-rc2v1.4.4-rc2Junio C Hamano2006-11-11
| | | | | | | | Signed-off-by: Junio C Hamano <junkio@cox.net>
* | Merge branch 'maint'Junio C Hamano2006-11-11
|\ \ | |/ | | | | | | * maint: git-cvsserver: read from git with -z to get non-ASCII pathnames.
| * git-cvsserver: read from git with -z to get non-ASCII pathnames.v1.4.3.5Junio C Hamano2006-11-11
| | | | | | | | Signed-off-by: Junio C Hamano <junkio@cox.net>
* | Merge branch 'maint'Junio C Hamano2006-11-11
|\ \ | |/ | | | | | | * maint: path-list: fix path-list-insert return value
| * path-list: fix path-list-insert return valueJunio C Hamano2006-11-11
| | | | | | | | | | | | | | | | | | When path-list-insert is called on an existing path, it returned an unrelated element in the list. Luckily most of the callers are ignoring the return value, but merge-recursive uses it at three places and this would have resulted in a bogus rename detection. Signed-off-by: Junio C Hamano <junkio@cox.net>
* | git-annotate: fix -S on graft file with comments.Junio C Hamano2006-11-10
| | | | | | | | | | | | | | | | The graft file can contain comment lines and read_graft_line can return NULL for such an input, which should be skipped by the reader. Signed-off-by: Junio C Hamano <junkio@cox.net>
* | git-annotate: no need to exec blame; it is built-in now.Junio C Hamano2006-11-10
| |
* | Merge branch 'maint'Junio C Hamano2006-11-09
|\ \ | |/ | | | | | | | | | | | | * 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-rebase: Use --ignore-if-in-upstream option when executing git-format-patch.Robert Shearman2006-11-09
| | | | | | | | | | | | | | | | This reduces the number of conflicts when rebasing after a series of patches to the same piece of code is committed upstream. Signed-off-by: Robert Shearman <rob@codeweavers.com> Signed-off-by: Junio C Hamano <junkio@cox.net>
| * git-svn: fix dcommit losing changes when out-of-date from svnEric Wong2006-11-09
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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-svn: don't die on rebuild when --upgrade is specifiedEric Wong2006-11-09
| | | | | | | | | | | | | | | | | | --copy-remote and --upgrade are rarely (never?) used together, so if --copy-remote is specified, that means the user really wanted to copy the remote ref, and we should fail if that fails. Signed-off-by: Eric Wong <normalperson@yhbt.net> Signed-off-by: Junio C Hamano <junkio@cox.net>
| * git-svn: avoid printing filenames of files we're not trackingEric Wong2006-11-09
| | | | | | | | | | | | | | | | This is purely an aesthetic change, we already skip importing of files that don't affect the subdirectory we import. Signed-off-by: Eric Wong <normalperson@yhbt.net> Signed-off-by: Junio C Hamano <junkio@cox.net>
* | Documentation: move blame examplesJunio C Hamano2006-11-09
| | | | | | | | | | | | | | This moves the example to specify a line range with regexps to a later part of the manual page that has similar examples. Signed-off-by: Junio C Hamano <junkio@cox.net>
* | Merge branch 'maint'Junio C Hamano2006-11-09
|\ \ | |/ | | | | | | * maint: Nicer error messages in case saving an object to db goes wrong
| * Nicer error messages in case saving an object to db goes wrongPetr Baudis2006-11-09
| | | | | | | | | | | | | | | | | | Currently the error e.g. when pushing to a read-only repository is quite confusing, this attempts to clean it up, unifies error reporting between various object writers and uses error() on couple more places. Signed-off-by: Petr Baudis <pasky@suse.cz> Signed-off-by: Junio C Hamano <junkio@cox.net>
* | gitweb: fix unmatched div in commitdiffJunio C Hamano2006-11-09
| | | | | | | | | | | | | | When the last filepair changed only metainfo we failed to close the extended header <div>. Signed-off-by: Junio C Hamano <junkio@cox.net>
* | gitweb: protect commit messages from controls.Junio C Hamano2006-11-09
| | | | | | | | | | | | | | | | The same change as the previous. It is rather sad that commit log message parser gives list of chomped lines while tag message parser gives unchomped ones. Signed-off-by: Junio C Hamano <junkio@cox.net>
* | gitweb: protect blob and diff output lines from controls.Junio C Hamano2006-11-09
| | | | | | | | | | | | | | | | This revealed that the output from blame and tag was not chomped properly and was relying on HTML output not noticing that extra whitespace that resulted from the newline, which was also fixed. Signed-off-by: Junio C Hamano <junkio@cox.net>
* | git-pickaxe: retire pickaxeJunio C Hamano2006-11-08
| | | | | | | | | | | | | | | | | | 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 git://git.kernel.org/pub/scm/gitk/gitkJunio C Hamano2006-11-08
|\ \ | | | | | | | | | | | | * git://git.kernel.org/pub/scm/gitk/gitk: [PATCH] gitk: Fix nextfile() and add prevfile()
| * | [PATCH] gitk: Fix nextfile() and add prevfile()OGAWA Hirofumi2006-10-19
| | | | | | | | | | | | | | | | | | | | | | | | | | | The current nextfile() jumps to last hunk, but I think this is not intention, probably, it's forgetting to add "break;". And this patch also adds prevfile(), it jumps to previous hunk. Signed-off-by: OGAWA Hirofumi <hirofumi@mail.parknet.co.jp> Signed-off-by: Paul Mackerras <paulus@samba.org>
* | | git-status: quote LF in its outputJunio C Hamano2006-11-08
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Otherwise, commit log template would get the remainder of the filename start on a new line unquoted and the log gets messed up. I initially considered using the full quote_c_style(), but the output from the command is primarily for human consumption so chose to leave other control characters and bytes with high-bits unmolested. Signed-off-by: Junio C Hamano <junkio@cox.net>
* | | gitweb: do not give blame link unconditionally in diff-tree viewJunio C Hamano2006-11-08
| | | | | | | | | | | | Signed-off-by: Junio C Hamano <junkio@cox.net>
* | | gitweb: New improved patchset viewJakub Narebski2006-11-08
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Replace "gitweb diff header" with its full sha1 of blobs and replace it by "git diff" header and extended diff header. Change also somewhat highlighting of diffs. Added `file_type_long' subroutine to convert file mode in octal to file type description (only for file modes which used by git). Changes: * "gitweb diff header" which looked for example like below: file:_<sha1 before>_ -> file:_<sha1 after>_ where 'file' is file type and '<sha1>' is full sha1 of blob is changed to diff --git _a/<file before>_ _b/<file after>_ In both cases links are visible and use default link style. If file is added, a/<file> is not hyperlinked. If file is deleted, b/<file> is not hyperlinked. * there is added "extended diff header", with <path> and <hash> hyperlinked (and <hash> shortened to 7 characters), and <mode> explained: '<mode>' is extended to '<mode> (<file type description>)', where added text is slightly lighter to easy distinguish that it was added (and it is difference from git-diff output). * from-file/to-file two-line header lines have slightly darker color than removed/added lines. * chunk header has now delicate line above for easier finding chunk boundary, and top margin of 2px, both barely visible. Signed-off-by: Jakub Narebski <jnareb@gmail.com> Signed-off-by: Junio C Hamano <junkio@cox.net>
* | | gitweb: Use character or octal escape codes (and add span.cntrl) in esc_pathJakub Narebski2006-11-08
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Instead of simply hiding control characters in esc_path by replacing them with '?', use Character Escape Codes (CEC) i.e. alphabetic backslash sequences like those found in C programming language and many other languages influenced by it, such as Java and Perl. If control characted doesn't have corresponding character escape code, use octal char sequence to escape it. Alternatively, controls can be replaced with Unicode Control Pictures U+2400 - U+243F (9216 - 9279), the Unicode characters reserved for representing control characters when it is necessary to print or display them. Signed-off-by: Jakub Narebski <jnareb@gmail.com> Signed-off-by: Junio C Hamano <junkio@cox.net>
* | | gitweb: Better git-unquoting and gitweb-quoting of pathnamesJakub Narebski2006-11-08
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Extend unquote subroutine, which unquotes quoted and escaped filenames which git may return, to deal not only with octal char sequence quoting, but also quoting ordinary characters including '\"' and '\\' which are respectively quoted '"' and '\', and to deal also with C escape sequences including '\t' for TAB and '\n' for LF. Add esc_path subroutine for gitweb quoting and HTML escaping filenames (currently it does equivalent of ls' --hide-control-chars, which means showing undisplayable characters (including '\n' and '\t') as '?' (question mark) character, and use 'span' element with cntrl CSS class to help rendering them differently. Convert gitweb to use esc_path correctly to print pathnames. Signed-off-by: Jakub Narebski <jnareb@gmail.com> Signed-off-by: Junio C Hamano <junkio@cox.net>
* | | gitweb: minimally fix "fork" support.Junio C Hamano2006-11-07
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | A forked project is defined to be $projname/$forkname.git for $projname.git; the code did not check this correctly and mistook $projname/.git to be a fork of itself. This minimally fixes the breakage. Also forks were not checked when index.aux file was in use. Listing the forked ones in index.aux would show them also on the toplevel index which may go against the hierarchical nature of forks, but again this is a minimal fix to whip it in a better shape suitable to be in the 'master' branch. Signed-off-by: Junio C Hamano <junkio@cox.net>
* | | gitweb: fix disabling of "forks"Junio C Hamano2006-11-07
| | | | | | | | | | | | | | | | | | | | | | | | | | | Apparently this code was never tested without "forks". check-feature returns a one-element list (0) when disabled, and assigning that to a scalar variable made it to be called in a scalar context, which meant my $check_forks = gitweb_check_feature("forks") were always 1! Signed-off-by: Junio C Hamano <junkio@cox.net>
* | | GIT 1.4.3-rc1v1.4.4-rc1Junio C Hamano2006-11-07
| | | | | | | | | | | | Signed-off-by: Junio C Hamano <junkio@cox.net>
* | | Merge branch 'maint'Junio C Hamano2006-11-07
|\ \ \ | | |/ | |/| | | | | | | * maint: remove an unneeded test
| * | remove an unneeded testTero Roponen2006-11-07
| | | | | | | | | | | | | | | | | | | | | | | | In wt-status.c there is a test which does nothing. This patch removes it. Signed-off-by: Tero Roponen <teanropo@jyu.fi> Signed-off-by: Junio C Hamano <junkio@cox.net>
* | | Merge branch 'jc/pickaxe'Junio C Hamano2006-11-07
|\ \ \
| * | | git-pickaxe: allow "-L <something>,+N"Junio C Hamano2006-11-07
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | With this, git pickaxe -L '/--progress/,+20' v1.4.0 -- pack-objects.c gives you 20 lines starting from the first occurrence of '--progress' in pack-objects, digging from v1.4.0 version. You can also say git pickaxe -L '/--progress/,-5' v1.4.0 -- pack-objects.c Signed-off-by: Junio C Hamano <junkio@cox.net>