summaryrefslogtreecommitdiff
AgeCommit message (Collapse)AuthorFilesLines
2013-10-16C: have space around && and || operatorsLibravatar Junio C Hamano5-5/+5
Correct all hits from git grep -e '\(&&\|||\)[^ ]' -e '[^ ]\(&&\|||\)' -- '*.c' i.e. && or || operators that are followed by anything but a SP, or that follow something other than a SP or a HT, so that these operators have a SP around it when necessary. We usually refrain from making this kind of a tree-wide change in order to avoid unnecessary conflicts with other "real work" patches, but in this case, the end result does not have a potentially cumbersome tree-wide impact, while this is a tree-wide cleanup. Fixes to compat/regex/regcomp.c and xdiff/xemit.c are to replace a HT immediately after && with a SP. This is based on Felipe's patch to bultin/symbolic-ref.c; I did all the finding out what other files in the whole tree need to be fixed and did the fix and also the log message while reviewing that single liner, so any screw-ups in this version are mine. Signed-off-by: Felipe Contreras <felipe.contreras@gmail.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2013-10-14mergetool--lib: Fix typo in the merge/difftool helpLibravatar Stefan Saasen1-1/+1
The help text for the `tool` flag should mention: --tool=<tool> instead of: --tool-<tool> Signed-off-by: Stefan Saasen <ssaasen@atlassian.com> Reviewed-by: David Aguilar <davvid@gmail.com> Signed-off-by: Jonathan Nieder <jrnieder@gmail.com>
2013-10-14sparse: suppress some "using sizeof on a function" warningsLibravatar Ramsay Jones1-0/+3
Sparse issues an "using sizeof on a function" warning for each call to curl_easy_setopt() which sets an option that takes a function pointer parameter. (currently 12 such warnings over 4 files.) The warnings relate to the use of the "typecheck-gcc.h" header file which adds a layer of type-checking macros to the curl function invocations (for gcc >= 4.3 and !__cplusplus). As part of the type-checking layer, 'sizeof' is applied to the function parameter of curl_easy_setopt(). Note that, in the context of sizeof, the function to function pointer conversion is not performed and that sizeof(f) != sizeof(&f). A simple solution, therefore, would be to replace the function name in each such call to curl_easy_setopt() with an explicit function pointer expression (i.e. replace f with &f). However, the "typecheck-gcc.h" header file is only conditionally included, in addition to the gcc and C++ checks mentioned above, depending on the CURL_DISABLE_TYPECHECK preprocessor variable. In order to suppress the warnings, we use target-specific variable assignments to add -DCURL_DISABLE_TYPECHECK to SPARSE_FLAGS for each file affected (http-push.c, http.c, http-walker.c and remote-curl.c). Signed-off-by: Ramsay Jones <ramsay@ramsay1.demon.co.uk> Signed-off-by: Jonathan Nieder <jrnieder@gmail.com>
2013-10-14format-patch doc: Thunderbird wraps lines unless mailnews.wraplength=0Libravatar Ramsay Jones1-1/+2
The Thunderbird section of the 'MUA-specific hints' contains three different approaches to setting up the mail client to leave patch emails unmolested. The second approach (configuration) has a step missing when configuring the composition window not to wrap. In particular, the "mailnews.wraplength" configuration variable needs to be set to zero. Update the documentation to add the missing setting. Signed-off-by: Ramsay Jones <ramsay@ramsay1.demon.co.uk> Signed-off-by: Jonathan Nieder <jrnieder@gmail.com>
2013-10-14Merge branch 'rj/highlight-test-hang'Libravatar Jonathan Nieder1-2/+4
* rj/highlight-test-hang: gitweb test: fix highlight test hang on Linux Mint
2013-10-14gitweb test: fix highlight test hang on Linux MintLibravatar Ramsay Jones1-2/+4
Linux Mint has an implementation of the highlight command (unrelated to the one from http://www.andre-simon.de) that works as a simple filter. The script uses 'sed' to add terminal colour escape codes around text matching a regular expression. When t9500-*.sh attempts to run "highlight --version", the script simply hangs waiting for input. (See https://bugs.launchpad.net/linuxmint/+bug/815005). The tool required by gitweb can be installed from the 'highlight' package. Unfortunately, given the default $PATH, this leads to the tool having lower precedence than the script. In order to avoid hanging the test, add '</dev/null' to the command line of the highlight invocation. Also, since the 'highlight' tool requred by gitweb produces '--version' output (and the script does not), saving the command output allows a simple check for the wrong 'highlight'. Signed-off-by: Ramsay Jones <ramsay@ramsay1.demon.co.uk> Signed-off-by: Jonathan Nieder <jrnieder@gmail.com>
2013-10-14wrapper.c: only define gitmkstemps if neededLibravatar Ramsay Jones1-0/+2
When the NO_MKSTEMPS build variable is not set, the gitmkstemps function is dead code. Use a preprocessor conditional to only include the definition when needed. Noticed by sparse. ("'gitmkstemps' was not declared. Should it be static?") Signed-off-by: Ramsay Jones <ramsay@ramsay1.demon.co.uk> Signed-off-by: Jonathan Nieder <jrnieder@gmail.com>
2013-10-14refs.c: spell NULL pointer as NULLLibravatar Ramsay Jones1-1/+1
A call to update_ref_lock() passes '0' to the 'int *type_p' parameter. Noticed by sparse. ("Using plain integer as NULL pointer") Signed-off-by: Ramsay Jones <ramsay@ramsay1.demon.co.uk> Signed-off-by: Jonathan Nieder <jrnieder@gmail.com>
2013-10-14config.c: mark file-local function staticLibravatar Ramsay Jones1-1/+1
Commit 7192777 refactors git_parse_ulong, which is public, into a more generic function. But since we kept the git_parse_ulong wrapper, only that part needs to be public; nobody outside the file calls the lower-level git_parse_unsigned. Noticed with sparse. ("'git_parse_unsigned' was not declared. Should it be static?") Signed-off-by: Ramsay Jones <ramsay@ramsay1.demon.co.uk> Explained-by: Jeff King <peff@peff.net> Signed-off-by: Jonathan Nieder <jrnieder@gmail.com>
2013-10-14CodingGuidelines: style for multi-line commentsLibravatar brian m. carlson1-0/+8
The style for multi-line comments is often mentioned and should be documented for clarity. Signed-off-by: brian m. carlson <sandals@crustytoothpaste.net> Signed-off-by: Jonathan Nieder <jrnieder@gmail.com>
2013-10-14Merge branch 'nv/doc-config-signingkey'Libravatar Jonathan Nieder1-5/+5
* nv/doc-config-signingkey: config doc: user.signingkey is also used for signed commits
2013-10-14config doc: user.signingkey is also used for signed commitsLibravatar Nicolas Vigier1-5/+5
The description of the user.signingkey option only mentioned its use when creating a signed tag. Make it clear that is is also used when creating signed commits. Signed-off-by: Nicolas Vigier <boklm@mars-attacks.org> Signed-off-by: Jonathan Nieder <jrnieder@gmail.com>
2013-10-14Merge branch 'sb/checkout-test-complex-path'Libravatar Jonathan Nieder1-7/+7
* sb/checkout-test-complex-path: checkout test: enable test with complex relative path
2013-10-14Merge branch 'rt/cherry-pick-status'Libravatar Jonathan Nieder3-11/+17
* rt/cherry-pick-status: status: show commit sha1 in "You are currently cherry-picking" message status test: add missing && to <<EOF blocks
2013-10-14Merge branch 'rj/doc-formatting-fix'Libravatar Jonathan Nieder2-6/+6
* rj/doc-formatting-fix: howto/revert-a-faulty-merge: fix unescaped '^'s howto/setup-git-server-over-http: fix unescaped '^'s
2013-10-14Merge branch 'po/remote-set-head-usage'Libravatar Jonathan Nieder2-5/+5
* po/remote-set-head-usage: remote set-head -h: add long options to synopsis remote doc: document long forms of set-head options
2013-10-14Merge branch 'nd/clone-local-with-colon'Libravatar Jonathan Nieder2-2/+46
* nd/clone-local-with-colon: clone: tighten "local paths with colons" check a bit
2013-10-14Merge branch 'jx/clean-interactive'Libravatar Jonathan Nieder2-3/+3
* jx/clean-interactive: path-utils test: rename mingw_path function to print_path
2013-10-14Merge branch 'jk/diff-algo'Libravatar Jonathan Nieder1-2/+2
* jk/diff-algo: merge-recursive: fix parsing of "diff-algorithm" option
2013-10-14path-utils test: rename mingw_path function to print_pathLibravatar Sebastian Schuberth2-3/+3
mingw_path was introduced in abd4284 to output a mangled path as it is passed as an argument to main(). But the name is misleading because mangling does not come from MinGW, but from MSYS [1]. As abd4284 does not introduce any MSYS or MinGW specific code but just prints out argv[2] as it is passed to main(), give the function the more generic and less confusing name "print_path". [1] http://www.mingw.org/wiki/Posix_path_conversion Signed-off-by: Sebastian Schuberth <sschuberth@gmail.com> Signed-off-by: Jonathan Nieder <jrnieder@gmail.com>
2013-10-14howto/revert-a-faulty-merge: fix unescaped '^'sLibravatar Ramsay Jones1-4/+4
Several uses of the '^' operator are being interpreted by asciidoc as requests to show the following text as a superscript. In order to fix this problem, use backticks (`) to quote the text of the affected git command invocations. Signed-off-by: Ramsay Jones <ramsay@ramsay1.demon.co.uk> Signed-off-by: Jonathan Nieder <jrnieder@gmail.com>
2013-10-14howto/setup-git-server-over-http: fix unescaped '^'sLibravatar Ramsay Jones1-2/+2
The text contains two 'grep' invocations which include the 'start of line' regular expression character '^'. Asciidoc mis-interprets this use of '^' as a superscript request. In order to fix this formatting problem, use backticks (`) to quote the text of the affected 'grep' command invocations. Signed-off-by: Ramsay Jones <ramsay@ramsay1.demon.co.uk> Signed-off-by: Jonathan Nieder <jrnieder@gmail.com>
2013-10-13mergetools/diffmerge: support DiffMerge as a git mergetoolLibravatar Stefan Saasen3-2/+18
DiffMerge is a non-free (but gratis) tool that supports OS X, Windows and Linux. See http://www.sourcegear.com/diffmerge/ DiffMerge includes a script `/usr/bin/diffmerge` that can be used to launch the graphical compare tool. This change adds mergetool support for DiffMerge and adds 'diffmerge' as an option to the mergetool help. Signed-off-by: Stefan Saasen <ssaasen@atlassian.com> Acked-by: David Aguilar <davvid@gmail.com> Signed-off-by: Jonathan Nieder <jrnieder@gmail.com>
2013-10-13.mailmap: switch to Thomas Rast's personal addressLibravatar Thomas Rast1-1/+3
Normalize to my personal address, as my ETH addresses will expire soon. Also add my new corp account to be somewhat futureproof. Note that despite the private address being first, Google owns the copyright as long as I am employed there. Signed-off-by: Thomas Rast <trast@inf.ethz.ch> Signed-off-by: Jonathan Nieder <jrnieder@gmail.com>
2013-10-11status: show commit sha1 in "You are currently cherry-picking" messageLibravatar Ralf Thielow3-6/+12
Especially helpful when cherry-picking multiple commits. Signed-off-by: Ralf Thielow <ralf.thielow@gmail.com> Acked-by: Matthieu Moy <Matthieu.Moy@grenoble-inp.fr> Signed-off-by: Jonathan Nieder <jrnieder@gmail.com>
2013-10-11status test: add missing && to <<EOF blocksLibravatar Jonathan Nieder1-5/+5
When a test forgets to include && after each command, it is possible for an early command to succeed but the test to fail, which can hide bugs. Checked using the following patch to the test harness: --- a/t/test-lib.sh +++ b/t/test-lib.sh @@ -425,7 +425,17 @@ test_eval_ () { eval </dev/null >&3 2>&4 "$*" } +check_command_chaining_ () { + eval >&3 2>&4 "(exit 189) && $*" + eval_chain_ret=$? + if test "$eval_chain_ret" != 189 + then + error 'bug in test script: missing "&&" in test commands' + fi +} + test_run_ () { + check_command_chaining_ "$1" test_cleanup=: expecting_failure=$2 setup_malloc_check Signed-off-by: Jonathan Nieder <jrnieder@gmail.com>
2013-10-09checkout test: enable test with complex relative pathLibravatar Stefan Beller1-7/+7
This test was added, commented out, in fed1b5ca (git-checkout: Test for relative path use, 2007-11-09). Later git's path handling was improved (d089ebaa, setup: sanitize absolute and funny paths in get_pathspec(), 2008-01-28) but we forgot to enable the now-working test. This test expects to run from a subdirectory, so add a 'cd'. While we're here, examine the content of the checked-out file instead of just checking that it exists. The other checkout tests already do the same. Signed-off-by: Stefan Beller <stefanbeller@googlemail.com> Signed-off-by: Jonathan Nieder <jrnieder@gmail.com>
2013-10-08Merge branch 'tz/credential-netrc'Libravatar Jonathan Nieder1-1/+3
* tz/credential-netrc: git-credential-netrc: fix uninitialized warning
2013-10-08git-credential-netrc: fix uninitialized warningLibravatar Ted Zlatanov1-1/+3
Simple patch to avoid unitialized warning and log what we'll do. Signed-off-by: Ted Zlatanov <tzz@lifelogs.com> Signed-off-by: Jonathan Nieder <jrnieder@gmail.com>
2013-10-03Documentation/Makefile: make AsciiDoc dblatex dir configurableLibravatar John Keeping1-1/+2
On my system this is in /usr/share/asciidoc/dblatex not /etc/asciidoc/dblatex. Extract this portion of the path to a variable so that is can be set in config.mak. Signed-off-by: John Keeping <john@keeping.me.uk> Signed-off-by: Jonathan Nieder <jrnieder@gmail.com>
2013-09-30rebase -i: respect core.abbrevLibravatar Kirill A. Shutemov1-1/+1
collapse_todo_ids() uses `git rev-parse --short=7' to abbreviate commit ids before showing them to the user in a text editor. Let's drop argument from --short to the configured value instead (still defaulting to 7). Signed-off-by: Kirill A. Shutemov <kirill.shutemov@linux.intel.com> Acked-by: Eric Sunshine <sunshine@sunshineco.com> Signed-off-by: Jonathan Nieder <jrnieder@gmail.com>
2013-09-27RelNotes/1.8.5: direct script writers to "git status --porcelain"Libravatar Matthieu Moy1-0/+3
[jn: with wording tweak from Keshav Kini] Signed-off-by: Matthieu Moy <Matthieu.Moy@imag.fr> Signed-off-by: Jonathan Nieder <jrnieder@gmail.com>
2013-09-27remote set-head -h: add long options to synopsisLibravatar Philip Oakley1-2/+2
Document --auto and --delete alongside their short forms -a and -d in the first line of 'git remote set-head -h' output. Signed-off-by: Philip Oakley <philipoakley@iee.org> Signed-off-by: Jonathan Nieder <jrnieder@gmail.com>
2013-09-27remote doc: document long forms of set-head optionsLibravatar Philip Oakley1-3/+3
"git remote set-head" has always supported --add and --delete as synonyms for the -a and -d option but forgot to document them. Signed-off-by: Philip Oakley <philipoakley@iee.org> Signed-off-by: Jonathan Nieder <jrnieder@gmail.com>
2013-09-27clone: tighten "local paths with colons" check a bitLibravatar Nguyễn Thái Ngọc Duy2-2/+46
commit 6000334 (clone: allow cloning local paths with colons in them - 2013-05-04) made it possible to specify a path that has colons in it without file://, e.g. ../foo:bar/somewhere. But the check was a bit sloppy. Consider the url '[foo]:bar'. The '[]' unwrapping code will turn the string to 'foo\0:bar'. In effect this new string is the same as 'foo/:bar' in the check "path < strchrnul(host, '/')", which mistakes it for a local path (with '/' before the first ':') when it's actually not. So disable the check for '/' before ':' when the URL has been mangled by '[]' unwrapping. [jn: with tests from Jeff King] Noticed-by: Morten Stenshorne <mstensho@opera.com> Signed-off-by: Nguyễn Thái Ngọc Duy <pclouds@gmail.com> Signed-off-by: Jonathan Nieder <jrnieder@gmail.com>
2013-09-26contrib: remove ciabotLibravatar Stefan Beller4-553/+0
Almost a year ago the CIA service irrevocably crashed. The CIA author had plans to revive the service, but the effort has since sunk without trace. Projects tend to use "irker" instead these days. Repository hook scripts for irker ship with the irker distribution. Signed-off-by: Stefan Beller <stefanbeller@googlemail.com> Acked-by: Eric S. Raymond <esr@thyrsus.com> Signed-off-by: Jonathan Nieder <jrnieder@gmail.com>
2013-09-26Sync with Git 1.8.4.1Libravatar Jonathan Nieder2-14/+36
2013-09-26Git 1.8.4.1Libravatar Jonathan Nieder3-15/+37
Signed-off-by: Jonathan Nieder <jrnieder@gmail.com>
2013-09-26merge-recursive: fix parsing of "diff-algorithm" optionLibravatar John Keeping1-2/+2
The "diff-algorithm" option to the recursive merge strategy takes the name of the algorithm as an option, but it uses strcmp on the option string to check if it starts with "diff-algorithm=", meaning that this options cannot actually be used. Fix this by switching to prefixcmp. At the same time, clarify the following line by using strlen instead of a hard-coded length, which also makes it consistent with nearby code. Reported-by: Luke Noel-Storr <luke.noel-storr@integrate.co.uk> Signed-off-by: John Keeping <john@keeping.me.uk> Signed-off-by: Jonathan Nieder <jrnieder@gmail.com>
2013-09-26Merge branch 'mm/rebase-continue-freebsd-WB' into maintLibravatar Jonathan Nieder1-1/+10
* mm/rebase-continue-freebsd-WB: rebase: fix run_specific_rebase's use of "return" on FreeBSD
2013-09-26Merge branch 'km/svn-1.8-serf-only' into maintLibravatar Jonathan Nieder2-3/+34
* km/svn-1.8-serf-only: Git.pm: revert _temp_cache use of temp_is_locked git-svn: allow git-svn fetching to work using serf Git.pm: add new temp_is_locked function
2013-09-26Merge branch 'js/xread-in-full' into maintLibravatar Jonathan Nieder1-1/+1
* js/xread-in-full: stream_to_pack: xread does not guarantee to read all requested bytes
2013-09-26Merge branch 'bc/send-email-ssl-die-message-fix' into maintLibravatar Jonathan Nieder1-1/+1
* bc/send-email-ssl-die-message-fix: send-email: don't call methods on undefined values
2013-09-24Merge branch 'bc/submodule-status-ignored'Libravatar Jonathan Nieder7-11/+55
* bc/submodule-status-ignored: Improve documentation concerning the status.submodulesummary setting submodule: don't print status output with ignore=all submodule: fix confusing variable name
2013-09-24Merge branch 'cc/replace-with-the-same-type'Libravatar Jonathan Nieder3-9/+61
* cc/replace-with-the-same-type: Doc: 'replace' merge and non-merge commits t6050-replace: use some long option names replace: allow long option names Documentation/replace: add Creating Replacement Objects section t6050-replace: add test to clean up all the replace refs t6050-replace: test that objects are of the same type Documentation/replace: state that objects must be of the same type replace: forbid replacing an object with one of a different type
2013-09-24Merge branch 'kb/msvc-compile'Libravatar Jonathan Nieder7-23/+32
* kb/msvc-compile: Windows: do not redefine _WIN32_WINNT MinGW: Fix stat definitions to work with MinGW runtime version 4.0 MSVC: fix stat definition hell MSVC: fix compile errors due to macro redefinitions MSVC: fix compile errors due to missing libintl.h
2013-09-24Merge branch 'nd/unpack-entry-optim-in-pack-objects'Libravatar Jonathan Nieder1-10/+10
* nd/unpack-entry-optim-in-pack-objects: pack-objects: no crc check when the cached version is used
2013-09-24Merge branch 'jk/shortlog-tolerate-broken-commit'Libravatar Jonathan Nieder2-2/+20
* jk/shortlog-tolerate-broken-commit: shortlog: ignore commits with missing authors
2013-09-24Merge branch 'jc/strcasecmp-pure-inline'Libravatar Jonathan Nieder1-2/+16
* jc/strcasecmp-pure-inline: mailmap: work around implementations with pure inline strcasecmp
2013-09-24Merge branch 'sg/complete-untracked-filter'Libravatar Jonathan Nieder1-2/+2
* sg/complete-untracked-filter: completion: improve untracked directory filtering for filename completion