aboutsummaryrefslogtreecommitdiff
Commit message (Collapse)AuthorAge
* disable t9119 for now.Junio C Hamano2007-12-12
| | | | Signed-off-by: Junio C Hamano <gitster@pobox.com>
* Fix "diff --check" whitespace detectionWincent Colaiuta2007-12-12
| | | | | | | | | "diff --check" would only detect spaces before tabs if a tab was the last character in the leading indent. Fix that and add a test case to make sure the bug doesn't regress in the future. Signed-off-by: Wincent Colaiuta <win@wincent.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
* git-diff --numstat -z: make it machine readableJunio C Hamano2007-12-12
| | | | | | | | | | | | | | | | | | | | | | | | The "-z" format is all about machine parsability, but showing renamed paths as "common/{a => b}/suffix" makes it impossible. The scripts would never have successfully parsed "--numstat -z -M" in the old format. This fixes the output format in a (hopefully minimally) backward incompatible way. * The output without -z is not changed. This has given a good way for humans to view added and deleted lines separately, and showing the path in combined, shorter way would preserve readability. * The output with -z is unchanged for paths that do not involve renames. Existing scripts that do not pass -M/-C are not affected at all. * The output with -z for a renamed path is shown in a format that can easily be distinguished from an unrenamed path. This is based on Jakub Narebski's patch. Bugs and documentation typos are mine. Signed-off-by: Junio C Hamano <gitster@pobox.com>
* Documentation: minor grammar fix for "git apply"Wincent Colaiuta2007-12-12
| | | | | Signed-off-by: Wincent Colaiuta <win@wincent.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
* Use "whitespace" consistentlyWincent Colaiuta2007-12-12
| | | | | | | | | For consistency, change "white space" and "whitespaces" to "whitespace", fixing a couple of adjacent grammar problems in the docs. Signed-off-by: Wincent Colaiuta <win@wincent.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
* Fix XML parser leaks in http-pushMike Hommey2007-12-12
| | | | | | | | XML_Parser were never freed. While at it, move the parser initialization to right before it is needed. Signed-off-by: Mike Hommey <mh@glandium.org> Signed-off-by: Junio C Hamano <gitster@pobox.com>
* Fix small memory leaks induced by diff_tree_setup_pathsMike Hommey2007-12-12
| | | | | | | | Run diff_tree_release_paths in the appropriate places, and add a test to avoid NULL dereference. Better safe than sorry. Signed-off-by: Mike Hommey <mh@glandium.org> Signed-off-by: Junio C Hamano <gitster@pobox.com>
* Fix git-fast-export for zero-sized blobsAlex Riesen2007-12-12
| | | | | | | | Writing 1 elements of size 0-byte successfully will cause fwrite(3) to return 0, and flagging it as error is a mistake. Signed-off-by: Alex Riesen <raa.lkml@gmail.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
* Fix clone not to ignore depth when performing a local cloneCharles Bailey2007-12-12
| | | | | | | | | | | | | When git-clone detects that it can perform a local clone it follows a path that silently ignores the depth parameter. Presumably if the user explicitly requests a shallow clone they have a reason to prefer a space efficient clone of just the recent history so bypass the local magic if the user specifies the depth parameter. Signed-off-by: Charles Bailey <charles@hashpling.org> Signed-off-by: Junio C Hamano <gitster@pobox.com>
* blame: drop blob data after passing blame to the parentJunio C Hamano2007-12-11
| | | | | | | | | | | | We used to keep the blob data for each origin that has any remaining line in the result, but this will get very costly with a huge file that has a deep history. This patch releases the blob after we ran diff between the child rev and its parents. When passing blame from a parent to its parent (i.e. the grandparent), the blob data for the parent may need to be read again, but it should be relatively cheap, thanks to delta-base cache. Signed-off-by: Junio C Hamano <gitster@pobox.com>
* git-clone: print an error message when trying to clone empty repoJeff King2007-12-11
| | | | | | | | | | | | | | | | Previously, cloning an empty repository looked like this: $ (mkdir parent && cd parent && git --bare init) $ git-clone parent child Initialized empty Git repository in /home/peff/clone/child/.git/ $ cd child -bash: cd: child: No such file or directory $ echo 'wtf?' | mail git@vger.kernel.org Now we at least report that the clone was not successful. Signed-off-by: Jeff King <peff@peff.net> Signed-off-by: Junio C Hamano <gitster@pobox.com>
* git.el: Added a menu for git-status-mode.Alexandre Julliard2007-12-11
| | | | | | | | Originally written by Rémi Vanicat, I just changed the layout a little. Signed-off-by: Rémi Vanicat <vanicat@debian.org> Signed-off-by: Alexandre Julliard <julliard@winehq.org> Signed-off-by: Junio C Hamano <gitster@pobox.com>
* Fix a typo in checkout.sh and cleanup one-line help messagesJohannes Sixt2007-12-11
| | | | | | | This also shortens option descriptions to fit in 80 columns. Signed-off-by: Johannes Sixt <johannes.sixt@telecom.at> Signed-off-by: Junio C Hamano <gitster@pobox.com>
* commit: do not add extra LF at the end of the summary.Junio C Hamano2007-12-11
| | | | | | | | The scripted version relied on the nice "auto-strip the terminating LF" behaviour shell gives to "var=$(cmd)" construct, but we have to roll that ourselves. Signed-off-by: Junio C Hamano <gitster@pobox.com>
* "git tag -u keyname" brokenLinus Torvalds2007-12-11
| | | | | | | | | | | | | | | | | Commit 396865859918e9c7bf8ce74aae137c57da134610 broke signed tags using the "-u" flag when it made builtin-tag.c use parse_options() to parse its arguments (but it quite possibly was broken even before that, by the builtin rewrite). It used to be that passing the signing ID with the -u parameter also (obviously!) implied that you wanted to sign and annotate the tag, but that logic got dropped. It also totally ignored the actual key ID that was passed in. This reinstates it all. Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org> Signed-off-by: Junio C Hamano <gitster@pobox.com>
* send-email: do not muck with initial-reply-to when unset.Junio C Hamano2007-12-11
| | | | | | | When not prompting, initial_reply_to can be left unset. Do not try to sanitize it and get useless warning. Signed-off-by: Junio C Hamano <gitster@pobox.com>
* Don't cache DESTDIR in perl/perl.mak.Gerrit Pape2007-12-11
| | | | | | | | | DESTDIR is supposed to be overridden on 'make install' after doing 'make'. Have the automatically generated perl/perl.mak not cache the value of DESTDIR to support that for the perl/ subdirectory also. Signed-off-by: Gerrit Pape <pape@smarden.org> Signed-off-by: Junio C Hamano <gitster@pobox.com>
* autoconf: Check asciidoc version to automatically set ASCIIDOC8Jakub Narebski2007-12-11
| | | | | | | | | Check for asciidoc, and if it exists check asciidoc version, setting ASCIIDOC8 when needed. Currently it just runs asciidoc in asciidoc7 compatibility mode (see: Documentation/Makefile). Signed-off-by: Jakub Narebski <jnareb@gmail.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
* pack-objects: more threaded load balancing fix with often changed pathsNicolas Pitre2007-12-10
| | | | | | | | | | | The code that splits the object list amongst work threads tries to do so on "path" boundaries not to prevent good delta matches. However, in some cases, a few paths may largely dominate the hash distribution and it is not possible to have good load balancing without ignoring those boundaries. Signed-off-by: Nicolas Pitre <nico@cam.org> Signed-off-by: Junio C Hamano <gitster@pobox.com>
* Add more checkout testsDaniel Barkalow2007-12-10
| | | | | | | | | | | | | | If you have local changes that don't conflict with the branch-switching changes, these should be kept, not cause errors even without -m, and be reported afterwards in name-status format. With -m, the changes carried across should be listed as well. And, for now, include the merge-recursive output from this process. Also test the detatched head message in at least one case. Signed-off-by: Daniel Barkalow <barkalow@iabervon.org> Signed-off-by: Junio C Hamano <gitster@pobox.com>
* Fix mis-markup of the -p, --patch option in git-add(1)Eyvind Bernhardsen2007-12-10
| | | | | | | | An item in a bulletted list in AsciiDoc is followed with two colons, not just one. Signed-off-by: Eyvind Bernhardsen <eyvind-git@orakel.ntnu.no> Signed-off-by: Junio C Hamano <gitster@pobox.com>
* Update draft Release Notes for 1.5.4Junio C Hamano2007-12-10
| | | | Signed-off-by: Junio C Hamano <gitster@pobox.com>
* Style fixes for pre-commit hook testsWincent Colaiuta2007-12-10
| | | | | | | | | | | As pointed out by Junio on the mailing list, surrounding tests in double quotes can lead to bugs wherein variables get substituted away, so this isn't just style churn but important to prevent others from looking at these tests in the future and thinking that this is "the way" that Git tests should be written. Signed-off-by: Wincent Colaiuta <win@wincent.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
* Interactive editor tests for commit-msg hookWincent Colaiuta2007-12-10
| | | | | | | | | | | | | | | Supplement the existing tests for the commit-msg hook (which all use "git commit -m") with tests which use an interactive editor (no -m switch) to ensure that all code paths get tested. At the same time the quoting of some of the existing tests is changed to conform to Junio's recommendations for test style (single quotes used around the test unless there is a compelling reason not to, and the opening quote on the same line as the test_expect and the closing quote in column 1). Signed-off-by: Wincent Colaiuta <win@wincent.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
* Re-fix ls-remoteJunio C Hamano2007-12-09
| | | | | | | An earlier attempt in 2ea7fe0 (ls-remote: resurrect pattern limit support) forgot that the user string can also be a glob. This should finally fix it. Signed-off-by: Junio C Hamano <gitster@pobox.com>
* Cleanup variables in http.[ch]Mike Hommey2007-12-09
| | | | | | | | Quite some variables defined as extern in http.h are only used in http.c, and some others, only defined in http.c, were not static. Signed-off-by: Mike Hommey <mh@glandium.org> Signed-off-by: Junio C Hamano <gitster@pobox.com>
* git-send-email.perl: Really add angle brackets to In-Reply-To if necessaryMike Hommey2007-12-09
| | | | | | | | | 3803bcea tried to fix this, but it only adds the branckes when the given In-Reply-To begins and ends with whitespaces. It also didn't do anything to the --in-reply-to argument. Signed-off-by: Mike Hommey <mh@glandium.org> Signed-off-by: Junio C Hamano <gitster@pobox.com>
* don't mention index refreshing side effect in git-status docsJeff King2007-12-09
| | | | | | | | | The tip about speeding up subsequent operations is now obsolete; since aecbf914, git-diff now squelches empty diffs and performs an automatic refresh. Signed-off-by: Jeff King <peff@peff.net> Signed-off-by: Junio C Hamano <gitster@pobox.com>
* Remove repo version check from setup_git_directoryNguyễn Thái Ngọc Duy2007-12-09
| | | | | | | setup_git_directory_gently has done the check already. Signed-off-by: Nguyễn Thái Ngọc Duy <pclouds@gmail.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
* Merge branch 'jc/spht'Junio C Hamano2007-12-09
|\ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * jc/spht: Use gitattributes to define per-path whitespace rule core.whitespace: documentation updates. builtin-apply: teach whitespace_rules builtin-apply: rename "whitespace" variables and fix styles core.whitespace: add test for diff whitespace error highlighting git-diff: complain about >=8 consecutive spaces in initial indent War on whitespace: first, a bit of retreat. Conflicts: cache.h config.c diff.c
| * Use gitattributes to define per-path whitespace ruleJunio C Hamano2007-12-06
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The `core.whitespace` configuration variable allows you to define what `diff` and `apply` should consider whitespace errors for all paths in the project (See gitlink:git-config[1]). This attribute gives you finer control per path. For example, if you have these in the .gitattributes: frotz whitespace nitfol -whitespace xyzzy whitespace=-trailing all types of whitespace problems known to git are noticed in path 'frotz' (i.e. diff shows them in diff.whitespace color, and apply warns about them), no whitespace problem is noticed in path 'nitfol', and the default types of whitespace problems except "trailing whitespace" are noticed for path 'xyzzy'. A project with mixed Python and C might want to have: *.c whitespace *.py whitespace=-indent-with-non-tab in its toplevel .gitattributes file. Signed-off-by: Junio C Hamano <gitster@pobox.com>
| * core.whitespace: documentation updates.Junio C Hamano2007-11-24
| | | | | | | | | | | | | | | | | | | | | | This adds description of core.whitespace to the manual page of git-config, and updates the stale description of whitespace handling in the manual page of git-apply. Also demote "strip" to a synonym status for "fix" as the value of --whitespace option given to git-apply. Signed-off-by: Junio C Hamano <gitster@pobox.com>
| * builtin-apply: teach whitespace_rulesJunio C Hamano2007-11-24
| | | | | | | | | | | | | | | | | | | | We earlier introduced core.whitespace to allow users to tweak the definition of what the "whitespace errors" are, for the purpose of diff output highlighting. This teaches the same to git-apply, so that the command can both detect (when --whitespace=warn option is given) and fix (when --whitespace=fix option is given) as configured. Signed-off-by: Junio C Hamano <gitster@pobox.com>
| * builtin-apply: rename "whitespace" variables and fix stylesJunio C Hamano2007-11-23
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The variables were somewhat misnamed. * "What to do when whitespace errors are detected" is now called "ws_error_action" (used to be called "new_whitespace"); * The constants to denote the possible actions are "nowarn_ws_error", "warn_on_ws_error", "die_on_ws_error", and "correct_ws_error". The last one used to be "strip_whitespace", but we correct whitespace error in indent (SP followed by HT) and "strip" is not quite an accurate name for it. Other than the renaming of variables and constants, there is no functional change in this patch. While we are at it, it also fixes overly long lines and multi-line comment styles (which of course do not affect the generated code at all). Signed-off-by: Junio C Hamano <gitster@pobox.com>
| * core.whitespace: add test for diff whitespace error highlightingJunio C Hamano2007-11-02
| | | | | | | | | | | | | | This tests seletive enabling/disabling of whitespace error highlighting done by colored diff output. Signed-off-by: Junio C Hamano <gitster@pobox.com>
| * git-diff: complain about >=8 consecutive spaces in initial indentJunio C Hamano2007-11-02
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This introduces a new whitespace error type, "indent-with-non-tab". The error is about starting a line with 8 or more SP, instead of indenting it with a HT. This is not enabled by default, as some projects employ an indenting policy to use only SPs and no HTs. The kernel folks and git contributors may want to enable this detection with: [core] whitespace = indent-with-non-tab Signed-off-by: Junio C Hamano <gitster@pobox.com>
| * War on whitespace: first, a bit of retreat.Junio C Hamano2007-11-02
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This introduces core.whitespace configuration variable that lets you specify the definition of "whitespace error". Currently there are two kinds of whitespace errors defined: * trailing-space: trailing whitespaces at the end of the line. * space-before-tab: a SP appears immediately before HT in the indent part of the line. You can specify the desired types of errors to be detected by listing their names (unique abbreviations are accepted) separated by comma. By default, these two errors are always detected, as that is the traditional behaviour. You can disable detection of a particular type of error by prefixing a '-' in front of the name of the error, like this: [core] whitespace = -trailing-space This patch teaches the code to output colored diff with DIFF_WHITESPACE color to highlight the detected whitespace errors to honor the new configuration. Signed-off-by: Junio C Hamano <gitster@pobox.com>
* | Merge branch 'pr/mergetool'Junio C Hamano2007-12-09
|\ \ | | | | | | | | | | | | * pr/mergetool: Open external merge tool with original file extensions for all three files
| * | Open external merge tool with original file extensions for all three filesPini Reznik2007-12-05
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Before this change, conflicted files were open in external merge tool with temporary filenames like REMOTE.$$ and LOCAL.$$. This way meld was unable to recognize these files and syntax highlighting feature was unusable. Help such merge tools by giving temporar files the same extension as the original. Signed-off-by: Pini Reznik <pinir@expand.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
* | | Merge branch 'maint'Junio C Hamano2007-12-09
|\ \ \ | | | | | | | | | | | | | | | | * maint: config.c:store_write_pair(): don't read the byte before a malloc'd buffer.
| * | | config.c:store_write_pair(): don't read the byte before a malloc'd buffer.Jim Meyering2007-12-08
| | | | | | | | | | | | | | | | | | | | Signed-off-by: Jim Meyering <meyering@redhat.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
* | | | Re-fix "builtin-commit: fix --signoff"Junio C Hamano2007-12-09
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | An earlier fix to the said commit was incomplete; it mixed up the meaning of the flag parameter passed to the internal fmt_ident() function, so this corrects it. git_author_info() and git_committer_info() can be told to issue a warning when no usable user information is found, and optionally can be told to error out. Operations that actually use the information to record a new commit or a tag will still error out, but the caller to leave reflog record will just silently use bogus user information. Not warning on misconfigured user information while writing a reflog entry is somewhat debatable, but it is probably nicer to the users to silently let it pass, because the only information you are losing is who checked out the branch. * git_author_info() and git_committer_info() used to take 1 (positive int) to error out with a warning on misconfiguration; this is now signalled with a symbolic constant IDENT_ERROR_ON_NO_NAME. * These functions used to take -1 (negative int) to warn but continue; this is now signalled with a symbolic constant IDENT_WARN_ON_NO_NAME. * fmt_ident() function implements the above error reporting behaviour common to git_author_info() and git_committer_info(). A symbolic constant IDENT_NO_DATE can be or'ed in to the flag parameter to make it return only the "Name <email@address.xz>". * fmt_name() is a thin wrapper around fmt_ident() that always passes IDENT_ERROR_ON_NO_NAME and IDENT_NO_DATE. Signed-off-by: Junio C Hamano <gitster@pobox.com>
* | | | Add tests for pre-commit and commit-msg hooksWincent Colaiuta2007-12-09
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | As desired, these pass for git-commit.sh, fail for builtin-commit (prior to the fixes), and succeeded for builtin-commit (after the fixes). Signed-off-by: Wincent Colaiuta <win@wincent.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
* | | | Fix commit-msg hook to allow editingJunio C Hamano2007-12-09
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The old git-commit.sh script allowed the commit-msg hook to not only prevent a commit from proceding, but also to edit the commit message on the fly and allow it to proceed. So here we teach builtin-commit to do the same. This is based on Wincent's patch, but redone with a clarified logic. Signed-off-by: Junio C Hamano <gitster@pobox.com>
* | | | Documentation: fix --no-verify documentation for "git commit"Wincent Colaiuta2007-12-09
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The documentation for the --no-verify switch should mention the commit-msg hook, not just the pre-commit hook. Signed-off-by: Wincent Colaiuta <win@wincent.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
* | | | Allow --no-verify to bypass commit-msg hookWincent Colaiuta2007-12-09
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | At the moment the --no-verify switch to "git commit" instructs it to skip over the pre-commit hook. Here we teach "git commit --no-verify" to skip over the commit-msg hook as well. This brings the behaviour of builtin-commit back in line with git-commit.sh. Signed-off-by: Wincent Colaiuta <win@wincent.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
* | | | ls-remote: resurrect pattern limit supportJunio C Hamano2007-12-09
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | "git ls-remote $remote $name1 $name2..." used to limit the output to refs that end with one of the $name given from the command line, but recent rewrite to C forgot to implement that support. Signed-off-by: Junio C Hamano <gitster@pobox.com>
* | | | shortlog: code restructuring and clean-upJunio C Hamano2007-12-08
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The code tried to parse and clean-up the author name and the one line information in three places (two callers of insert_author_oneline() and the called function itself), which was a mess. This renames the callee to insert_one_record() and make it responsible for cleaning up the author name and one line information. Signed-off-by: Junio C Hamano <gitster@pobox.com>
* | | | mailmap: fix bogus for() loop that happened to be safe by accidentJunio C Hamano2007-12-08
| | | | | | | | | | | | | | | | | | | | | | | | | | | | The empty loop pretended to have an empty statement as its body by a phony indentation, but in fact was slurping the next statement into it. Signed-off-by: Junio C Hamano <gitster@pobox.com>
* | | | pack-objects: fix threaded load balancingNicolas Pitre2007-12-08
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The current method consists of a master thread serving chunks of objects to work threads when they're done with their previous chunk. The issue is to determine the best chunk size: making it too large creates poor load balancing, while making it too small has a negative effect on pack size because of the increased number of chunk boundaries and poor delta window utilization. This patch implements a completely different approach by initially splitting the work in large chunks uniformly amongst all threads, and whenever a thread is done then it steals half of the remaining work from another thread with the largest amount of unprocessed objects. This has the advantage of greatly reducing the number of chunk boundaries with an almost perfect load balancing. Signed-off-by: Nicolas Pitre <nico@cam.org> Signed-off-by: Junio C Hamano <gitster@pobox.com>