summaryrefslogtreecommitdiff
Commit message (Collapse)AuthorAgeFilesLines
* t7502: remove clear_configYann Droneaud2013-03-251-26/+6
| | | | | | | | | Using test_config ensure the configuration variable are removed at the end of the test, there's no need to remove variable at the beginning of the test. Signed-off-by: Yann Droneaud <ydroneaud@opteya.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
* t7502: use test_config to set/unset git config variablesYann Droneaud2013-03-251-5/+3
| | | | | | | | | | | | Instead of using construct such as: test_when_finished "git config --unset <key>" git config <key> <value> uses test_config <key> <value> The latter takes care of removing <key> at the end of the test. Signed-off-by: Yann Droneaud <ydroneaud@opteya.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
* t9500: use test_config to set/unset git config variablesYann Droneaud2013-03-251-2/+1
| | | | | | | | | | | | Instead of using construct such as: test_when_finished "git config --unset <key>" git config <key> <value> uses test_config <key> <value> The latter takes care of removing <key> at the end of the test. Signed-off-by: Yann Droneaud <ydroneaud@opteya.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
* t7508: use test_config to set/unset git config variablesYann Droneaud2013-03-251-30/+16
| | | | | | | | | | | | Instead of using construct such as: test_when_finished "git config --unset <key>" git config <key> <value> uses test_config <key> <value> The latter takes care of removing <key> at the end of the test. Signed-off-by: Yann Droneaud <ydroneaud@opteya.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
* t7500: use test_config to set/unset git config variablesYann Droneaud2013-03-251-4/+2
| | | | | | | | | | | | Instead of using construct such as: test_when_finished "git config --unset <key>" git config <key> <value> uses test_config <key> <value> The latter takes care of removing <key> at the end of the test. Signed-off-by: Yann Droneaud <ydroneaud@opteya.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
* t5541: use test_config to set/unset git config variablesYann Droneaud2013-03-251-2/+1
| | | | | | | | | | | | Instead of using construct such as: test_when_finished "git config --unset <key>" git config <key> <value> uses test_config <key> <value> The latter takes care of removing <key> at the end of the test. Signed-off-by: Yann Droneaud <ydroneaud@opteya.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
* t5520: use test_config to set/unset git config variablesYann Droneaud2013-03-251-8/+4
| | | | | | | | | | | | Instead of using construct such as: test_when_finished "git config --unset <key>" git config <key> <value> uses test_config <key> <value> The latter takes care of removing <key> at the end of the test. Signed-off-by: Yann Droneaud <ydroneaud@opteya.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
* t4202: use test_config/test_unconfig to set/unset git config variablesYann Droneaud2013-03-251-20/+8
| | | | | | | | | | | | | | | | | | | | | | | Instead of using construct such as: test_when_finished "git config --unset <key>" git config <key> <value> uses test_config <key> <value> The latter takes care of removing <key> at the end of the test. Additionally, instead of git config <key> "" or git config --unset <key> uses test_unconfig <key> The latter doesn't failed if <key> is not defined. Tests are modified to assume correct (default) configuration at entry, and to reset the modified configuration variables at the end. Signed-off-by: Yann Droneaud <ydroneaud@opteya.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
* t4034: use test_config/test_unconfig to set/unset git config variablesYann Droneaud2013-03-251-4/+3
| | | | | | | | | | | | | | | | | | | | Instead of using construct such as: test_when_finished "git config --unset <key>" git config <key> <value> uses test_config <key> <value> The latter takes care of removing <key> at the end of the test. Additionally, instead of git config <key> "" or git config --unset <key> uses test_unconfig <key> The latter doesn't failed if <key> is not defined. Signed-off-by: Yann Droneaud <ydroneaud@opteya.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
* t4304: use test_config to set/unset git config variablesYann Droneaud2013-03-251-2/+1
| | | | | | | | | | | | | | | Instead of using construct such as: test_when_finished "git config --unset <key>" git config <key> <value> uses test_config <key> <value> The latter takes care of removing <key> at the end of the test. Tests are modified to assume correct (default) configuration at entry, and to reset the modified configuration variables at the end. Signed-off-by: Yann Droneaud <ydroneaud@opteya.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
* t3400: use test_config to set/unset git config variablesYann Droneaud2013-03-251-2/+1
| | | | | | | | | | | | Instead of using construct such as: test_when_finished "git config --unset <key>" git config <key> <value> uses test_config <key> <value> The latter takes care of removing <key> at the end of the test. Signed-off-by: Yann Droneaud <ydroneaud@opteya.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
* diff.c: diff.renamelimit => diff.renameLimit in messageMax Nanasy2013-03-211-1/+1
| | | | | | | | | | In the warning message printed when rename or unmodified copy detection was skipped due to too many files, change "diff.renamelimit" to "diff.renameLimit", in order to make it consistent with git documentation, which consistently uses "diff.renameLimit". Signed-off-by: Max Nanasy <max.nanasy@gmail.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
* wt-status: fix possible use of uninitialized variableJeff King2013-03-211-1/+4
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | In wt_status_print_change_data, we accept a change_type flag that is meant to be either WT_STATUS_UPDATED or WT_STATUS_CHANGED. We then switch() on this value to set the local variable "status" for each case, but do not provide a fallback "default" label to the switch statement. As a result, the compiler realizes that "status" might be unset, and complains with a warning. To silence this warning, we use the "int status = status" trick. This is correct with the current code, as all callers provide one of the two expected change_type flags. However, it's also a maintenance trap, as there is nothing to prevent future callers from passing another flag, nor to document this assumption. Instead of using the "x = x" hack, let's handle the default case in the switch() statement with a die("BUG"). That tells the compiler and any readers of the code exactly what the function's input assumptions are. We could also convert the flag to an enum, which would provide a compile-time check on the function input. However, since these flags are part of a larger enum, that would make the code unnecessarily complex (we would have to make a new enum with just the two flags, and then convert it to the old enum for passing to sub-functions). Signed-off-by: Jeff King <peff@peff.net> Signed-off-by: Junio C Hamano <gitster@pobox.com>
* fast-import: clarify "inline" logic in file_change_mJeff King2013-03-211-1/+2
| | | | | | | | | | | | | | | | | | | | When we read a fast-import line like: M 100644 :1 foo.c we point the local object_entry variable "oe" to the object named by the mark ":1". When the input uses the "inline" construct, however, we do not have such an object_entry. The current code is careful not to access "oe" in the inline case, but we can make the assumption even more obvious (and catch violations of it) by setting oe to NULL and adding a comment. As a bonus, this also squelches an over-zealous gcc -Wuninitialized warning, which means we can drop the "oe = oe" initialization hack. Signed-off-by: Jeff King <peff@peff.net> Signed-off-by: Junio C Hamano <gitster@pobox.com>
* run-command: always set failed_errno in start_commandJeff King2013-03-211-2/+3
| | | | | | | | | | | | | | | | | When we fail to fork, we set the failed_errno variable to the value of errno so it is not clobbered by later syscalls. However, we do so in a conditional, and it is hard to see later under what conditions the variable has a valid value. Instead of setting it only when fork fails, let's just always set it after forking. This is more obvious for human readers (as we are no longer setting it as a side effect of a strerror call), and it is more obvious to gcc, which no longer generates a spurious -Wuninitialized warning. It also happens to match what the WIN32 half of the #ifdef does. Signed-off-by: Jeff King <peff@peff.net> Signed-off-by: Junio C Hamano <gitster@pobox.com>
* transport: drop "int cmp = cmp" hackJeff King2013-03-211-1/+1
| | | | | | | | | | | | | According to 47ec794, this initialization is meant to squelch an erroneous uninitialized variable warning from gcc 4.0.1. That version is quite old at this point, and gcc 4.1 and up handle it fine, with one exception. There seems to be a regression in gcc 4.6.3, which produces the warning; however, gcc versions 4.4.7 and 4.7.2 do not. Signed-off-by: Jeff King <peff@peff.net> Reviewed-by: Jonathan Nieder <jrnieder@gmail.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
* drop some obsolete "x = x" compiler warning hacksJeff King2013-03-212-2/+2
| | | | | | | | | | | | | | | | | In cases where the setting and access of a variable are protected by the same conditional flag, older versions of gcc would generate a "might be used unitialized" warning. We silence the warning by initializing the variable to itself, a hack that gcc recognizes. Modern versions of gcc are smart enough to get this right, going back to at least version 4.3.5. gcc 4.1 does get it wrong in both cases, but is sufficiently old that we probably don't need to care about it anymore. Signed-off-by: Jeff King <peff@peff.net> Reviewed-by: Jonathan Nieder <jrnieder@gmail.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
* fast-import: use pointer-to-pointer to keep list tailJeff King2013-03-211-6/+4
| | | | | | | | | | This is shorter, idiomatic, and it means the compiler does not get confused about whether our "e" pointer is valid, letting us drop the "e = e" hack. Signed-off-by: Jeff King <peff@peff.net> Reviewed-by: Jonathan Nieder <jrnieder@gmail.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
* Merge branch 'maint'Junio C Hamano2013-03-171-0/+4
|\ | | | | | | | | * maint: t1507: Test that branchname@{upstream} is interpreted as branch
| * t1507: Test that branchname@{upstream} is interpreted as branchKacper Kornet2013-03-171-0/+4
| | | | | | | | | | | | | | | | | | Syntax branchname@{upstream} should interpret its argument as a name of a branch. Add the test to check that it doesn't try to interpret it as a refname if the branch in question does not exist. Signed-off-by: Kacper Kornet <draenog@pld-linux.org> Signed-off-by: Junio C Hamano <gitster@pobox.com>
* | Merge branch 'maint'Junio C Hamano2013-03-173-38/+31
|\ \ | |/ | | | | | | | | | | * maint: rev-parse: clarify documentation of $name@{upstream} syntax sha1_name: pass object name length to diagnose_invalid_sha1_path() Makefile: keep LIB_H entries together and sorted
| * rev-parse: clarify documentation of $name@{upstream} syntaxKacper Kornet2013-03-171-4/+4
| | | | | | | | | | | | | | | | | | | | | | | | | | "git rev-parse" interprets string in string@{upstream} as a name of a branch not a ref. For example, refs/heads/master@{upstream} looks for an upstream branch that is merged by git-pull to ref refs/heads/refs/heads/master not to refs/heads/master. However the documentation could mislead a user to believe that the string is interpreted as ref. Signed-off-by: Kacper Kornet <draenog@pld-linux.org> Signed-off-by: Junio C Hamano <gitster@pobox.com>
| * sha1_name: pass object name length to diagnose_invalid_sha1_path()René Scharfe2013-03-171-18/+14
| | | | | | | | | | | | | | | | | | | | The only caller of diagnose_invalid_sha1_path() extracts a substring from an object name by creating a NUL-terminated copy of the interesting part. Add a length parameter to the function and thus avoid the need for an allocation, thereby simplifying the code. Signed-off-by: Rene Scharfe <rene.scharfe@lsrfire.ath.cx> Signed-off-by: Junio C Hamano <gitster@pobox.com>
| * Makefile: keep LIB_H entries together and sortedRené Scharfe2013-03-161-16/+13
| | | | | | | | | | | | | | | | | | | | As a follow-up to 60d24dd25 (Makefile: fold XDIFF_H and VCSSVN_H into LIB_H), let the unconditional additions to LIB_H form a single sorted list. Also drop the duplicate entry for xdiff/xdiff.h, which was easy to spot after sorting. Signed-off-by: Rene Scharfe <rene.scharfe@lsrfire.ath.cx> Signed-off-by: Junio C Hamano <gitster@pobox.com>
* | Git 1.8.2v1.8.2Junio C Hamano2013-03-132-1/+6
| | | | | | | | Signed-off-by: Junio C Hamano <gitster@pobox.com>
* | Merge branch 'maint'Junio C Hamano2013-03-111-2/+2
|\ \ | |/ | | | | | | * maint: git.c: make usage match manual page
| * git.c: make usage match manual pageKevin Bracey2013-03-111-2/+2
| | | | | | | | | | | | | | | | Reorder option list in command-line usage to match the manual page. Also make it less than 80-characters wide. Signed-off-by: Kevin Bracey <kevin@bracey.fi> Signed-off-by: Junio C Hamano <gitster@pobox.com>
* | Merge branch 'mp/complete-paths'Junio C Hamano2013-03-111-5/+11
|\ \ | | | | | | | | | | | | * mp/complete-paths: git-completion.bash: zsh does not implement function redirection correctly
| * | git-completion.bash: zsh does not implement function redirection correctlyMatthieu Moy2013-03-111-5/+11
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | A recent change added functions whose entire standard error stream is redirected to /dev/null using a construct that is valid POSIX.1 but is not widely used: funcname () { cd "$1" && run some command "$2" } 2>/dev/null Even though this file is "git-completion.bash", zsh completion support dot-sources it (instead of asking bash to grok it like tcsh completion does), and zsh does not implement this redirection correctly. With zsh, trying to complete an inexistant directory gave this: git add no-such-dir/__git_ls_files_helper:cd:2: no such file or directory: no-such-dir/ Also these functions use "cd" to first go somewhere else before running a command, but the location the caller wants them to go that is given as an argument to them should not be affected by CDPATH variable the users may have set for their interactive session. To fix both of these, wrap the body of the function in a subshell, unset CDPATH at the beginning of the subshell, and redirect the standard error stream of the subshell to /dev/null. Signed-off-by: Matthieu Moy <Matthieu.Moy@imag.fr> Signed-off-by: Junio C Hamano <gitster@pobox.com>
* | | Merge branch 'mm/add-u-A-finishing-touches'Junio C Hamano2013-03-111-3/+3
|\ \ \ | | | | | | | | | | | | | | | | * mm/add-u-A-finishing-touches: add: update pathless 'add [-u|-A]' warning to reflect change of plan
| * | | add: update pathless 'add [-u|-A]' warning to reflect change of planMatthieu Moy2013-03-111-3/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | We originally thought the transition would need a period where "git add [-u|-A]" without pathspec would be forbidden, but the warning is big enough to scare people and teach them not to use it (or, if so, to understand the consequences). Signed-off-by: Matthieu Moy <Matthieu.Moy@imag.fr> Signed-off-by: Junio C Hamano <gitster@pobox.com>
* | | | Merge branch 'gp/add-u-A-documentation'Junio C Hamano2013-03-111-10/+12
|\ \ \ \ | | | | | | | | | | | | | | | | | | | | * gp/add-u-A-documentation: add: Clarify documentation of -A and -u
| * | | | add: Clarify documentation of -A and -uGreg Price2013-03-071-10/+12
| |/ / / | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The documentation of '-A' and '-u' is very confusing for someone who doesn't already know what they do. Describe them with fewer words and clearer parallelism to each other and to the behavior of plain 'add'. Also mention the default <pathspec> for '-A' as well as '-u', because it applies to both. Signed-off-by: Greg Price <price@mit.edu> Signed-off-by: Junio C Hamano <gitster@pobox.com>
* | | | Merge branch 'maint'Junio C Hamano2013-03-101-1/+1
|\ \ \ \ | | |_|/ | |/| | | | | | | | | | * maint: Translate git_more_info_string consistently
| * | | Translate git_more_info_string consistentlyKevin Bracey2013-03-101-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | "git help" translated the "See 'git help <command>' for more information..." message, but "git" didn't. Signed-off-by: Kevin Bracey <kevin@bracey.fi> Signed-off-by: Junio C Hamano <gitster@pobox.com>
* | | | Merge branch 'maint'Junio C Hamano2013-03-091-1/+1
|\ \ \ \ | |/ / / | | | | | | | | | | | | * maint: perf: update documentation of GIT_PERF_REPEAT_COUNT
| * | | perf: update documentation of GIT_PERF_REPEAT_COUNTAntoine Pelisse2013-03-091-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Currently the documentation of GIT_PERF_REPEAT_COUNT says the default is five while "perf-lib.sh" uses a value of three as a default. Update the documentation so that it is consistent with the code. Signed-off-by: Antoine Pelisse <apelisse@gmail.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
* | | | Merge git://git.bogomips.org/git-svnJunio C Hamano2013-03-081-1/+6
|\ \ \ \ | | | | | | | | | | | | | | | | | | | | | | | | | * git://git.bogomips.org/git-svn: git svn: consistent spacing after "W:" in warnings git svn: ignore partial svn:mergeinfo
| * | | | git svn: consistent spacing after "W:" in warningsEric Wong2013-03-081-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | All other instances of "W:"-prefixed warning messages have a space after the "W:" to help with readability. Signed-off-by: Eric Wong <normalperson@yhbt.net>
| * | | | git svn: ignore partial svn:mergeinfoJan Pešta2013-03-081-0/+5
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Currently this is cosmetic change - the merges are ignored, becuase the methods (lookup_svn_merge, find_rev_before, find_rev_after) are failing on comparing text with number. See http://www.open.collab.net/community/subversion/articles/merge-info.html Extract: The range r30430:30435 that was added to 1.5.x in this merge has a '*' suffix for 1.5.x\www. This '*' is the marker for a non-inheritable mergeinfo range. The '*' means that only the path on which the mergeinfo is explicitly set has had this range merged into it. Signed-off-by: Jan Pesta <jan.pesta@certicon.cz> Signed-off-by: Eric Wong <normalperson@yhbt.net>
* | | | | Update draft release notes to 1.8.2Junio C Hamano2013-03-081-26/+34
|/ / / / | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Split the backward-compatibility notes into two sections, the ones that affect this release, and the other to describe changes meant for Git 2.0. The latter gives a context to understand why the changes for this release is necessary. Signed-off-by: Junio C Hamano <gitster@pobox.com>
* | | | Git 1.8.2-rc3v1.8.2-rc3Junio C Hamano2013-03-071-1/+1
| | | | | | | | | | | | | | | | Signed-off-by: Junio C Hamano <gitster@pobox.com>
* | | | Merge git://github.com/git-l10n/git-poJunio C Hamano2013-03-075-27/+29
|\ \ \ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * 'master' of git://github.com/git-l10n/git-po: l10n: zh_CN.po: translate 1 new message l10n: de.po: translate 1 new message l10n: vi.po: Update translation (2009t0f0u) l10n: Update Swedish translation (2009t0f0u) l10n: git.pot: v1.8.2 round 4 (1 changed)
| * | | | l10n: zh_CN.po: translate 1 new messageJiang Xin2013-03-071-4/+4
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Translate 1 new message came from git.pot update in ed1ddaf (l10n: git.pot: v1.8.2 round 4 (1 changed)). Signed-off-by: Jiang Xin <worldhello.net@gmail.com>
| * | | | l10n: de.po: translate 1 new messageRalf Thielow2013-03-061-7/+9
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Translate 1 new message came from git.pot update in ed1ddaf (l10n: git.pot: v1.8.2 round 4 (1 changed)). Signed-off-by: Ralf Thielow <ralf.thielow@gmail.com>
| * | | | l10n: vi.po: Update translation (2009t0f0u)Tran Ngoc Quan2013-03-061-10/+10
| | | | | | | | | | | | | | | | | | | | Signed-off-by: Tran Ngoc Quan <vnwildman@gmail.com>
| * | | | l10n: Update Swedish translation (2009t0f0u)Peter Krefting2013-03-051-4/+4
| | | | | | | | | | | | | | | | | | | | Signed-off-by: Peter Krefting <peter@softwolves.pp.se>
| * | | | l10n: git.pot: v1.8.2 round 4 (1 changed)Jiang Xin2013-03-051-2/+2
| | |/ / | |/| | | | | | | | | | | | | | | | | | | | | | Generate po/git.pot from v1.8.2-rc2-4-g77995 for git v1.8.2 l10n round 4. Signed-off-by: Jiang Xin <worldhello.net@gmail.com>
* | | | Merge branch 'mp/complete-paths'Junio C Hamano2013-03-071-0/+9
|\ \ \ \ | | |_|/ | |/| | | | | | | | | | * mp/complete-paths: git-completion.zsh: define __gitcomp_file compatibility function
| * | | git-completion.zsh: define __gitcomp_file compatibility functionMatthieu Moy2013-03-051-0/+9
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Commit fea16b47b60 (Fri Jan 11 19:48:43 2013, Manlio Perillo, git-completion.bash: add support for path completion), introduced a new __gitcomp_file function that uses the bash builtin "compgen". The function was redefined for ZSH in the deprecated section of git-completion.bash, but not in the new git-completion.zsh script. As a result, users of git-completion.zsh trying to complete "git add fo<tab>" get an error: git add fo__gitcomp_file:8: command not found: compgen This patch adds the redefinition and removes the error. Signed-off-by: Matthieu Moy <Matthieu.Moy@imag.fr> Signed-off-by: Junio C Hamano <gitster@pobox.com>