summaryrefslogtreecommitdiff
Commit message (Collapse)AuthorAgeFilesLines
* Bump core.deltaBaseCacheLimit to 96mdk/raise-core-deltabasecachelimitDavid Kastrup2014-05-062-2/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The default of 16m causes serious thrashing for large delta chains combined with large files. Here are some benchmarks (pu variant of git blame): time git blame -C src/xdisp.c >/dev/null for a repository of Emacs repacked with git gc --aggressive (v1.9, resulting in a window size of 250) located on an SSD drive. The file in question has about 30000 lines, 1Mb of size, and a history with about 2500 commits. 16m (previous default): real 3m33.936s user 2m15.396s sys 1m17.352s 32m: real 3m1.319s user 2m8.660s sys 0m51.904s 64m: real 2m20.636s user 1m55.780s sys 0m23.964s 96m: real 2m5.668s user 1m50.784s sys 0m14.288s 128m: real 2m4.337s user 1m50.764s sys 0m12.832s 192m: real 2m3.567s user 1m49.508s sys 0m13.312s Signed-off-by: David Kastrup <dak@gnu.org> Acked-by: Jeff King <peff@peff.net> Signed-off-by: Junio C Hamano <gitster@pobox.com>
* Git 2.0-rc2v2.0.0-rc2Junio C Hamano2014-05-022-2/+7
|
* Merge branch 'mw/symlinks'Junio C Hamano2014-05-021-2/+2
|\ | | | | | | | | | | | | A finishing touch fix to a new change already in 'master'. * mw/symlinks: setup: fix windows path buffer over-stepping
| * setup: fix windows path buffer over-steppingmw/symlinksMartin Erik Werner2014-04-241-2/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Fix a buffer over-stepping issue triggered by providing an absolute path that is similar to the work tree path. abspath_part_inside_repo() may currently increment the path pointer by offset_1st_component() + wtlen, which is too much, since offset_1st_component() is a subset of wtlen. For the *nix-style prefix '/', this does (by luck) not cause any issues, since offset_1st_component() is 1 and there will always be a '/' or '\0' that can "absorb" this. In the case of DOS-style prefixes though, the offset_1st_component() is 3 and this can potentially over-step the string buffer. For example if work_tree = "c:/r" path = "c:/rl" Then wtlen is 4, and incrementing the path pointer by (3 + 4) would end up 2 bytes outside a string buffer of length 6. Similarly if work_tree = "c:/r" path = "c:/rl/d/a" Then (since the loop starts by also incrementing the pointer one step), this would mean that the function would miss checking if "c:/rl/d" could be the work_tree, arguably this is unlikely though, since it would only be possible with symlinks on windows. Fix this by simply avoiding to increment by offset_1st_component() and wtlen at the same time. Signed-off-by: Martin Erik Werner <martinerikwerner@gmail.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
* | Merge branch 'km/git-svn-workaround-older-getopt-long'Junio C Hamano2014-05-022-4/+7
|\ \ | | | | | | | | | | | | * km/git-svn-workaround-older-getopt-long: t9117: use --prefix "" instead of --prefix=""
| * | t9117: use --prefix "" instead of --prefix=""km/git-svn-workaround-older-getopt-longKyle J. McKay2014-04-232-4/+7
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Versions of Perl's Getopt::Long module before 2.37 do not contain this fix that first appeared in Getopt::Long version 2.37: * Bugfix: With gnu_compat, --foo= will no longer trigger "Option requires an argument" but return the empty string. Instead of using --prefix="" use --prefix "" when testing an explictly empty prefix string in order to work with older versions of Perl's Getopt::Long module. Also add a paragraph on this workaround to the documentation of git-svn itself. Signed-off-by: Kyle J. McKay <mackyle@gmail.com> Acked-by: Johan Herland <johan@herland.net> Signed-off-by: Junio C Hamano <gitster@pobox.com>
* | | Merge branch 'rh/prompt-pcmode-avoid-eval-on-refname'Junio C Hamano2014-05-022-24/+54
|\ \ \ | | | | | | | | | | | | | | | | * rh/prompt-pcmode-avoid-eval-on-refname: git-prompt.sh: don't put unsanitized branch names in $PS1
| * | | git-prompt.sh: don't put unsanitized branch names in $PS1Richard Hansen2014-04-222-24/+54
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Both bash and zsh subject the value of PS1 to parameter expansion, command substitution, and arithmetic expansion. Rather than include the raw, unescaped branch name in PS1 when running in two- or three-argument mode, construct PS1 to reference a variable that holds the branch name. Because the shells do not recursively expand, this avoids arbitrary code execution by specially-crafted branch names such as '$(IFS=_;cmd=sudo_rm_-rf_/;$cmd)'. Signed-off-by: Richard Hansen <rhansen@bbn.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
* | | | Merge branch 'mk/doc-git-gui-display-untracked'Junio C Hamano2014-05-021-0/+4
|\ \ \ \ | | | | | | | | | | | | | | | | | | | | * mk/doc-git-gui-display-untracked: Documentation: git-gui: describe gui.displayuntracked
| * | | | Documentation: git-gui: describe gui.displayuntrackedmk/doc-git-gui-display-untrackedMax Kirillov2014-04-211-0/+4
| | | | | | | | | | | | | | | | | | | | | | | | | Signed-off-by: Max Kirillov <max@max630.net> Signed-off-by: Junio C Hamano <gitster@pobox.com>
* | | | | Merge git://github.com/git-l10n/git-poJunio C Hamano2014-04-306-7963/+8342
|\ \ \ \ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * git://github.com/git-l10n/git-po: l10n: de.po: improve hint for autocorrected command execution l10n: de.po: translate 45 new messages l10n: de.po: correct translation of "completed" after resolving deltas l10n: zh_CN.po: translate 46 new messages (2229t0f0u) l10n: fr translation for v2.0.0rc0 (2228t) l10n: Update Swedish translation (2228t0f0u) l10n: vi.po (2228t): Update and minor fix l10n: git.pot: v2.0.0 round 1 (45 new, 28 removed)
| * | | | | l10n: de.po: improve hint for autocorrected command executionRalf Thielow2014-04-291-2/+2
| | | | | | | | | | | | | | | | | | | | | | | | Signed-off-by: Ralf Thielow <ralf.thielow@gmail.com>
| * | | | | l10n: de.po: translate 45 new messagesRalf Thielow2014-04-291-1340/+1425
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Translate 45 new messages came from git.pot update in 5e078fc (l10n: git.pot: v2.0.0 round 1 (45 new, 28 removed)). Signed-off-by: Ralf Thielow <ralf.thielow@gmail.com> Acked-by: Thomas Rast <tr@thomasrast.ch>
| * | | | | l10n: de.po: correct translation of "completed" after resolving deltasRalf Thielow2014-04-291-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | Signed-off-by: Ralf Thielow <ralf.thielow@gmail.com>
| * | | | | l10n: zh_CN.po: translate 46 new messages (2229t0f0u)Jiang Xin2014-04-231-1313/+1392
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Translations for git v2.0.0-rc0. Also correct translatioins on relative date in date.c with help from Brian Gesiak ($gmane/246390). Signed-off-by: Jiang Xin <worldhello.net@gmail.com>
| * | | | | Merge branch 'fr-po' of git://github.com/jnavila/gitJiang Xin2014-04-231-1340/+1409
| |\ \ \ \ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | * 'fr-po' of git://github.com/jnavila/git: l10n: fr translation for v2.0.0rc0 (2228t)
| | * | | | | l10n: fr translation for v2.0.0rc0 (2228t)Jean-Noel Avila2014-04-221-1340/+1409
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Signed-off-by: Jean-Noel Avila <jn.avila@free.fr> Signed-off-by: Matthieu Baerts <matttbe@gmail.com> Signed-off-by: Xavier Mehrenberger <xavier.mehrenberger@gmail.com>
| * | | | | | l10n: Update Swedish translation (2228t0f0u)Peter Krefting2014-04-221-1319/+1391
| | | | | | | | | | | | | | | | | | | | | | | | | | | | Signed-off-by: Peter Krefting <peter@softwolves.pp.se>
| * | | | | | l10n: vi.po (2228t): Update and minor fixTran Ngoc Quan2014-04-201-1385/+1458
| |/ / / / / | | | | | | | | | | | | | | | | | | Signed-off-by: Tran Ngoc Quan <vnwildman@gmail.com>
| * | | | | l10n: git.pot: v2.0.0 round 1 (45 new, 28 removed)Jiang Xin2014-04-191-1263/+1264
| |/ / / / | | | | | | | | | | | | | | | | | | | | | | | | | Generate po/git.pot from v2.0.0-rc0 for git v2.0.0 l10n round 1. Signed-off-by: Jiang Xin <worldhello.net@gmail.com>
* | | | | Revert the whole "ask curl-config" topic for nowJunio C Hamano2014-04-301-50/+14
| | | | | | | | | | | | | | | | | | | | | | | | | Postpone this a bit during the feature freeze and retry the effort in the next cycle.
* | | | | Merge branch 'db/make-with-curl'Junio C Hamano2014-04-281-13/+28
|\ \ \ \ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | It turns out that some platforms do ship without curl-config even though they build with the hardcoded default -lcurl and rely on it to work. * db/make-with-curl: Makefile: default to -lcurl when no CURL_CONFIG or CURLDIR
| * | | | | Makefile: default to -lcurl when no CURL_CONFIG or CURLDIRdb/make-with-curlDave Borowitz2014-04-281-13/+28
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The original implementation of CURL_CONFIG support did not match the original behavior of using -lcurl when CURLDIR was not set. This broke implementations that were lacking curl-config but did have libcurl installed along system libraries, such as MSysGit. In other words, the assumption that curl-config is always installed was incorrect. Instead, if CURL_CONFIG is empty or returns an empty result (e.g. due to curl-config being missing), use the old behavior of falling back to -lcurl. Signed-off-by: Dave Borowitz <dborowitz@google.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
* | | | | | Merge branch 'jk/external-diff-use-argv-array' (early part)Junio C Hamano2014-04-281-16/+16
|\ \ \ \ \ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Crash fix for codepath that miscounted the necessary size for an array when spawning an external diff program. * 'jk/external-diff-use-argv-array' (early part): run_external_diff: use an argv_array for the command line
| * | | | | | run_external_diff: use an argv_array for the command lineJeff King2014-04-211-16/+16
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | We currently generate the command-line for the external command using a fixed-length array of size 10. But if there is a rename, we actually need 11 elements (10 items, plus a NULL), and end up writing a random NULL onto the stack. Rather than bump the limit, let's just use an argv_array, which makes this sort of error impossible. Noticed-by: Max L <infthi.inbox@gmail.com> Signed-off-by: Jeff King <peff@peff.net> Signed-off-by: Junio C Hamano <gitster@pobox.com>
* | | | | | | Git 2.0-rc1v2.0.0-rc1Junio C Hamano2014-04-252-1/+6
| | | | | | | | | | | | | | | | | | | | | | | | | | | | Signed-off-by: Junio C Hamano <gitster@pobox.com>
* | | | | | | Merge branch 'jk/pack-bitmap'Junio C Hamano2014-04-241-1/+1
|\ \ \ \ \ \ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | A last minute (and hopefully the last) fix to avoid coredumps due to an incorrect pointer arithmetic. * jk/pack-bitmap: ewah_bitmap.c: do not assume size_t and eword_t are the same size
| * | | | | | | ewah_bitmap.c: do not assume size_t and eword_t are the same sizeKyle J. McKay2014-04-221-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | When buffer_grow changes the size of the buffer using realloc, it first computes and saves the rlw pointer's offset into the buffer using (uint8_t *) math before the realloc but then restores it using (eword_t *) math. In order to do this it's necessary to convert the (uint8_t *) offset into an (eword_t *) offset. It was doing this by dividing by the sizeof(size_t). Unfortunately sizeof(size_t) is not same as sizeof(eword_t) on all platforms. This causes illegal memory accesses and other bad things to happen when attempting to use bitmaps on those platforms. Fix this by dividing by the sizeof(eword_t) instead which will always be correct for all platforms. Signed-off-by: Kyle J. McKay <mackyle@gmail.com> Acked-by: Jeff King <peff@peff.net> Signed-off-by: Junio C Hamano <gitster@pobox.com>
* | | | | | | | Merge branch 'fc/transport-helper-sync-error-fix'Junio C Hamano2014-04-242-37/+67
|\ \ \ \ \ \ \ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Make sure the marks are not written out when the transport helper did not finish happily, to avoid leaving a marks file that is out of sync with the reality. * fc/transport-helper-sync-error-fix: t5801 (remote-helpers): cleanup environment sets transport-helper: fix sync issue on crashes transport-helper: trivial cleanup transport-helper: propagate recvline() error pushing remote-helpers: make recvline return an error transport-helper: remove barely used xchgline()
| * | | | | | | | t5801 (remote-helpers): cleanup environment setsfc/transport-helper-sync-error-fixFelipe Contreras2014-04-211-7/+4
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Commit 512477b (tests: use "env" to run commands with temporary env-var settings) missed some variables in the remote-helpers test. Also standardize these. Signed-off-by: Felipe Contreras <felipe.contreras@gmail.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
| * | | | | | | | transport-helper: fix sync issue on crashesFelipe Contreras2014-04-142-3/+30
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | When a remote helper crashes while pushing we should revert back to the state before the push, however, it's possible that `git fast-export` already finished its job, and therefore has exported the marks already. This creates a synchronization problem because from that moment on `git fast-{import,export}` will have marks that the remote helper is not aware of and all further commands fail (if those marks are referenced). The fix is to tell `git fast-export` to export to a temporary file, and only after the remote helper has finishes successfully, move to the final destination. Signed-off-by: Felipe Contreras <felipe.contreras@gmail.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
| * | | | | | | | transport-helper: trivial cleanupFelipe Contreras2014-04-141-12/+12
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | It's simpler to store the file names directly, and form the fast-export arguments only when needed, and re-use the same strbuf with a format. Signed-off-by: Felipe Contreras <felipe.contreras@gmail.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
| * | | | | | | | transport-helper: propagate recvline() error pushingFelipe Contreras2014-04-141-7/+11
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | It's cleaner, and will allow us to do something sensible on errors later. Signed-off-by: Felipe Contreras <felipe.contreras@gmail.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
| * | | | | | | | remote-helpers: make recvline return an errorFelipe Contreras2014-04-141-7/+14
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Instead of exiting directly, make it the duty of the caller to do so. Signed-off-by: Felipe Contreras <felipe.contreras@gmail.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
| * | | | | | | | transport-helper: remove barely used xchgline()Felipe Contreras2014-04-141-7/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | It's only used once, we can just call the two functions inside directly. Signed-off-by: Felipe Contreras <felipe.contreras@gmail.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
* | | | | | | | | Merge branch 'db/make-with-curl'Junio C Hamano2014-04-241-12/+33
|\ \ \ \ \ \ \ \ \ | | |_|_|/ / / / / | |/| | | | | / / | |_|_|_|_|_|/ / |/| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Ask curl-config how to link with the curl library, instead of having only a limited configurability knobs in the Makefile. * db/make-with-curl: Makefile: allow static linking against libcurl Makefile: use curl-config to determine curl flags
| * | | | | | | Makefile: allow static linking against libcurlDave Borowitz2014-04-151-3/+13
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This requires more flags than can be guessed with the old-style CURLDIR and related options, so is only supported when curl-config is present. Signed-off-by: Dave Borowitz <dborowitz@google.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
| * | | | | | | Makefile: use curl-config to determine curl flagsDave Borowitz2014-04-151-12/+23
| |/ / / / / / | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | curl-config should always be installed alongside a curl distribution, and its purpose is to provide flags for building against libcurl, so use it instead of guessing flags and dependent libraries. Allow overriding CURL_CONFIG to a custom path to curl-config, to compile against a curl installation other than the first in PATH. Depending on the set of features curl is compiled with, there may be more libraries required than the previous two options of -lssl and -lidn. For example, with a vanilla build of libcurl-7.36.0 on Mac OS X 10.9: $ ~/d/curl-out-7.36.0/lib/curl-config --libs -L/Users/dborowitz/d/curl-out-7.36.0/lib -lcurl -lgssapi_krb5 -lresolv -lldap -lz Use this only when CURLDIR is not explicitly specified, to continue supporting older builds. Signed-off-by: Dave Borowitz <dborowitz@google.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
* | | | | | | Update draft release notes to 2.0Junio C Hamano2014-04-211-3/+12
| | | | | | | | | | | | | | | | | | | | | | | | | | | | Signed-off-by: Junio C Hamano <gitster@pobox.com>
* | | | | | | Merge git://bogomips.org/git-svnJunio C Hamano2014-04-2120-153/+131
|\ \ \ \ \ \ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * git://bogomips.org/git-svn: Git 2.0: git svn: Set default --prefix='origin/' if --prefix is not given
| * | | | | | | Git 2.0: git svn: Set default --prefix='origin/' if --prefix is not givenJohan Herland2014-04-1920-153/+131
| | |_|_|/ / / | |/| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | git-svn by default puts its Subversion-tracking refs directly in refs/remotes/*. This runs counter to Git's convention of using refs/remotes/$remote/* for storing remote-tracking branches. Furthermore, combining git-svn with regular git remotes run the risk of clobbering refs under refs/remotes (e.g. if you have a git remote called "tags" with a "v1" branch, it will overlap with the git-svn's tracking branch for the "v1" tag from Subversion. Even though the git-svn refs stored in refs/remotes/* are not "proper" remote-tracking branches (since they are not covered by a proper git remote's refspec), they clearly represent a similar concept, and would benefit from following the same convention. For example, if git-svn tracks Subversion branch "foo" at refs/remotes/foo, and you create a local branch refs/heads/foo to add some commits to be pushed back to Subversion (using "git svn dcommit), then it is clearly unhelpful of Git to throw warning: refname 'foo' is ambiguous. every time you checkout, rebase, or otherwise interact with the branch. The existing workaround for this is to supply the --prefix=quux/ to git svn init/clone, so that git-svn's tracking branches end up in refs/remotes/quux/* instead of refs/remotes/*. However, encouraging users to specify --prefix to work around a design flaw in git-svn is suboptimal, and not a long term solution to the problem. Instead, git-svn should default to use a non-empty prefix that saves unsuspecting users from the inconveniences described above. This patch will only affect newly created git-svn setups, as the --prefix option only applies to git svn init (and git svn clone). Existing git-svn setups will continue with their existing (lack of) prefix. Also, if anyone somehow prefers git-svn's old layout, they can recreate that by explicitly passing an empty prefix (--prefix "") on the git svn init/clone command line. The patch changes the default value for --prefix from "" to "origin/", updates the git-svn manual page, and fixes the fallout in the git-svn testcases. (Note that this patch might be easier to review using the --word-diff and --word-diff-regex=. diff options.) [ew: squashed description of <= 1.9 behavior into manpage] Suggested-by: Thomas Ferris Nicolaisen <tfnico@gmail.com> Signed-off-by: Johan Herland <johan@herland.net> Signed-off-by: Eric Wong <normalperson@yhbt.net>
* | | | | | | Merge branch 'jx/i18n'Junio C Hamano2014-04-215-15/+15
|\ \ \ \ \ \ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * jx/i18n: i18n: mention "TRANSLATORS:" marker in Documentation/CodingGuidelines i18n: only extract comments marked with "TRANSLATORS:" i18n: remove obsolete comments for translators in diffstat generation i18n: fix uncatchable comments for translators in date.c
| * | | | | | | i18n: mention "TRANSLATORS:" marker in Documentation/CodingGuidelinesjx/i18nJunio C Hamano2014-04-181-0/+10
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | These comments have to have "TRANSLATORS: " at the very beginning and have to deviate from the usual multi-line comment formatting convention. Signed-off-by: Junio C Hamano <gitster@pobox.com>
| * | | | | | | i18n: only extract comments marked with "TRANSLATORS:"Jiang Xin2014-04-172-6/+4
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | When extract l10n messages, we use "--add-comments" option to keep comments right above the l10n messages for references. But sometimes irrelevant comments are also extracted. For example in the following code block, the comment in line 2 will be extracted as comment for the l10n message in line 3, but obviously it's wrong. { OPTION_CALLBACK, 0, "ignore-removal", &addremove_explicit, NULL /* takes no arguments */, N_("ignore paths removed in the working tree (same as --no-all)"), PARSE_OPT_NOARG, ignore_removal_cb }, Since almost all comments for l10n translators are marked with the same prefix (tag): "TRANSLATORS:", it's safe to only extract comments with this special tag. I.E. it's better to call xgettext as: xgettext --add-comments=TRANSLATORS: ... Also tweaks the multi-line comment in "init-db.c", to make it start with the proper tag, not "* TRANSLATORS:" (which has a star before the tag). Signed-off-by: Jiang Xin <worldhello.net@gmail.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
| * | | | | | | i18n: remove obsolete comments for translators in diffstat generationJiang Xin2014-04-171-8/+0
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Since we do not translate diffstat any more, remove the obsolete comments. Signed-off-by: Jiang Xin <worldhello.net@gmail.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
| * | | | | | | i18n: fix uncatchable comments for translators in date.cJiang Xin2014-04-171-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Comment for l10n translators can not be extracted by xgettext if it is not right above the l10n tag. Moving the comment right before the l10n tag will fix this issue. Reported-by: Brian Gesiak <modocache@gmail.com> Signed-off-by: Jiang Xin <worldhello.net@gmail.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
* | | | | | | | Merge branch 'km/avoid-non-function-return-in-rebase'Junio C Hamano2014-04-214-10/+46
|\ \ \ \ \ \ \ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Work around /bin/sh that does not like "return" at the top-level of a file that is dot-sourced from inside a function definition. * km/avoid-non-function-return-in-rebase: Revert "rebase: fix run_specific_rebase's use of "return" on FreeBSD" rebase: avoid non-function use of "return" on FreeBSD
| * | | | | | | | Revert "rebase: fix run_specific_rebase's use of "return" on FreeBSD"km/avoid-non-function-return-in-rebaseKyle J. McKay2014-04-171-10/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This reverts commit 99855ddf4bd319cd06a0524e755ab1c1b7d39f3b. The workaround 99855ddf introduced to deal with problematic "return" statements in scripts run by "dot" commands located inside functions only handles one part of the problem. The issue has now been addressed by not using "return" statements in this way in the git-rebase--*.sh scripts. This workaround is therefore no longer necessary, so clean up the code by reverting it. Signed-off-by: Kyle J. McKay <mackyle@gmail.com> Acked-by: Matthieu Moy <Matthieu.Moy@imag.fr> Signed-off-by: Junio C Hamano <gitster@pobox.com>
| * | | | | | | | rebase: avoid non-function use of "return" on FreeBSDKyle J. McKay2014-04-173-0/+45
| | |_|_|_|/ / / | |/| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Since a1549e10, 15d4bf2e and 01a1e646 (first appearing in v1.8.4) the git-rebase--*.sh scripts have used a "return" to stop execution of the dot-sourced file and return to the "dot" command that dot-sourced it. The /bin/sh utility on FreeBSD however behaves poorly under some circumstances when such a "return" is executed. In particular, if the "dot" command is contained within a function, then when a "return" is executed by the script it runs (that is not itself inside a function), control will return from the function that contains the "dot" command skipping any statements that might follow the dot command inside that function. Commit 99855ddf (first appearing in v1.8.4.1) addresses this by making the "dot" command the last line in the function. Unfortunately the FreeBSD /bin/sh may also execute some statements in the script run by the "dot" command that appear after the troublesome "return". The fix in 99855ddf does not address this problem. For example, if you have script1.sh with these contents: run_script2() { . "$(dirname -- "$0")/script2.sh" _e=$? echo only this line should show [ $_e -eq 5 ] || echo expected status 5 got $_e return 3 } run_script2 e=$? [ $e -eq 3 ] || { echo expected status 3 got $e; exit 1; } And script2.sh with these contents: if [ 5 -gt 3 ]; then return 5 fi case bad in *) echo always shows esac echo should not get here ! : When running script1.sh (e.g. '/bin/sh script1.sh' or './script1.sh' after making it executable), the expected output from a POSIX shell is simply the single line: only this line should show However, when run using FreeBSD's /bin/sh, the following output appears instead: should not get here expected status 3 got 1 Not only did the lines following the "dot" command in the run_script2 function in script1.sh get skipped, but additional lines in script2.sh following the "return" got executed -- but not all of them (e.g. the "echo always shows" line did not run). These issues can be avoided by not using a top-level "return" in script2.sh. If script2.sh is changed to this: main() { if [ 5 -gt 3 ]; then return 5 fi case bad in *) echo always shows esac echo should not get here ! : } main Then it behaves the same when using FreeBSD's /bin/sh as when using other more POSIX compliant /bin/sh implementations. We fix the git-rebase--*.sh scripts in a similar fashion by moving the top-level code that contains "return" statements into its own function and then calling that as the last line in the script. Signed-off-by: Kyle J. McKay <mackyle@gmail.com> Acked-by: Matthieu Moy <Matthieu.Moy@imag.fr> Signed-off-by: Junio C Hamano <gitster@pobox.com>
* | | | | | | | Merge branch 'ep/shell-command-substitution'Junio C Hamano2014-04-2114-48/+48
|\ \ \ \ \ \ \ \ | |_|_|/ / / / / |/| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * ep/shell-command-substitution: t9362-mw-to-git-utf8.sh: use the $( ... ) construct for command substitution t9360-mw-to-git-clone.sh: use the $( ... ) construct for command substitution git-tag.sh: use the $( ... ) construct for command substitution git-revert.sh: use the $( ... ) construct for command substitution git-resolve.sh: use the $( ... ) construct for command substitution git-repack.sh: use the $( ... ) construct for command substitution git-merge.sh: use the $( ... ) construct for command substitution git-ls-remote.sh: use the $( ... ) construct for command substitution git-fetch.sh: use the $( ... ) construct for command substitution git-commit.sh: use the $( ... ) construct for command substitution git-clone.sh: use the $( ... ) construct for command substitution git-checkout.sh: use the $( ... ) construct for command substitution install-webdoc.sh: use the $( ... ) construct for command substitution howto-index.sh: use the $( ... ) construct for command substitution