aboutsummaryrefslogtreecommitdiffstats
AgeCommit message (Collapse)AuthorFilesLines
2014-05-19git-ack: record an ackHEADmasterMichael S. Tsirkin1-0/+84
This is a simple script that I use by piping incoming mail with an ack to it. It produces an empty ack commit suitable for squshing with git rebase -i -autosquash. Works best if people ack individual commits: you simply pipe each ack to git ack, before pushing your branch, rebase. Some people ack series by responding to cover letter or to commit 1. To address this usecase, there are two additional flags: -s saves the ack signature in a file (you can save several in a row), -r creates an ack for a given patch using the saved signature. Thus: pipe ack(s) to git ack -s, then select and pipe each individual patch to git ack -r. If it's found useful, this script can either become a first-class command (with documentation and tests) or be integrated as a flag into git am. Limitations: requires that index is clean, this is so we can create an empty commit recording the ack. Signed-off-by: Michael S. Tsirkin <mst@redhat.com>
2014-05-18rebase: test ackMichael S. Tsirkin1-0/+15
test ack! handling Signed-off-by: Michael S. Tsirkin <mst@redhat.com>
2014-05-18git-rebase: document ackMichael S. Tsirkin1-5/+40
document ack! behaviour and use Signed-off-by: Michael S. Tsirkin <mst@redhat.com>
2014-05-18rebase -i: add ack actionMichael S. Tsirkin1-7/+27
This implements a new ack! action for git rebase -i It is essentially a middle ground between fixup! and squash!: - commits are squashed silently without editor being started - commit logs are concatenated (with action line being discarded) - because of the above, empty commits aren't discarded, their log is also included. I am using it as follows: git am -s < mailbox #creates first commit hack ... get mail with Ack git commit --allow-empty -m `cat <<-EOF ack! first Acked-by: maintainer EOF` repeat cycle git rebase --autosquash -i origin/master before public branch push The "cat" command above is actually a script that parses the Ack mail to create the empty commit - to be submitted separately. Signed-off-by: Michael S. Tsirkin <mst@redhat.com>
2014-05-18git-am: cleanup option for new flagMichael S. Tsirkin1-3/+1
2014-05-18git-am: fix up new -sMichael S. Tsirkin1-2/+5
2014-05-18rebase --keep-empty -i: add testMichael S. Tsirkin1-0/+9
There's some special code in rebase -i to deal with --keep-empty. Add test for this combination. Signed-off-by: Michael S. Tsirkin <mst@redhat.com>
2014-05-18t4204-patch-id.sh: default is now stableMichael S. Tsirkin1-2/+2
update test to match behaviour change Signed-off-by: Michael S. Tsirkin <mst@redhat.com>
2014-05-18patch-id: change default to stableMichael S. Tsirkin2-4/+4
--stable has been the default in 'next' for a few weeks with no ill effects. Change the default to that so that users don't have to remember to enable it. Update documentation to match behaviour change. Signed-off-by: Michael S. Tsirkin <mst@redhat.com>
2014-05-18patch-id-test: test stable and unstable behaviourMichael S. Tsirkin1-11/+91
Verify that patch ID supports an algorithm that is stable against diff split and reordering. Signed-off-by: Michael S. Tsirkin <mst@redhat.com>
2014-05-18test: add test_write_lines helperMichael S. Tsirkin2-0/+27
API and implementation as suggested by Junio. Signed-off-by: Michael S. Tsirkin <mst@redhat.com>
2014-05-18patch-id: make it stable against hunk reorderingMichael S. Tsirkin2-20/+91
Patch id changes if users reorder file diffs that make up a patch. As the result is functionally equivalent, a different patch id is surprising to many users. In particular, reordering files using diff -O is helpful to make patches more readable (e.g. API header diff before implementation diff). Add an option to change patch-id behaviour making it stable against these kinds of patch change: calculate SHA1 hash for each hunk separately and sum all hashes (using a symmetrical sum) to get patch id We use a 20byte sum and not xor - since xor would give 0 output for patches that have two identical diffs, which isn't all that unlikely (e.g. append the same line in two places). The new behaviour is enabled - when patchid.stable is true - when --stable flag is present Using a new flag --unstable or setting patchid.stable to false force the historical behaviour. In the documentation, clarify that patch ID can now be a sum of hashes, not a hash. Document how command line and config options affect the behaviour. Signed-off-by: Michael S. Tsirkin <mst@redhat.com>
2014-05-18test/send-email: to-cover, cc-cover testsMichael S. Tsirkin1-0/+45
Add tests for the new feature. Signed-off-by: Michael S. Tsirkin <mst@redhat.com>
2014-05-18git-send-email: two new options: to-cover, cc-coverMichael S. Tsirkin2-0/+28
Allow extracting To/Cc addresses from the first patch (typically the cover letter), and use them as To/Cc addresses of the remainder of the series. Signed-off-by: Michael S. Tsirkin <mst@redhat.com>
2014-05-18git-am: fix signoffMichael S. Tsirkin1-1/+5
2014-05-18git-am use branch style names for signoffMichael S. Tsirkin1-1/+1
nicer than dash
2014-05-18gita-am: replace --ack --signoff flagMichael S. Tsirkin1-26/+17
Signed-off-by: Michael S. Tsirkin <mst@redhat.com>
2014-05-18git-am: new option to allow empty commitsMichael S. Tsirkin1-3/+8
Good for adding comments to existing ones. Signed-off-by: Michael S. Tsirkin <mst@redhat.com>
2014-05-18git-am: support any number of signaturesMichael S. Tsirkin1-3/+20
Add new flag -a which can add any signature, and any number of them. Signed-off-by: Michael S. Tsirkin <mst@redhat.com>
2014-05-18fixup! git send-email: include [anything]-by: signaturesMichael S. Tsirkin1-1/+1
2014-05-18git send-email: include [anything]-by: signaturesMichael S. Tsirkin1-1/+1
Consider [anything]-by: a signature. This includes Tested-by: Acked-by: Reviewed-by: etc. Signed-off-by: Michael S. Tsirkin <mst@redhat.com>
2014-05-02Git 2.0-rc2Junio C Hamano2-2/+7
2014-05-02Merge branch 'mw/symlinks'Junio C Hamano1-2/+2
A finishing touch fix to a new change already in 'master'. * mw/symlinks: setup: fix windows path buffer over-stepping
2014-05-02Merge branch 'km/git-svn-workaround-older-getopt-long'Junio C Hamano2-4/+7
* km/git-svn-workaround-older-getopt-long: t9117: use --prefix "" instead of --prefix=""
2014-05-02Merge branch 'rh/prompt-pcmode-avoid-eval-on-refname'Junio C Hamano2-24/+54
* rh/prompt-pcmode-avoid-eval-on-refname: git-prompt.sh: don't put unsanitized branch names in $PS1
2014-05-02Merge branch 'mk/doc-git-gui-display-untracked'Junio C Hamano1-0/+4
* mk/doc-git-gui-display-untracked: Documentation: git-gui: describe gui.displayuntracked
2014-04-30Merge git://github.com/git-l10n/git-poJunio C Hamano6-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)
2014-04-30Revert the whole "ask curl-config" topic for nowJunio C Hamano1-50/+14
Postpone this a bit during the feature freeze and retry the effort in the next cycle.
2014-04-29l10n: de.po: improve hint for autocorrected command executionRalf Thielow1-2/+2
Signed-off-by: Ralf Thielow <ralf.thielow@gmail.com>
2014-04-29l10n: de.po: translate 45 new messagesRalf Thielow1-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>
2014-04-29l10n: de.po: correct translation of "completed" after resolving deltasRalf Thielow1-1/+1
Signed-off-by: Ralf Thielow <ralf.thielow@gmail.com>
2014-04-28Merge branch 'db/make-with-curl'Junio C Hamano1-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
2014-04-28Merge branch 'jk/external-diff-use-argv-array' (early part)Junio C Hamano1-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
2014-04-28Makefile: default to -lcurl when no CURL_CONFIG or CURLDIRDave Borowitz1-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>
2014-04-25Git 2.0-rc1Junio C Hamano2-1/+6
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2014-04-24setup: fix windows path buffer over-steppingMartin Erik Werner1-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>
2014-04-24Merge branch 'jk/pack-bitmap'Junio C Hamano1-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
2014-04-24Merge branch 'fc/transport-helper-sync-error-fix'Junio C Hamano2-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()
2014-04-24Merge branch 'db/make-with-curl'Junio C Hamano1-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
2014-04-23t9117: use --prefix "" instead of --prefix=""Kyle J. McKay2-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>
2014-04-23l10n: zh_CN.po: translate 46 new messages (2229t0f0u)Jiang Xin1-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>
2014-04-23Merge branch 'fr-po' of git://github.com/jnavila/gitJiang Xin1-1340/+1409
* 'fr-po' of git://github.com/jnavila/git: l10n: fr translation for v2.0.0rc0 (2228t)
2014-04-22ewah_bitmap.c: do not assume size_t and eword_t are the same sizeKyle J. McKay1-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>
2014-04-22l10n: fr translation for v2.0.0rc0 (2228t)Jean-Noel Avila1-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>
2014-04-22git-prompt.sh: don't put unsanitized branch names in $PS1Richard Hansen2-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>
2014-04-22l10n: Update Swedish translation (2228t0f0u)Peter Krefting1-1319/+1391
Signed-off-by: Peter Krefting <peter@softwolves.pp.se>
2014-04-21Update draft release notes to 2.0Junio C Hamano1-3/+12
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2014-04-21Merge git://bogomips.org/git-svnJunio C Hamano20-153/+131
* git://bogomips.org/git-svn: Git 2.0: git svn: Set default --prefix='origin/' if --prefix is not given
2014-04-21Merge branch 'jx/i18n'Junio C Hamano5-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
2014-04-21Merge branch 'km/avoid-non-function-return-in-rebase'Junio C Hamano4-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
2014-04-21Merge branch 'ep/shell-command-substitution'Junio C Hamano14-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
2014-04-21t5801 (remote-helpers): cleanup environment setsFelipe Contreras1-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>
2014-04-21Documentation: git-gui: describe gui.displayuntrackedMax Kirillov1-0/+4
Signed-off-by: Max Kirillov <max@max630.net> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2014-04-21run_external_diff: use an argv_array for the command lineJeff King1-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>
2014-04-20l10n: vi.po (2228t): Update and minor fixTran Ngoc Quan1-1385/+1458
Signed-off-by: Tran Ngoc Quan <vnwildman@gmail.com>
2014-04-19Git 2.0: git svn: Set default --prefix='origin/' if --prefix is not givenJohan Herland20-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>
2014-04-19l10n: git.pot: v2.0.0 round 1 (45 new, 28 removed)Jiang Xin1-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>
2014-04-18Git 2.0-rc0Junio C Hamano2-1/+6
An early-preview for the upcoming Git 2.0. Signed-off-by: Junio C Hamano <gitster@pobox.com>
2014-04-18Merge branch 'jk/config-die-bad-number-noreturn'Junio C Hamano1-0/+1
Squelch a false compiler warning from older gcc. * jk/config-die-bad-number-noreturn: config.c: mark die_bad_number as NORETURN
2014-04-18Merge branch 'fc/remote-helper-fixes'Junio C Hamano5-5/+34
* fc/remote-helper-fixes: remote-bzr: trivial test fix remote-bzr: include authors field in pushed commits remote-bzr: add support for older versions remote-hg: always normalize paths remote-helpers: allow all tests running from any dir
2014-04-18Merge branch 'fc/complete-aliased-push'Junio C Hamano2-0/+2
* fc/complete-aliased-push: completion: fix completing args of aliased "push", "fetch", etc.
2014-04-18Merge branch 'fc/prompt-zsh-read-from-file'Junio C Hamano1-7/+14
* fc/prompt-zsh-read-from-file: prompt: fix missing file errors in zsh
2014-04-18i18n: mention "TRANSLATORS:" marker in Documentation/CodingGuidelinesJunio C Hamano1-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>
2014-04-17t9362-mw-to-git-utf8.sh: use the $( ... ) construct for command substitutionElia Pinto1-2/+2
The Git CodingGuidelines prefer the $(...) construct for command substitution instead of using the backquotes `...`. The backquoted form is the traditional method for command substitution, and is supported by POSIX. However, all but the simplest uses become complicated quickly. In particular, embedded command substitutions and/or the use of double quotes require careful escaping with the backslash character. The patch was generated by: for _f in $(find . -name "*.sh") do sed -i 's@`\(.*\)`@$(\1)@g' ${_f} done and then carefully proof-read. Signed-off-by: Elia Pinto <gitter.spiros@gmail.com> Reviewed-by: Matthieu Moy <Matthieu.Moy@imag.fr> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2014-04-17t9360-mw-to-git-clone.sh: use the $( ... ) construct for command substitutionElia Pinto1-7/+7
The Git CodingGuidelines prefer the $(...) construct for command substitution instead of using the backquotes `...`. The backquoted form is the traditional method for command substitution, and is supported by POSIX. However, all but the simplest uses become complicated quickly. In particular, embedded command substitutions and/or the use of double quotes require careful escaping with the backslash character. The patch was generated by: for _f in $(find . -name "*.sh") do sed -i 's@`\(.*\)`@$(\1)@g' ${_f} done and then carefully proof-read. Signed-off-by: Elia Pinto <gitter.spiros@gmail.com> Reviewed-by: Matthieu Moy <Matthieu.Moy@imag.fr> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2014-04-17git-tag.sh: use the $( ... ) construct for command substitutionElia Pinto1-1/+1
The Git CodingGuidelines prefer the $(...) construct for command substitution instead of using the backquotes `...`. The backquoted form is the traditional method for command substitution, and is supported by POSIX. However, all but the simplest uses become complicated quickly. In particular, embedded command substitutions and/or the use of double quotes require careful escaping with the backslash character. The patch was generated by: for _f in $(find . -name "*.sh") do sed -i 's@`\(.*\)`@$(\1)@g' ${_f} done and then carefully proof-read. Signed-off-by: Elia Pinto <gitter.spiros@gmail.com> Reviewed-by: Matthieu Moy <Matthieu.Moy@imag.fr> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2014-04-17git-revert.sh: use the $( ... ) construct for command substitutionElia Pinto1-1/+1
The Git CodingGuidelines prefer the $(...) construct for command substitution instead of using the backquotes `...`. The backquoted form is the traditional method for command substitution, and is supported by POSIX. However, all but the simplest uses become complicated quickly. In particular, embedded command substitutions and/or the use of double quotes require careful escaping with the backslash character. The patch was generated by: for _f in $(find . -name "*.sh") do sed -i 's@`\(.*\)`@$(\1)@g' ${_f} done and then carefully proof-read. Signed-off-by: Elia Pinto <gitter.spiros@gmail.com> Reviewed-by: Matthieu Moy <Matthieu.Moy@imag.fr> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2014-04-17git-resolve.sh: use the $( ... ) construct for command substitutionElia Pinto1-1/+1
The Git CodingGuidelines prefer the $(...) construct for command substitution instead of using the backquotes `...`. The backquoted form is the traditional method for command substitution, and is supported by POSIX. However, all but the simplest uses become complicated quickly. In particular, embedded command substitutions and/or the use of double quotes require careful escaping with the backslash character. The patch was generated by: for _f in $(find . -name "*.sh") do sed -i 's@`\(.*\)`@$(\1)@g' ${_f} done and then carefully proof-read. Signed-off-by: Elia Pinto <gitter.spiros@gmail.com> Reviewed-by: Matthieu Moy <Matthieu.Moy@imag.fr> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2014-04-17git-repack.sh: use the $( ... ) construct for command substitutionElia Pinto1-1/+1
The Git CodingGuidelines prefer the $(...) construct for command substitution instead of using the backquotes `...`. The backquoted form is the traditional method for command substitution, and is supported by POSIX. However, all but the simplest uses become complicated quickly. In particular, embedded command substitutions and/or the use of double quotes require careful escaping with the backslash character. The patch was generated by: for _f in $(find . -name "*.sh") do sed -i 's@`\(.*\)`@$(\1)@g' ${_f} done and then carefully proof-read. Signed-off-by: Elia Pinto <gitter.spiros@gmail.com> Reviewed-by: Matthieu Moy <Matthieu.Moy@imag.fr> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2014-04-17git-merge.sh: use the $( ... ) construct for command substitutionElia Pinto1-2/+2
The Git CodingGuidelines prefer the $(...) construct for command substitution instead of using the backquotes `...`. The backquoted form is the traditional method for command substitution, and is supported by POSIX. However, all but the simplest uses become complicated quickly. In particular, embedded command substitutions and/or the use of double quotes require careful escaping with the backslash character. The patch was generated by: for _f in $(find . -name "*.sh") do sed -i 's@`\(.*\)`@$(\1)@g' ${_f} done and then carefully proof-read. Signed-off-by: Elia Pinto <gitter.spiros@gmail.com> Reviewed-by: Matthieu Moy <Matthieu.Moy@imag.fr> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2014-04-17git-ls-remote.sh: use the $( ... ) construct for command substitutionElia Pinto1-2/+2
The Git CodingGuidelines prefer the $(...) construct for command substitution instead of using the backquotes `...`. The backquoted form is the traditional method for command substitution, and is supported by POSIX. However, all but the simplest uses become complicated quickly. In particular, embedded command substitutions and/or the use of double quotes require careful escaping with the backslash character. The patch was generated by: for _f in $(find . -name "*.sh") do sed -i 's@`\(.*\)`@$(\1)@g' ${_f} done and then carefully proof-read. Signed-off-by: Elia Pinto <gitter.spiros@gmail.com> Reviewed-by: Matthieu Moy <Matthieu.Moy@imag.fr> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2014-04-17git-fetch.sh: use the $( ... ) construct for command substitutionElia Pinto1-3/+3
The Git CodingGuidelines prefer the $(...) construct for command substitution instead of using the backquotes `...`. The backquoted form is the traditional method for command substitution, and is supported by POSIX. However, all but the simplest uses become complicated quickly. In particular, embedded command substitutions and/or the use of double quotes require careful escaping with the backslash character. The patch was generated by: for _f in $(find . -name "*.sh") do sed -i 's@`\(.*\)`@$(\1)@g' ${_f} done and then carefully proof-read. Signed-off-by: Elia Pinto <gitter.spiros@gmail.com> Reviewed-by: Matthieu Moy <Matthieu.Moy@imag.fr> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2014-04-17git-commit.sh: use the $( ... ) construct for command substitutionElia Pinto1-5/+5
The Git CodingGuidelines prefer the $(...) construct for command substitution instead of using the backquotes `...`. The backquoted form is the traditional method for command substitution, and is supported by POSIX. However, all but the simplest uses become complicated quickly. In particular, embedded command substitutions and/or the use of double quotes require careful escaping with the backslash character. The patch was generated by: for _f in $(find . -name "*.sh") do sed -i 's@`\(.*\)`@$(\1)@g' ${_f} done and then carefully proof-read. Signed-off-by: Elia Pinto <gitter.spiros@gmail.com> Reviewed-by: Matthieu Moy <Matthieu.Moy@imag.fr> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2014-04-17git-clone.sh: use the $( ... ) construct for command substitutionElia Pinto1-10/+10
The Git CodingGuidelines prefer the $(...) construct for command substitution instead of using the backquotes `...`. The backquoted form is the traditional method for command substitution, and is supported by POSIX. However, all but the simplest uses become complicated quickly. In particular, embedded command substitutions and/or the use of double quotes require careful escaping with the backslash character. The patch was generated by: for _f in $(find . -name "*.sh") do sed -i 's@`\(.*\)`@$(\1)@g' ${_f} done and then carefully proof-read. Signed-off-by: Elia Pinto <gitter.spiros@gmail.com> Reviewed-by: Matthieu Moy <Matthieu.Moy@imag.fr> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2014-04-17git-checkout.sh: use the $( ... ) construct for command substitutionElia Pinto1-4/+4
The Git CodingGuidelines prefer the $(...) construct for command substitution instead of using the backquotes `...`. The backquoted form is the traditional method for command substitution, and is supported by POSIX. However, all but the simplest uses become complicated quickly. In particular, embedded command substitutions and/or the use of double quotes require careful escaping with the backslash character. The patch was generated by: for _f in $(find . -name "*.sh") do sed -i 's@`\(.*\)`@$(\1)@g' ${_f} done and then carefully proof-read. Signed-off-by: Elia Pinto <gitter.spiros@gmail.com> Reviewed-by: Matthieu Moy <Matthieu.Moy@imag.fr> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2014-04-17install-webdoc.sh: use the $( ... ) construct for command substitutionElia Pinto1-3/+3
The Git CodingGuidelines prefer the $(...) construct for command substitution instead of using the backquotes `...`. The backquoted form is the traditional method for command substitution, and is supported by POSIX. However, all but the simplest uses become complicated quickly. In particular, embedded command substitutions and/or the use of double quotes require careful escaping with the backslash character. The patch was generated by: for _f in $(find . -name "*.sh") do sed -i 's@`\(.*\)`@$(\1)@g' ${_f} done and then carefully proof-read. Signed-off-by: Elia Pinto <gitter.spiros@gmail.com> Reviewed-by: Matthieu Moy <Matthieu.Moy@imag.fr> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2014-04-17howto-index.sh: use the $( ... ) construct for command substitutionElia Pinto1-6/+6
The Git CodingGuidelines prefer the $(...) construct for command substitution instead of using the backquotes `...`. The backquoted form is the traditional method for command substitution, and is supported by POSIX. However, all but the simplest uses become complicated quickly. In particular, embedded command substitutions and/or the use of double quotes require careful escaping with the backslash character. The patch was generated by: for _f in $(find . -name "*.sh") do sed -i 's@`\(.*\)`@$(\1)@g' ${_f} done and then carefully proof-read. Signed-off-by: Elia Pinto <gitter.spiros@gmail.com> Reviewed-by: Matthieu Moy <Matthieu.Moy@imag.fr> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2014-04-17i18n: only extract comments marked with "TRANSLATORS:"Jiang Xin2-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>
2014-04-17i18n: remove obsolete comments for translators in diffstat generationJiang Xin1-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>
2014-04-17i18n: fix uncatchable comments for translators in date.cJiang Xin1-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>
2014-04-17Revert "rebase: fix run_specific_rebase's use of "return" on FreeBSD"Kyle J. McKay1-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>
2014-04-17rebase: avoid non-function use of "return" on FreeBSDKyle J. McKay3-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>
2014-04-16Update draft release notes for 2.0Junio C Hamano1-0/+11
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2014-04-16Merge branch 'mh/multimail'Junio C Hamano5-56/+249
* mh/multimail: git-multimail: update to version 1.0.0
2014-04-16Merge branch 'tb/unicode-6.3-zero-width'Junio C Hamano1-5/+4
Teach our display-column-counting logic about decomposed umlauts and friends. * tb/unicode-6.3-zero-width: utf8.c: partially update to version 6.3
2014-04-16Merge branch 'km/avoid-cp-a'Junio C Hamano1-2/+2
Portability fix. * km/avoid-cp-a: test: fix t7001 cp to use POSIX options
2014-04-16Merge branch 'km/avoid-bs-in-shell-glob'Junio C Hamano1-2/+2
Portability fix. * km/avoid-bs-in-shell-glob: test: fix t5560 on FreeBSD
2014-04-16config.c: mark die_bad_number as NORETURNJeff King1-0/+1
This can help avoid -Wuninitialized false positives in git_config_int and git_config_ulong, as the compiler now knows that we do not return "ret" if we hit the error codepath. Signed-off-by: Jeff King <peff@peff.net> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2014-04-15Makefile: allow static linking against libcurlDave Borowitz1-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>
2014-04-15Makefile: use curl-config to determine curl flagsDave Borowitz1-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>
2014-04-14transport-helper: fix sync issue on crashesFelipe Contreras2-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>
2014-04-14transport-helper: trivial cleanupFelipe Contreras1-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>
2014-04-14transport-helper: propagate recvline() error pushingFelipe Contreras1-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>
2014-04-14remote-helpers: make recvline return an errorFelipe Contreras1-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>
2014-04-14transport-helper: remove barely used xchgline()Felipe Contreras1-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>
2014-04-14prompt: fix missing file errors in zshFelipe Contreras1-7/+14
zsh seems to have a bug while redirecting the stderr of the 'read' command: % read foo 2>/dev/null <foo zsh: no such file or directory: foo Which causes errors to be displayed when certain files are missing. Let's add a convenience function to manually check if the file is readable before calling "read". Signed-off-by: Felipe Contreras <felipe.contreras@gmail.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2014-04-14remote-bzr: trivial test fixFelipe Contreras1-1/+1
So that the committer is reset properly. Signed-off-by: Felipe Contreras <felipe.contreras@gmail.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2014-04-11test: fix t5560 on FreeBSDKyle J. McKay1-2/+2
Since fd0a8c2e (first appearing in v1.7.0), the t/t5560-http-backend-noserver.sh test has used a backslash escape inside a ${} expansion in order to specify a literal '?' character. Unfortunately the FreeBSD /bin/sh does not interpret this correctly. In a POSIX compliant shell, the following: x='one?two?three' echo "${x#*\?}" Would be expected to produce this: two?three When using the FreeBSD /bin/sh instead you get this: one?two?three In fact the FreeBSD /bin/sh treats the backslash as a literal character to match so that this: y='one\two\three' echo "${y#*\?}" Produces this unexpected value: wo\three In this case the backslash is not only treated literally, it also fails to defeat the special meaning of the '?' character. Instead, we can use the [...] construct to defeat the special meaning of the '?' character and match it exactly in a way that works for the FreeBSD /bin/sh as well as other POSIX /bin/sh implementations. Changing the example like so: x='one?two?three' echo "${x#*[?]}" Produces the expected output using the FreeBSD /bin/sh. Therefore, change the use of \? to [?] in order to be compatible with the FreeBSD /bin/sh which allows t/t5560-http-backend-noserver.sh to pass on FreeBSD again. Signed-off-by: Kyle J. McKay <mackyle@gmail.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2014-04-11test: fix t7001 cp to use POSIX optionsKyle J. McKay1-2/+2
Since 11502468 and 04c1ee57 (both first appearing in v1.8.5), the t7001-mv test has used "cp -a" to perform a copy in several of the tests. However, the "-a" option is not required for a POSIX cp utility and some platforms' cp utilities do not support it. The POSIX equivalent of -a is -R -P -p. Change "cp -a" to "cp -R -P -p" so that the t7001-mv test works on systems with a cp utility that only implements the POSIX required set of options and not the "-a" option. Signed-off-by: Kyle J. McKay <mackyle@gmail.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2014-04-09completion: fix completing args of aliased "push", "fetch", etc.Felipe Contreras2-0/+2
Some commands need the first word to determine the actual action that is being executed, however, the command is wrong when we use an alias, for example 'alias.p=push', if we try to complete 'git p origin ', the result would be wrong because __git_complete_remote_or_refspec() doesn't know where it came from. So let's override words[1], so the alias 'p' is override by the actual command, 'push'. Reported-by: Aymeric Beaumet <aymeric.beaumet@gmail.com> Signed-off-by: Felipe Contreras <felipe.contreras@gmail.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2014-04-09remote-bzr: include authors field in pushed commitsdequis2-0/+26
Tests-by: Felipe Contreras <felipe.contreras@gmail.com> Signed-off-by: Felipe Contreras <felipe.contreras@gmail.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2014-04-09remote-bzr: add support for older versionsFelipe Contreras1-2/+2
Signed-off-by: Felipe Contreras <felipe.contreras@gmail.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2014-04-09remote-hg: always normalize pathsFelipe Contreras1-0/+1
Apparently Mercurial can have paths such as 'foo//bar', so normalize all paths. Signed-off-by: Felipe Contreras <felipe.contreras@gmail.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2014-04-09remote-helpers: allow all tests running from any dirFelipe Contreras2-2/+4
Commit d3243d7 (test-bzr.sh, test-hg.sh: allow running from any dir) allowed the tests to run from any directory, however, it didn't update all the tests. Signed-off-by: Felipe Contreras <felipe.contreras@gmail.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2014-04-09Sync with 1.9.2Junio C Hamano3-2/+23
* maint: Git 1.9.2 doc/http-backend: missing accent grave in literal mark-up
2014-04-09Git 1.9.2Junio C Hamano3-2/+23
The second maintenance release for Git 1.9; contains all the fixes that are scheduled to appear in Git 2.0. Signed-off-by: Junio C Hamano <gitster@pobox.com>
2014-04-09Merge branch 'jl/nor-or-nand-and' into maintJunio C Hamano57-90/+88
* jl/nor-or-nand-and: code and test: fix misuses of "nor" comments: fix misuses of "nor" contrib: fix misuses of "nor" Documentation: fix misuses of "nor"
2014-04-09Merge branch 'cn/fetch-prune-overlapping-destination' into maintJunio C Hamano2-6/+64
* cn/fetch-prune-overlapping-destination: fetch: handle overlaping refspecs on --prune fetch: add a failing test for prunning with overlapping refspecs
2014-04-09Merge branch 'mh/update-ref-batch-create-fix' into maintJunio C Hamano2-0/+12
* mh/update-ref-batch-create-fix: update-ref: fail create operation over stdin if ref already exists
2014-04-09Merge branch 'jk/commit-dates-parsing-fix' into maintJunio C Hamano5-4/+47
* jk/commit-dates-parsing-fix: t4212: loosen far-in-future test for AIX date: recognize bogus FreeBSD gmtime output
2014-04-09Merge branch 'jc/fix-diff-no-index-diff-opt-parse' into maintJunio C Hamano1-1/+1
* jc/fix-diff-no-index-diff-opt-parse: diff-no-index: correctly diagnose error return from diff_opt_parse()
2014-04-09Merge commit 'doc/http-backend: missing accent grave in literal mark-up'Junio C Hamano1-1/+1
* commit '5df05146d5cb94628a3dfc53063c802ee1152cec': doc/http-backend: missing accent grave in literal mark-up
2014-04-09doc/http-backend: missing accent grave in literal mark-upThomas Ackermann1-1/+1
Signed-off-by: Thomas Ackermann <th.acker@arcor.de> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2014-04-09utf8.c: partially update to version 6.3Torsten Bögershausen1-5/+4
Unicode 6.3 defines more code points as combining or accents. For example, the character "ö" could be expressed as an "o" followed by U+0308 COMBINING DIARESIS (aka umlaut, double-dot-above). We should consider that such a sequence of two codepoints occupies one display column for the alignment purposes, and for that, git_wcwidth() should return 0 for them. Affected codepoints are: U+0358..U+035C U+0487 U+05A2, U+05BA, U+05C5, U+05C7 U+0604, U+0616..U+061A, U+0659..U+065F Earlier unicode standards had defined these as "reserved". Only the range 0..U+07FF has been checked to see which codepoints need to be marked as 0-width while preparing for this commit; more updates may be needed. Signed-off-by: Torsten Bögershausen <tboegi@web.de> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2014-04-08Update draft release notes to 2.0Junio C Hamano1-17/+11
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2014-04-08Merge branch 'maint'Junio C Hamano1-0/+9
* maint: Update draft release notes to 1.9.2
2014-04-08Update draft release notes to 1.9.2Junio C Hamano1-0/+9
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2014-04-08Merge branch 'mm/status-porcelain-format-i18n-fix' into maintJunio C Hamano2-5/+9
* mm/status-porcelain-format-i18n-fix: status: disable translation when --porcelain is used
2014-04-08Merge branch 'bp/commit-p-editor' into maintJunio C Hamano10-39/+137
* bp/commit-p-editor: run-command: mark run_hook_with_custom_index as deprecated merge hook tests: fix and update tests merge: fix GIT_EDITOR override for commit hook commit: fix patch hunk editing with "commit -p -m" test patch hunk editing with "commit -p -m" merge hook tests: use 'test_must_fail' instead of '!' merge hook tests: fix missing '&&' in test
2014-04-08Merge branch 'jk/pack-bitmap'Junio C Hamano6-6/+56
* jk/pack-bitmap: pack-objects: do not reuse packfiles without --delta-base-offset add `ignore_missing_links` mode to revwalk
2014-04-08Merge branch 'jl/nor-or-nand-and'Junio C Hamano57-90/+88
Eradicate mistaken use of "nor" (that is, essentially "nor" used not in "neither A nor B" ;-)) from in-code comments, command output strings, and documentations. * jl/nor-or-nand-and: code and test: fix misuses of "nor" comments: fix misuses of "nor" contrib: fix misuses of "nor" Documentation: fix misuses of "nor"
2014-04-08Merge branch 'mh/update-ref-batch-create-fix'Junio C Hamano2-0/+12
* mh/update-ref-batch-create-fix: update-ref: fail create operation over stdin if ref already exists
2014-04-08Merge branch 'mr/opt-set-ptr'Junio C Hamano5-19/+4
OPT_SET_PTR() implementation was broken on IL32P64 platforms; it turns out that the macro is not used by any real user. * mr/opt-set-ptr: parse-options: remove unused OPT_SET_PTR parse-options: add cast to correct pointer type to OPT_SET_PTR MSVC: fix t0040-parse-options crash
2014-04-08Merge branch 'ib/rev-parse-parseopt-argh'Junio C Hamano1-1/+1
Finishing touch to a new topic scheduled for 2.0. * ib/rev-parse-parseopt-argh: rev-parse: fix typo in example on manpage
2014-04-08Merge branch 'mr/msvc-link-with-invalidcontinue'Junio C Hamano1-1/+1
* mr/msvc-link-with-invalidcontinue: MSVC: link in invalidcontinue.obj for better POSIX compatibility
2014-04-08Merge branch 'jc/rev-parse-argh-dashed-multi-words'Junio C Hamano17-29/+77
Make sure that the help text given to describe the "<param>" part of the "git cmd --option=<param>" does not contain SP or _, e.g. "--gpg-sign=<key-id>" option for "git commit" is not spelled as "--gpg-sign=<key id>". * jc/rev-parse-argh-dashed-multi-words: parse-options: make sure argh string does not have SP or _ update-index: teach --cacheinfo a new syntax "mode,sha1,path" parse-options: multi-word argh should use dash to separate words
2014-04-08Merge branch 'jk/commit-dates-parsing-fix'Junio C Hamano5-4/+47
Finishing touches for portability. * jk/commit-dates-parsing-fix: t4212: loosen far-in-future test for AIX date: recognize bogus FreeBSD gmtime output
2014-04-07git-p4: explicitly specify that HEAD is a revisionVlad Dogaru1-1/+1
'git p4 rebase' fails with the following message if there is a file named HEAD in the current directory: fatal: ambiguous argument 'HEAD': both revision and filename Use '--' to separate paths from revisions, like this: 'git <command> [<revision>...] -- [<file>...]' Take the suggestion above and explicitly state that HEAD should be treated as a revision. Signed-off-by: Vlad Dogaru <vdogaru@ixiacom.com> Acked-by: Pete Wyckoff <pw@padd.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2014-04-07git-multimail: update to version 1.0.0Michael Haggerty5-56/+249
This commit contains the squashed changes from the upstream git-multimail repository since the last code drop. Highlights: * Fix encoding of non-ASCII email addresses in email headers. * Fix backwards-compatibility bugs for older Python 2.x versions. * Fix a backwards-compatibility bug for Git 1.7.1. * Add an option commitDiffOpts to customize logs for revisions. * Pass "-oi" to sendmail by default to prevent premature termination on a line containing only ".". * Stagger email "Date:" values in an attempt to help mail clients thread the emails in the right order. * If a mailing list setting is missing, just skip sending the corresponding email (with a warning) instead of failing. * Add a X-Git-Host header that can be used for email filtering. * Allow the sender's fully-qualified domain name to be configured. * Minor documentation improvements. * Add a CHANGES file. Contributions-by: Raphaël Hertzog <hertzog@debian.org> Contributions-by: Eric Berberich <eric.berberich@gmail.com> Contributions-by: Michiel Holtkamp <git@elfstone.nl> Contributions-by: Malte Swart <mswart@devtation.de> Signed-off-by: Michael Haggerty <mhagger@alum.mit.edu> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2014-04-04pack-objects: do not reuse packfiles without --delta-base-offsetJeff King1-1/+12
When we are sending a packfile to a remote, we currently try to reuse a whole chunk of packfile without bothering to look at the individual objects. This can make things like initial clones much lighter on the server, as we can just dump the packfile bytes. However, it's possible that the other side cannot read our packfile verbatim. For example, we may have objects stored as OFS_DELTA, but the client is an antique version of git that only understands REF_DELTA. We negotiate this capability over the fetch protocol. A normal pack-objects run will convert OFS_DELTA into REF_DELTA on the fly, but the "reuse pack" code path never even looks at the objects. This patch disables packfile reuse if the other side is missing any capabilities that we might have used in the on-disk pack. Right now the only one is OFS_DELTA, but we may need to expand in the future (e.g., if packv4 introduces new object types). We could be more thorough and only disable reuse in this case when we actually have an OFS_DELTA to send, but: 1. We almost always will have one, since we prefer OFS_DELTA to REF_DELTA when possible. So this case would almost never come up. 2. Looking through the objects defeats the purpose of the optimization, which is to do as little work as possible to get the bytes to the remote. Signed-off-by: Jeff King <peff@peff.net> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2014-04-04add `ignore_missing_links` mode to revwalkVicent Marti5-5/+44
When pack-objects is computing the reachability bitmap to serve a fetch request, it can erroneously die() if some of the UNINTERESTING objects are not present. Upload-pack throws away HAVE lines from the client for objects we do not have, but we may have a tip object without all of its ancestors (e.g., if the tip is no longer reachable and was new enough to survive a `git prune`, but some of its reachable objects did get pruned). In the non-bitmap case, we do a revision walk with the HAVE objects marked as UNINTERESTING. The revision walker explicitly ignores errors in accessing UNINTERESTING commits to handle this case (and we do not bother looking at UNINTERESTING trees or blobs at all). When we have bitmaps, however, the process is quite different. The bitmap index for a pack-objects run is calculated in two separate steps: First, we perform an extensive walk from all the HAVEs to find the full set of objects reachable from them. This walk is usually optimized away because we are expected to hit an object with a bitmap during the traversal, which allows us to terminate early. Secondly, we perform an extensive walk from all the WANTs, which usually also terminates early because we hit a commit with an existing bitmap. Once we have the resulting bitmaps from the two walks, we AND-NOT them together to obtain the resulting set of objects we need to pack. When we are walking the HAVE objects, the revision walker does not know that we are walking it only to mark the results as uninteresting. We strip out the UNINTERESTING flag, because those objects _are_ interesting to us during the first walk. We want to keep going to get a complete set of reachable objects if we can. We need some way to tell the revision walker that it's OK to silently truncate the HAVE walk, just like it does for the UNINTERESTING case. This patch introduces a new `ignore_missing_links` flag to the `rev_info` struct, which we set only for the HAVE walk. It also adds tests to cover UNINTERESTING objects missing from several positions: a missing blob, a missing tree, and a missing parent commit. The missing blob already worked (as we do not care about its contents at all), but the other two cases caused us to die(). Note that there are a few cases we do not need to test: 1. We do not need to test a missing tree, with the blob still present. Without the tree that refers to it, we would not know that the blob is relevant to our walk. 2. We do not need to test a tip commit that is missing. Upload-pack omits these for us (and in fact, we complain even in the non-bitmap case if it fails to do so). Reported-by: Siddharth Agarwal <sid0@fb.com> Signed-off-by: Vicent Marti <tanoku@gmail.com> Signed-off-by: Jeff King <peff@peff.net> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2014-04-04MSVC: allow using ExtUtils::MakeMakerMarat Radchenko1-1/+0
Drop NO_PERL_MAKEMAKER from config.mak.uname for the MSVC platform. MakeMaker is available on Windows Perl implementations and installs modules to correct location, unlike NO_PERL_MAKEMAKER Makefile. Signed-off-by: Marat Radchenko <marat@slonopotamus.org> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2014-04-03Update draft release notes to 2.0Junio C Hamano1-0/+25
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2014-04-03Merge branch 'maint'Junio C Hamano1-0/+38
* maint: Start preparing for 1.9.1
2014-04-03Start preparing for 1.9.1Junio C Hamano2-1/+39
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2014-04-03Merge branch 'jk/mv-submodules-fix' into maintJunio C Hamano2-1/+21
* jk/mv-submodules-fix: mv: prevent mismatched data when ignoring errors. builtin/mv: fix out of bounds write Conflicts: t/t7001-mv.sh
2014-04-03Merge branch 'mh/remove-subtree-long-pathname-fix' into maintJunio C Hamano1-32/+32
* mh/remove-subtree-long-pathname-fix: entry.c: fix possible buffer overflow in remove_subtree() checkout_entry(): use the strbuf throughout the function
2014-04-03Merge branch 'jk/lib-terminal-lazy' into maintJunio C Hamano1-18/+19
* jk/lib-terminal-lazy: t/lib-terminal: make TTY a lazy prerequisite
2014-04-03Merge branch 'nd/index-pack-error-message' into maintJunio C Hamano1-2/+2
* nd/index-pack-error-message: index-pack: report error using the correct variable
2014-04-03Merge branch 'us/printf-not-echo' into maintJunio C Hamano2-3/+3
* us/printf-not-echo: test-lib.sh: do not "echo" caller-supplied strings rebase -i: do not "echo" random user-supplied strings
2014-04-03Merge branch 'rr/doc-merge-strategies' into maintJunio C Hamano1-2/+2
* rr/doc-merge-strategies: Documentation/merge-strategies: avoid hyphenated commands
2014-04-03Merge branch 'jk/shallow-update-fix' into maintJunio C Hamano5-56/+49
* jk/shallow-update-fix: shallow: verify shallow file after taking lock shallow: automatically clean up shallow tempfiles shallow: use stat_validity to check for up-to-date file
2014-04-03Merge branch 'jc/stash-pop-not-popped' into maintJunio C Hamano1-2/+8
* jc/stash-pop-not-popped: stash pop: mention we did not drop the stash upon failing to apply
2014-04-03Merge branch 'jn/wt-status' into maintJunio C Hamano3-55/+88
* jn/wt-status: wt-status: lift the artificual "at least 20 columns" floor wt-status: i18n of section labels wt-status: extract the code to compute width for labels wt-status: make full label string to be subject to l10n
2014-04-03Merge branch 'nd/gc-aggressive'Junio C Hamano5-3/+17
Allow tweaking the maximum length of the delta-chain produced by "gc --aggressive". * nd/gc-aggressive: environment.c: fix constness for odb_pack_keep() gc --aggressive: make --depth configurable
2014-04-03Merge branch 'jc/fix-diff-no-index-diff-opt-parse'Junio C Hamano1-1/+1
"diff --no-index -Mq a b" fell into an infinite loop. * jc/fix-diff-no-index-diff-opt-parse: diff-no-index: correctly diagnose error return from diff_opt_parse()
2014-04-03Merge branch 'cb/aix'Junio C Hamano3-7/+5
* cb/aix: tests: don't rely on strerror text when testing rmdir failure dir.c: make git_fnmatch() not inline
2014-04-03Merge branch 'cn/fetch-prune-overlapping-destination'Junio C Hamano2-6/+64
Protect refs in a hierarchy that can come from more than one remote hierarcies from incorrect removal by "git fetch --prune". * cn/fetch-prune-overlapping-destination: fetch: handle overlaping refspecs on --prune fetch: add a failing test for prunning with overlapping refspecs
2014-04-03Merge branch 'nd/log-show-linear-break'Junio C Hamano14-11/+89
Attempts to show where a single-strand-of-pearls break in "git log" output. * nd/log-show-linear-break: log: add --show-linear-break to help see non-linear history object.h: centralize object flag allocation
2014-04-03Merge branch 'ep/shell-command-substitution'Junio C Hamano2-17/+17
* ep/shell-command-substitution: git-am.sh: use the $(...) construct for command substitution check-builtins.sh: use the $(...) construct for command substitution
2014-04-02Merge branch 'ap/remote-hg-skip-null-bookmarks'Junio C Hamano2-1/+77
* ap/remote-hg-skip-null-bookmarks: remote-hg: do not fail on invalid bookmarks
2014-04-02Merge branch 'rs/pickaxe-i'Junio C Hamano2-188/+116
Allow the options -i/--regexp-ignore-case, --pickaxe-regex, and -S to be used together and work as expected to perform a pickaxe search using case-insensitive regular expression matching. * rs/pickaxe-i: pickaxe: simplify kwset loop in contains() pickaxe: call strlen only when necessary in diffcore_pickaxe_count() pickaxe: move pickaxe() after pickaxe_match() pickaxe: merge diffcore_pickaxe_grep() and diffcore_pickaxe_count() into diffcore_pickaxe() pickaxe: honor -i when used with -S and --pickaxe-regex t4209: use helper functions to test --author t4209: use helper functions to test --grep t4209: factor out helper function test_log_icase() t4209: factor out helper function test_log() t4209: set up expectations up front
2014-04-02Revert part of 384364b (Start preparing for Git 2.0, 2014-03-07)Junio C Hamano1-5/+0
As we are not shipping with the submodule change, remove the entry for it.
2014-04-02Revert "submodule: explicit local branch creation in module_clone"Junio C Hamano4-109/+26
This reverts commit 23d25e48f5ead73c9ce233986f90791abec9f1e8, as it is broken for users who haven't opted into the new feature of checking out submodule.*.branch with update mode set to checkout.
2014-04-02update-ref: fail create operation over stdin if ref already existsAman Gupta2-0/+12
Signed-off-by: Aman Gupta <aman@tmm1.net> Signed-off-by: Michael Haggerty <mhagger@alum.mit.edu> Acked-by: Brad King <brad.king@kitware.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2014-04-01t4212: loosen far-in-future test for AIXJeff King1-4/+2
One of the tests in t4212 checks our behavior when we feed gmtime a date so far in the future that it gives up and returns NULL. Some implementations, like AIX, may actually just provide us a bogus result instead. It's not worth it for us to come up with heuristics that guess whether the return value is sensible or not. On good platforms where gmtime reports the problem to us with NULL, we will print the epoch value. On bad platforms, we will print garbage. But our test should be written for the lowest common denominator so that it passes everywhere. Reported-by: Charles Bailey <cbailey32@bloomberg.net> Signed-off-by: Jeff King <peff@peff.net> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2014-04-01date: recognize bogus FreeBSD gmtime outputJeff King4-0/+45
Most gmtime implementations return a NULL value when they encounter an error (and this behavior is specified by ANSI C and POSIX). FreeBSD's implementation, however, will simply leave the "struct tm" untouched. Let's also recognize this and convert it to a NULL (with this patch, t4212 should pass on FreeBSD). Reported-by: René Scharfe <l.s.r@web.de> Signed-off-by: Jeff King <peff@peff.net> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2014-04-01rev-parse: fix typo in example on manpageRené Scharfe1-1/+1
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2014-04-01Revert "Merge branch 'wt/doc-submodule-name-path-confusion-2'"Junio C Hamano1-1/+1
This reverts commit 00d4ff1a69883e24b095f45251d99143b5bc0320, reversing changes made to d3badc6eb0961382788c2670129d5ee133d079fd.
2014-03-31Update draft release notes to 2.0Junio C Hamano1-0/+13
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2014-03-31Merge branch 'mm/status-porcelain-format-i18n-fix'Junio C Hamano2-5/+9
* mm/status-porcelain-format-i18n-fix: status: disable translation when --porcelain is used
2014-03-31Merge branch 'an/branch-config-message'Junio C Hamano1-23/+23
* an/branch-config-message: branch.c: install_branch_config: simplify if chain
2014-03-31Merge branch 'jk/tests-cleanup'Junio C Hamano10-180/+87
* jk/tests-cleanup: t0001: drop subshells just for "cd" t0001: drop useless subshells t0001: use test_must_fail t0001: use test_config_global t0001: use test_path_is_* t0001: make symlink reinit test more careful t: prefer "git config --file" to GIT_CONFIG t: prefer "git config --file" to GIT_CONFIG with test_must_fail t: stop using GIT_CONFIG to cross repo boundaries t: drop useless sane_unset GIT_* calls t/test-lib: drop redundant unset of GIT_CONFIG t/Makefile: stop setting GIT_CONFIG
2014-03-31Merge branch 'wt/doc-submodule-name-path-confusion-2'Junio C Hamano1-1/+1
* wt/doc-submodule-name-path-confusion-2: doc: submodule.*.branch config is keyed by name
2014-03-31Merge branch 'wt/doc-submodule-name-path-confusion-1'Junio C Hamano1-1/+1
* wt/doc-submodule-name-path-confusion-1: doc: submodule.* config are keyed by submodule names
2014-03-31Merge branch 'mr/msvc-link-with-lcurl'Junio C Hamano2-1/+2
* mr/msvc-link-with-lcurl: MSVC: allow linking with the cURL library
2014-03-31Merge branch 'ib/rev-parse-parseopt-argh'Junio C Hamano3-39/+100
Teaches the "rev-parse --parseopt" mechanism used by scripted Porcelains to parse command line options and give help text how to supply argv-help (the placeholder string for an option parameter, e.g. "key-id" in "--gpg-sign=<key-id>"). * ib/rev-parse-parseopt-argh: t1502: protect runs of SPs used in the indentation rev-parse --parseopt: option argument name hints
2014-03-31Merge branch 'dp/makefile-charset-lib-doc'Junio C Hamano1-2/+2
* dp/makefile-charset-lib-doc: Makefile: describe CHARSET_LIB better
2014-03-31Merge branch 'js/userdiff-cc'Junio C Hamano33-160/+303
Improves the pattern to match the hunk-header for C/C++. * js/userdiff-cc: userdiff: have 'cpp' hunk header pattern catch more C++ anchor points t4018: test cases showing that the cpp pattern misses many anchor points t4018: test cases for the built-in cpp pattern t4018: reduce test files for pattern compilation tests t4018: convert custom pattern test to the new infrastructure t4018: convert java pattern test to the new infrastructure t4018: convert perl pattern tests to the new infrastructure t4018: an infrastructure to test hunk headers userdiff: support unsigned and long long suffixes of integer constants userdiff: support C++ ->* and .* operators in the word regexp
2014-03-31Merge branch 'dw/doc-status-no-longer-shows-pound-prefix'Junio C Hamano1-1/+1
* dw/doc-status-no-longer-shows-pound-prefix: doc: status, remove leftover statement about '#' prefix
2014-03-31Merge branch 'ca/doc-config-third-party'Junio C Hamano1-2/+7
* ca/doc-config-third-party: config.txt: third-party tools may and do use their own variables
2014-03-31Merge branch 'hs/simplify-bit-setting-in-fsck-tree'Junio C Hamano1-12/+6
* hs/simplify-bit-setting-in-fsck-tree: fsck: use bitwise-or assignment operator to set flag
2014-03-31Merge branch 'dt/tests-with-env-not-subshell'Junio C Hamano12-152/+42
* dt/tests-with-env-not-subshell: tests: use "env" to run commands with temporary env-var settings
2014-03-31code and test: fix misuses of "nor"Justin Lebar12-16/+16
Signed-off-by: Justin Lebar <jlebar@google.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2014-03-31comments: fix misuses of "nor"Justin Lebar20-27/+26
Signed-off-by: Justin Lebar <jlebar@google.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2014-03-31contrib: fix misuses of "nor"Justin Lebar2-3/+3
Signed-off-by: Justin Lebar <jlebar@google.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2014-03-31Documentation: fix misuses of "nor"Justin Lebar25-44/+43
Signed-off-by: Justin Lebar <jlebar@google.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2014-03-31parse-options: remove unused OPT_SET_PTRMarat Radchenko5-19/+4
OPT_SET_PTR was never used since its creation at db7244bd (parse-options new features., 2007-11-07). Signed-off-by: Junio C Hamano <gitster@pobox.com>
2014-03-31parse-options: add cast to correct pointer type to OPT_SET_PTRJunio C Hamano2-2/+2
Do not force users of OPT_SET_PTR to cast pointer to correct underlying pointer type by integrating cast into OPT_SET_PTR macro. Cast is required to prevent 'initialization makes integer from pointer without a cast' compiler warning. Signed-off-by: Junio C Hamano <gitster@pobox.com>
2014-03-31MSVC: fix t0040-parse-options crashMarat Radchenko1-1/+1
On 64-bit MSVC, pointers are 64 bit but `long` is only 32. Thus, casting string to `unsigned long`, which is redundand on other platforms, throws away important bits and when later cast to `intptr_t` results in corrupt pointer. This patch fixes test-parse-options by replacing harming cast with correct one. Signed-off-by: Marat Radchenko <marat@slonopotamus.org> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2014-03-31tests: don't rely on strerror text when testing rmdir failureCharles Bailey2-4/+2
AIX doesn't make a distiction between EEXIST and ENOTEMPTY; relying on the strerror string for the rmdir failure is fragile. Just test that the start of the string matches the Git controlled "failed to rmdir..." error. The exact text of the OS generated error string isn't important to the test. Signed-off-by: Charles Bailey <cbailey32@bloomberg.net> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2014-03-31dir.c: make git_fnmatch() not inlineCharles Bailey1-3/+3
Now that it calls a static inline function, it cannot be an inline definition with external linkage. Remove inline and make it an external definition. Signed-off-by: Charles Bailey <cbailey32@bloomberg.net> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2014-03-31diff-no-index: correctly diagnose error return from diff_opt_parse()Junio C Hamano1-1/+1
diff_opt_parse() returns the number of options parsed, or often returns error() which is defined to return -1. Yes, return value of 0 is "I did not process that option at all", which should cause the caller to say that, but negative return should not be forgotten. This bug caused "diff --no-index" to infinitely show the same error message because the returned value was used to decrement the loop control variable, e.g. $ git diff --no-index --color=words a b error: option `color' expects "always", "auto", or "never" error: option `color' expects "always", "auto", or "never" ... Instead, make it act like so: $ git diff --no-index --color=words a b error: option `color' expects "always", "auto", or "never" fatal: invalid diff option/value: --color=words Reported-by: Linus Torvalds <torvalds@linux-foundation.org> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2014-03-31environment.c: fix constness for odb_pack_keep()Nguyễn Thái Ngọc Duy2-2/+2
Signed-off-by: Nguyễn Thái Ngọc Duy <pclouds@gmail.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2014-03-31gc --aggressive: make --depth configurableNguyễn Thái Ngọc Duy3-1/+15
When 1c192f3 (gc --aggressive: make it really aggressive - 2007-12-06) made --depth=250 the default value, it didn't really explain the reason behind, especially the pros and cons of --depth=250. An old mail from Linus below explains it at length. Long story short, --depth=250 is a disk saver and a performance killer. Not everybody agrees on that aggressiveness. Let the user configure it. From: Linus Torvalds <torvalds@linux-foundation.org> Subject: Re: [PATCH] gc --aggressive: make it really aggressive Date: Thu, 6 Dec 2007 08:19:24 -0800 (PST) Message-ID: <alpine.LFD.0.9999.0712060803430.13796@woody.linux-foundation.org> Gmane-URL: http://article.gmane.org/gmane.comp.gcc.devel/94637 On Thu, 6 Dec 2007, Harvey Harrison wrote: > > 7:41:25elapsed 86%CPU Heh. And this is why you want to do it exactly *once*, and then just export the end result for others ;) > -r--r--r-- 1 hharrison hharrison 324094684 2007-12-06 07:26 pack-1d46...pack But yeah, especially if you allow longer delta chains, the end result can be much smaller (and what makes the one-time repack more expensive is the window size, not the delta chain - you could make the delta chains longer with no cost overhead at packing time) HOWEVER. The longer delta chains do make it potentially much more expensive to then use old history. So there's a trade-off. And quite frankly, a delta depth of 250 is likely going to cause overflows in the delta cache (which is only 256 entries in size *and* it's a hash, so it's going to start having hash conflicts long before hitting the 250 depth limit). So when I said "--depth=250 --window=250", I chose those numbers more as an example of extremely aggressive packing, and I'm not at all sure that the end result is necessarily wonderfully usable. It's going to save disk space (and network bandwidth - the delta's will be re-used for the network protocol too!), but there are definitely downsides too, and using long delta chains may simply not be worth it in practice. (And some of it might just want to have git tuning, ie if people think that long deltas are worth it, we could easily just expand on the delta hash, at the cost of some more memory used!) That said, the good news is that working with *new* history will not be affected negatively, and if you want to be _really_ sneaky, there are ways to say "create a pack that contains the history up to a version one year ago, and be very aggressive about those old versions that we still want to have around, but do a separate pack for newer stuff using less aggressive parameters" So this is something that can be tweaked, although we don't really have any really nice interfaces for stuff like that (ie the git delta cache size is hardcoded in the sources and cannot be set in the config file, and the "pack old history more aggressively" involves some manual scripting and knowing how "git pack-objects" works rather than any nice simple command line switch). So the thing to take away from this is: - git is certainly flexible as hell - .. but to get the full power you may need to tweak things - .. happily you really only need to have one person to do the tweaking, and the tweaked end results will be available to others that do not need to know/care. And whether the difference between 320MB and 500MB is worth any really involved tweaking (considering the potential downsides), I really don't know. Only testing will tell. Linus Signed-off-by: Nguyễn Thái Ngọc Duy <pclouds@gmail.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2014-03-28Update draft release notes to 2.0Junio C Hamano1-0/+27
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2014-03-28Merge branch 'ys/fsck-commit-parsing'Junio C Hamano1-12/+14
* ys/fsck-commit-parsing: fsck.c:fsck_commit(): use skip_prefix() to verify and skip constant fsck.c:fsck_ident(): ident points at a const string
2014-03-28Merge branch 'bg/rebase-off-of-previous-branch'Junio C Hamano2-0/+21
* bg/rebase-off-of-previous-branch: rebase: allow "-" short-hand for the previous branch
2014-03-28Merge branch 'bp/commit-p-editor'Junio C Hamano10-39/+137
When it is not necessary to edit a commit log message (e.g. "git commit -m" is given a message without specifying "-e"), we used to disable the spawning of the editor by overriding GIT_EDITOR, but this means all the uses of the editor, other than to edit the commit log message, are also affected. * bp/commit-p-editor: run-command: mark run_hook_with_custom_index as deprecated merge hook tests: fix and update tests merge: fix GIT_EDITOR override for commit hook commit: fix patch hunk editing with "commit -p -m" test patch hunk editing with "commit -p -m" merge hook tests: use 'test_must_fail' instead of '!' merge hook tests: fix missing '&&' in test
2014-03-28Merge branch 'ah/doc-gitk-config'Junio C Hamano1-2/+8
* ah/doc-gitk-config: Documentation/gitk: document the location of the configulation file
2014-03-28Merge branch 'fr/add-interactive-argv-array'Junio C Hamano1-11/+10
* fr/add-interactive-argv-array: add: use struct argv_array in run_add_interactive()
2014-03-28Merge branch 'jk/subtree-prefix'Junio C Hamano1-0/+1
A stray environment variable $prefix could have leaked into and affected the behaviour of the "subtree" script. * jk/subtree-prefix: subtree: initialize "prefix" variable
2014-03-28Merge branch 'jk/pack-bitmap-progress'Junio C Hamano1-11/+19
The progress output while repacking and transferring objects showed an apparent large silence while writing the objects out of existing packfiles, when the reachability bitmap was in use. * jk/pack-bitmap-progress: pack-objects: show reused packfile objects in "Counting objects" pack-objects: show progress for reused packfiles
2014-03-28Merge branch 'jk/pack-bitmap'Junio C Hamano2-2/+15
Instead of dying when asked to (re)pack with the reachability bitmap when a bitmap cannot be built, just (re)pack without producing a bitmap in such a case, with a warning. * jk/pack-bitmap: pack-objects: turn off bitmaps when skipping objects
2014-03-28MSVC: link in invalidcontinue.obj for better POSIX compatibilityMarat Radchenko1-1/+1
By default, Windows abort()'s instead of setting errno=EINVAL when invalid arguments are passed to standard functions. For example, when PAGER quits and git detects it with errno=EPIPE on write(), check_pipe() in write_or_die.c tries raise(SIGPIPE) but since there is no SIGPIPE on Windows, it is treated as invalid argument, causing abort() and crash report window. Linking in invalidcontinue.obj (provided along with MS compiler) allows raise(SIGPIPE) to return with errno=EINVAL. Signed-off-by: Marat Radchenko <marat@slonopotamus.org> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2014-03-27doc: submodule.*.branch config is keyed by nameW. Trevor King1-1/+1
Ever since 941987a5 (git-submodule: give submodules proper names, 2007-06-11) introduced the ability to move a submodule from one path to another inside its superproject tree without losing its identity, we should have consistently used submodule.<name>.* to access settings related to the named submodule. Signed-off-by: W. Trevor King <wking@tremily.us> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2014-03-27doc: submodule.* config are keyed by submodule namesW. Trevor King1-1/+1
Ever since 941987a5 (git-submodule: give submodules proper names, 2007-06-11) introduced the ability to move a submodule from one path to another inside its superproject tree without losing its identity, we should have consistently used submodule.<name>.* to access settings related to the named submodule. Reported-by: Junio C Hamano <gitster@pobox.com> Signed-off-by: W. Trevor King <wking@tremily.us> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2014-03-27MSVC: allow linking with the cURL libraryMarat Radchenko2-1/+2
Teach the clink.pl script that -lcurl is a request to link with the cURL library, and drop NO_CURL from config.mak.uname for the MSVC platform. Signed-off-by: Marat Radchenko <marat@slonopotamus.org> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2014-03-26fetch: handle overlaping refspecs on --pruneCarlos Martín Nieto2-7/+45
We need to consider that a remote-tracking branch may match more than one rhs of a fetch refspec. In such a case, it is not enough to stop at the first match but look at all of the matches in order to determine whether a head is stale. To this goal, introduce a variant of query_refspecs which returns all of the matching refspecs and loop over those answers to check for staleness. Signed-off-by: Carlos Martín Nieto <cmn@elego.de> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2014-03-26status: disable translation when --porcelain is usedMatthieu Moy2-5/+9
"git status --branch --porcelain" displays the status of the branch (ahead, behind, gone), and used gettext to translate the string. Use hardcoded strings when --porcelain is used, but keep the gettext translation for "git status --short" which is essentially the same, but meant to be read by a human. Reported-by: Anarky <ghostanarky@gmail.com> Signed-off-by: Matthieu Moy <Matthieu.Moy@imag.fr> Signed-off-by: Junio C Hamano <gitster@pobox.com>