summaryrefslogtreecommitdiff
AgeCommit message (Collapse)AuthorFilesLines
2010-03-02Merge branch 'jc/maint-fix-test-perm' into maintLibravatar Junio C Hamano2-0/+4
* jc/maint-fix-test-perm: lib-patch-mode.sh: Fix permission t6000lib: Fix permission
2010-03-02Merge branch 'np/fast-import-idx-v2' into maintLibravatar Junio C Hamano2-95/+84
* np/fast-import-idx-v2: fast-import: use the diff_delta() max_delta_size argument fast-import: honor pack.indexversion and pack.packsizelimit config vars fast-import: make default pack size unlimited fast-import: use write_idx_file() instead of custom code fast-import: use sha1write() for pack data fast-import: start using struct pack_idx_entry
2010-03-02gitweb: Fix project-specific feature override behaviorLibravatar Jakub Narebski2-6/+21
This commit fixes a bug in processing project-specific override in a situation when there is no project, e.g. for the projects list page. When 'snapshot' feature had project specific config override enabled by putting $feature{'snapshot'}{'override'} = 1; (or equivalent) in $GITWEB_CONFIG, and when viewing toplevel gitweb page, which means the projects list page (to be more exact this happens for any project-less action), gitweb would put the following Perl warnings in error log: gitweb.cgi: Use of uninitialized value $git_dir in concatenation (.) or string at gitweb.cgi line 2065. fatal: error processing config file(s) gitweb.cgi: Use of uninitialized value $git_dir in concatenation (.) or string at gitweb.cgi line 2221. gitweb.cgi: Use of uninitialized value $git_dir in concatenation (.) or string at gitweb.cgi line 2218. The problem is in the following fragment of code: # path to the current git repository our $git_dir; $git_dir = "$projectroot/$project" if $project; # list of supported snapshot formats our @snapshot_fmts = gitweb_get_feature('snapshot'); @snapshot_fmts = filter_snapshot_fmts(@snapshot_fmts); For the toplevel gitweb page, which is the list of projects, $project is not defined, therefore neither is $git_dir. gitweb_get_feature() subroutine calls git_get_project_config() if project specific override is turned on... but we don't have project here. Those errors mentioned above occur in the following fragment of code in git_get_project_config(): # get config if (!defined $config_file || $config_file ne "$git_dir/config") { %config = git_parse_project_config('gitweb'); $config_file = "$git_dir/config"; } git_parse_project_config() calls git_cmd() which has '--git-dir='.$git_dir There are (at least) three possible solutions: 1. Harden gitweb_get_feature() so that it doesn't call git_get_project_config() if $project (and therefore $git_dir) is not defined; there is no project for project specific config. 2. Harden git_get_project_config() like you did in your fix, returning early if $git_dir is not defined. 3. Harden git_cmd() so that it doesn't add "--git-dir=$git_dir" if $git_dir is not defined, and change git_get_project_config() so that it doesn't even try to access $git_dir if it is not defined. This commit implements both 1.) and 2.), i.e. gitweb_get_feature() doesn't call project-specific override if $git_dir is not defined (if there is no project), and git_get_project_config() returns early if $git_dir is not defined. Add a test for this bug to t/t9500-gitweb-standalone-no-errors.sh test. Reported-by: Eli Barzilay <eli@barzilay.org> Signed-off-by: Jakub Narebski <jnareb@gmail.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2010-03-02gitweb multiple project roots documentationLibravatar Sylvain Rabot1-3/+64
This commit adds in the gitweb/README file a description of how to use gitweb with several project roots using apache virtualhost rewrite rules. Signed-off-by: Sylvain Rabot <sylvain@abstraction.fr> Acked-by: Jakub Narebski <jnareb@gmail.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2010-02-28Git 1.7.0.1Libravatar Junio C Hamano3-7/+12
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2010-02-28Remove reference to GREP_COLORS from documentationLibravatar Mark Lodato1-3/+1
There is no longer support for external grep, as per bbc09c2 (grep: rip out support for external grep, 2010-01-12), so remove the reference to it from the documentation. Signed-off-by: Mark Lodato <lodatom@gmail.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2010-02-28sha1_name: fix segfault caused by invalid index accessLibravatar Markus Heidelberg1-14/+18
The code to see if user input "git show :path" makes sense tried to access the index without properly checking the array bound. Signed-off-by: Markus Heidelberg <markus.heidelberg@web.de> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2010-02-25Merge branch 'maint-1.6.6' into maintLibravatar Junio C Hamano1-0/+1
* maint-1.6.6: t3301-notes: insert a shbang line in ./fake_editor.sh
2010-02-25t3301-notes: insert a shbang line in ./fake_editor.shLibravatar Johannes Sixt1-0/+1
This is required on Windows because git-notes is now a built-in rather than a shell script. Signed-off-by: Johannes Sixt <j6t@kdbg.org> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2010-02-24commit: quote the user name in the exampleLibravatar Matt Kraai1-1/+1
If the user runs git config --global user.name Your Name as suggested, user.name will be set to "Your". With this patch, the suggested command will be git config --global user.name "Your Name" which will set user.name to "Your Name" and hopefully help users avoid the former mistake. Signed-off-by: Matt Kraai <kraai@ftbfs.org> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2010-02-24Merge branch 'ml/maint-grep-doc' into maintLibravatar Junio C Hamano1-5/+12
* ml/maint-grep-doc: grep documentation: clarify what files match
2010-02-23am: remove rebase-apply directory before gcLibravatar Jonathan Nieder1-2/+1
When git am does an automatic gc it doesn't clean up the rebase-apply directory until after this has finished. This means that if the user aborts the gc then future am or rebase operations will report that an existing operation is in progress, which is undesirable and confusing. Reported by Mark Brown <broonie@debian.org> through http://bugs.debian.org/570966 Signed-off-by: Jonathan Nieder <jrnieder@gmail.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2010-02-23rerere: fix memory leak if rerere images can't be readLibravatar Bert Wesarg1-3/+6
Signed-off-by: Bert Wesarg <bert.wesarg@googlemail.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2010-02-23Documentation: mention conflict marker size argument (%L) for merge driverLibravatar Bert Wesarg1-1/+2
23a64c9e (conflict-marker-size: new attribute, 2010-01-16) introduced the new attribute and also pass the conflict marker size as %L to merge driver commands. This documents the substitution. Signed-off-by: Bert Wesarg <bert.wesarg@googlemail.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2010-02-20git-p4: fix bug in symlink handlingLibravatar Evan Powers1-3/+2
Fix inadvertent breakage from b932705 (git-p4: stream from perforce to speed up clones, 2009-07-30) in the code that strips the trailing '\n' from p4 print on a symlink. (In practice, contents is of the form ['target\n', ''].) Signed-off-by: Evan Powers <evan.powers@gmail.com> Acked-by: Pete Wyckoff <pw@padd.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2010-02-19t1450: fix testcases that were wrongly expecting failureLibravatar Thomas Rast1-8/+8
Almost exactly a year ago in 02a6552 (Test fsck a bit harder), I introduced two testcases that were expecting failure. However, the only bug was that the testcases wrote *blobs* because I forgot to pass -t tag to hash-object. Fix this, and then adjust the rest of the test to properly check the result. Signed-off-by: Thomas Rast <trast@student.ethz.ch> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2010-02-19Documentation: Fix indentation problem in git-commit(1)Libravatar Jacob Helwig1-3/+3
Ever since the "See linkgit:git-config[1]..." paragraph was added to the description for --untracked-files (d6293d1), the paragraphs for the following options were indented at the same level as the "See linkgit:git-config[1]" paragraph. This problem showed up in the manpages, but not in the HTML documentation. While this does fix the alignment of the options following --untracked-files in the manpage, the "See linkgit..." portion of the description does not retain its previous indentation level in the manpages, or HTML documentation. Signed-off-by: Jacob Helwig <jacob.helwig@gmail.com> Acked-by: Thomas Rast <trast@student.ethz.ch> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2010-02-19Merge branch 'jk/maint-rmdir-fix' into maintLibravatar Junio C Hamano2-1/+9
* jk/maint-rmdir-fix: rm: fix bug in recursive subdirectory removal
2010-02-18rm: fix bug in recursive subdirectory removalLibravatar Jeff King2-1/+9
If we remove a path in a/deep/subdirectory, we should try to remove as many trailing components as possible (i.e., subdirectory, then deep, then a). However, the test for the return value of rmdir was reversed, so we only ever deleted at most one level. The fix is in remove_path, so "apply" and "merge-recursive" also are fixed. Signed-off-by: Jeff King <peff@peff.net> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2010-02-18Documentation: describe --thin more accuratelyLibravatar Stephen Boyd5-28/+36
The description for --thin was misleading and downright wrong. Correct it with some inspiration from the description of index-pack's --fix-thin and some background information from Nicolas Pitre <nico@fluxnic.net>. Signed-off-by: Stephen Boyd <bebarino@gmail.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2010-02-17docs: don't talk about $GIT_DIR/refs/ everywhereLibravatar Jeff King10-36/+39
It is misleading to say that we pull refs from $GIT_DIR/refs/*, because we may also consult the packed refs mechanism. These days we tend to treat the "refs hierarchy" as more of an abstract namespace that happens to be represented as $GIT_DIR/refs. At best, this is a minor inaccuracy, but at worst it can confuse users who then look in $GIT_DIR/refs and find that it is missing some of the refs they expected to see. This patch drops most uses of "$GIT_DIR/refs/*", changing them into just "refs/*", under the assumption that users can handle the concept of an abstract refs namespace. There are a few things to note: - most cases just dropped the $GIT_DIR/ portion. But for cases where that left _just_ the word "refs", I changed it to "refs/" to help indicate that it was a hierarchy. I didn't do the same for longer paths (e.g., "refs/heads" remained, instead of becoming "refs/heads/"). - in some cases, no change was made, as the text was explicitly about unpacked refs (e.g., the discussion in git-pack-refs). - In some cases it made sense instead to note the existence of packed refs (e.g., in check-ref-format and rev-parse). Signed-off-by: Jeff King <peff@peff.net> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2010-02-17Update 1.7.0.1 release notesLibravatar Junio C Hamano1-1/+1
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2010-02-17Merge branch 'jk/cherry-pick-reword' into maintLibravatar Junio C Hamano1-23/+19
* jk/cherry-pick-reword: cherry-pick: prettify the advice message cherry-pick: show commit name instead of sha1 cherry-pick: format help message as strbuf cherry-pick: refactor commit parsing code cherry-pick: rewrap advice message
2010-02-17Merge branch 'jk/grep-double-dash' into maintLibravatar Junio C Hamano2-0/+43
* jk/grep-double-dash: accept "git grep -- pattern"
2010-02-17Merge branch 'jc/typo' into maintLibravatar Junio C Hamano17-19/+20
* jc/typo: Typofixes outside documentation area
2010-02-17fast-import: use the diff_delta() max_delta_size argumentLibravatar Nicolas Pitre1-6/+2
This let diff_delta() abort early if it is going to bust the given size limit. Also, only objects larger than 20 bytes are considered as objects smaller than that are most certainly going to produce larger deltas than the original object due to the additional headers. Signed-off-by: Nicolas Pitre <nico@fluxnic.net> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2010-02-17fast-import: honor pack.indexversion and pack.packsizelimit config varsLibravatar Nicolas Pitre1-0/+11
Signed-off-by: Nicolas Pitre <nico@fluxnic.net> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2010-02-17fast-import: make default pack size unlimitedLibravatar Nicolas Pitre2-10/+7
Now that fast-import is creating packs with index version 2, there is no point limiting the pack size by default. A pack split will still happen if off_t is not sufficiently large to hold large offsets. While updating the doc, let's remove the "packfiles fit on CDs" suggestion. Pack files created by fast-import are still suboptimal and a 'git repack -a -f -d' or even 'git gc --aggressive' would be a pretty good idea before considering storage on CDs. Signed-off-by: Nicolas Pitre <nico@fluxnic.net> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2010-02-17fast-import: use write_idx_file() instead of custom codeLibravatar Nicolas Pitre1-46/+17
This allows for the creation of pack index version 2 with its object CRC and the possibility for a pack to be larger than 4 GB. Signed-off-by: Nicolas Pitre <nico@fluxnic.net> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2010-02-17fast-import: use sha1write() for pack dataLibravatar Nicolas Pitre1-10/+25
This is in preparation for using write_idx_file(). Also, by using sha1write() we get some buffering to reduces the number of write syscalls, and the written data is SHA1 summed which allows for the extra data integrity validation check performed in fixup_pack_header_footer() (details on this in commit abeb40e5aa). Signed-off-by: Nicolas Pitre <nico@fluxnic.net> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2010-02-17fast-import: start using struct pack_idx_entryLibravatar Nicolas Pitre1-29/+28
This is in preparation for using write_idx_file(). Signed-off-by: Nicolas Pitre <nico@fluxnic.net> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2010-02-16grep documentation: clarify what files matchLibravatar Mark Lodato1-5/+12
Clarify that git-grep(1) searches only tracked files, and that each <pathspec> is a pathspec, as in any other ordinary git commands. Add an example to show a simple use case for searching all .c and .h files in the current directory and below. Signed-off-by: Mark Lodato <lodatom@gmail.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2010-02-16Prepare 1.7.0.1 release notesLibravatar Junio C Hamano1-1/+21
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2010-02-16Merge branch 'jc/maint-grep-one-thread-mutex-fix' into maintLibravatar Junio C Hamano1-9/+16
* jc/maint-grep-one-thread-mutex-fix: Fix use of mutex in threaded grep
2010-02-16Fix use of mutex in threaded grepLibravatar Junio C Hamano1-9/+16
The program can decide at runtime not to use threading even if the support is compiled in. In such a case, mutexes are not necessary and left uninitialized. But the code incorrectly tried to take and release the read_sha1_mutex unconditionally. Signed-off-by: Junio C Hamano <gitster@pobox.com> Acked-by: Fredrik Kuivinen <frekui@gmail.com>
2010-02-16Merge branch 'maint-1.6.6' into maintLibravatar Junio C Hamano6-6/+19
* maint-1.6.6: dwim_ref: fix dangling symref warning stash pop: remove 'apply' options during 'drop' invocation diff: make sure --output=/bad/path is caught Remove hyphen from "git-command" in two error messages
2010-02-16Merge branch 'maint-1.6.5' into maint-1.6.6Libravatar Junio C Hamano4-4/+17
* maint-1.6.5: dwim_ref: fix dangling symref warning stash pop: remove 'apply' options during 'drop' invocation diff: make sure --output=/bad/path is caught
2010-02-16dwim_ref: fix dangling symref warningLibravatar Jeff King1-2/+1
If we encounter a symref that is dangling, in most cases we will warn about it. The one exception is a dangling HEAD, as that indicates a branch yet to be born. However, the check in dwim_ref was not quite right. If we were fed something like "HEAD^0" we would try to resolve "HEAD", see that it is dangling, and then check whether the _original_ string we got was "HEAD" (which it wasn't in this case). And that makes no sense; the dangling thing we found was not "HEAD^0" but rather "HEAD". Fixing this squelches a scary warning from "submodule summary HEAD" (and consequently "git status" with status.submodulesummary set) in an empty repo, as the submodule script calls "git rev-parse -q --verify HEAD^0". Signed-off-by: Jeff King <peff@peff.net> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2010-02-15stash pop: remove 'apply' options during 'drop' invocationLibravatar Thomas Rast2-2/+14
The 'git stash pop' option parsing used to remove the first argument in --index mode. At the time this was implemented, this first argument was always --index. However, since the invention of the -q option in fcdd0e9 (stash: teach quiet option, 2009-06-17) you can cause an internal invocation of git stash drop --index by running git stash pop -q --index which then of course fails because drop doesn't know --index. To handle this, instead let 'git stash apply' decide what the future argument to 'drop' should be. Warning: this means that 'git stash apply' must parse all options that 'drop' can take, and deal with them in the same way. This is currently true for its only option -q. Signed-off-by: Thomas Rast <trast@student.ethz.ch> Acked-by: Stephen Boyd <bebarino@gmail.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2010-02-15diff: make sure --output=/bad/path is caughtLibravatar Larry D'Anna1-0/+2
The return value from fopen wasn't being checked. Signed-off-by: Larry D'Anna <larry@elder-gods.org> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2010-02-15Remove hyphen from "git-command" in two error messagesLibravatar Pete Harlan2-2/+2
Signed-off-by: Pete Harlan <pgit@pcharlan.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2010-02-14Merge branch 'maint-1.6.6' into maintLibravatar Junio C Hamano1-0/+1
* maint-1.6.6: fix minor memory leak in get_tree_entry()
2010-02-14fix minor memory leak in get_tree_entry()Libravatar René Scharfe1-0/+1
Signed-off-by: Rene Scharfe <rene.scharfe@lsrfire.ath.cx> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2010-02-13Start 1.7.0 maintenance trackLibravatar Junio C Hamano3-2/+13
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2010-02-12Git 1.7.0Libravatar Junio C Hamano3-1/+11
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2010-02-12Merge branch 'maint'Libravatar Junio C Hamano2-2/+2
* maint: Fix typo in 1.6.6.2 release notes Re-fix check-ref-format documentation mark-up
2010-02-12Fix typo in 1.6.6.2 release notesLibravatar Junio C Hamano1-1/+1
Of course, these are changes since 1.6.6.1; changes since 1.6.6.2 would have been nil. Signed-off-by: Junio C Hamano <gitster@pobox.com>
2010-02-12Re-fix check-ref-format documentation mark-upLibravatar Junio C Hamano1-1/+1
It is not double-backslash we forbid; backslashes are forbidden since a4c2e699 (Disallow '\' in ref names, 2009-05-08) Signed-off-by: Junio C Hamano <gitster@pobox.com>
2010-02-12archive documentation: attributes are taken from the tree by defaultLibravatar Junio C Hamano1-0/+8
By default, git-archive takes attributes from the tree being archived. People however often wonder why their attempts to affect the way how the command archives their tree by changing .gitattributes in their work tree fail. Add a bit of explanatory note to tell them how to achieve what they want to do. Noticed-by: Francois Marier Signed-off-by: Junio C Hamano <gitster@pobox.com>
2010-02-12Documentation: minor fixes to RelNotes-1.7.0Libravatar Michael J Gruber1-8/+8
Signed-off-by: Michael J Gruber <git@drmicha.warpmail.net> Signed-off-by: Junio C Hamano <gitster@pobox.com>