summaryrefslogtreecommitdiff
AgeCommit message (Collapse)AuthorFilesLines
2012-12-04mingw: get rid of getpass implementationLibravatar Erik Faye-Lund2-17/+0
There's no remaining call-sites, and as pointed out in the previous commit message, it's not quite ideal. So let's just lose it. Signed-off-by: Erik Faye-Lund <kusmabite@gmail.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2012-12-04mingw: reuse tty-version of git_terminal_promptLibravatar Erik Faye-Lund1-9/+60
The getpass-implementation we use on Windows isn't at all ideal; it works in raw-mode (as opposed to cooked mode), and as a result does not deal correcly with deletion, arrow-keys etc. Instead, use cooked mode to read a line at the time, allowing the C run-time to process the input properly. Since we set files to be opened in binary-mode by default on Windows, introduce a FORCE_TEXT macro that expands to the "t" modifier that forces the terminal to be opened in text-mode so we do not have to deal with CRLF issues. Signed-off-by: Erik Faye-Lund <kusmabite@gmail.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2012-12-04compat/terminal: separate input and output handlesLibravatar Erik Faye-Lund1-11/+18
On Windows, the terminal cannot be opened in read-write mode, so we need distinct pairs for reading and writing. Since this works fine on other platforms as well, always open them in pairs. Signed-off-by: Erik Faye-Lund <kusmabite@gmail.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2012-12-04compat/terminal: factor out echo-disablingLibravatar Erik Faye-Lund1-18/+25
By moving the echo-disabling code to a separate function, we can implement OS-specific versions of it for non-POSIX platforms. Signed-off-by: Erik Faye-Lund <kusmabite@gmail.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2012-12-04mingw: make fgetc raise SIGINT if apropriateLibravatar Erik Faye-Lund2-10/+72
Set a control-handler to prevent the process from terminating, and simulate SIGINT so it can be handled by a signal-handler as usual. Signed-off-by: Erik Faye-Lund <kusmabite@gmail.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2012-12-04mingw: correct exit-code for SIGALRM's SIG_DFLLibravatar Erik Faye-Lund1-2/+5
Make sure SIG_DFL for SIGALRM exits with 128 + SIGALRM so other processes can diagnose why it exits. While we're at it, make sure we only write to stderr if it's a terminal, and change the output to match that of Linux. Signed-off-by: Erik Faye-Lund <kusmabite@gmail.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2012-11-29Update draft release notes to 1.8.1Libravatar Junio C Hamano1-1/+32
2012-11-29Merge branch 'pw/p4-various-fixes'Libravatar Junio C Hamano3-20/+137
* pw/p4-various-fixes: git p4: remove unneeded cmd initialization git p4: fix labelDetails typo in exception git p4 test: display unresolvable host error git p4: catch p4 errors when streaming file contents git p4: handle servers without move support git p4: catch p4 describe errors
2012-11-29Merge branch 'lt/diff-stat-show-0-lines'Libravatar Junio C Hamano2-28/+74
"git diff --stat" miscounted the total number of changed lines when binary files were involved and hidden beyond --stat-count. It also miscounted the total number of changed files when there were unmerged paths. * lt/diff-stat-show-0-lines: t4049: refocus tests diff --shortstat: do not count "unmerged" entries diff --stat: do not count "unmerged" entries diff --stat: move the "total count" logic to the last loop diff --stat: use "file" temporary variable to refer to data->files[i] diff --stat: status of unmodified pair in diff-q is not zero test: add failing tests for "diff --stat" to t4049
2012-11-29Merge branch 'fc/remote-hg'Libravatar Junio C Hamano6-1/+1639
New remote helper for hg. * fc/remote-hg: (22 commits) remote-hg: fix for older versions of python remote-hg: fix for files with spaces remote-hg: avoid bad refs remote-hg: try the 'tip' if no checkout present remote-hg: fix compatibility with older versions of hg remote-hg: add missing config for basic tests remote-hg: the author email can be null remote-hg: add option to not track branches remote-hg: add extra author test remote-hg: add tests to compare with hg-git remote-hg: add bidirectional tests test-lib: avoid full path to store test results remote-hg: add basic tests remote-hg: fake bookmark when there's none remote-hg: add compat for hg-git author fixes remote-hg: add support for hg-git compat mode remote-hg: match hg merge behavior remote-hg: make sure the encoding is correct remote-hg: add support to push URLs remote-hg: add support for remote pushing ...
2012-11-29Merge branch 'mk/complete-tcsh'Libravatar Junio C Hamano1-7/+12
Finishing touches for tcsh completion. * mk/complete-tcsh: Support for git aliasing for tcsh completion
2012-11-29Merge branch 'jc/doc-push-satellite'Libravatar Junio C Hamano1-2/+14
* jc/doc-push-satellite: Documentation/git-push.txt: clarify the "push from satellite" workflow
2012-11-29Merge branch 'km/send-email-remove-cruft-in-address'Libravatar Junio C Hamano1-18/+59
* km/send-email-remove-cruft-in-address: git-send-email: allow edit invalid email address git-send-email: ask what to do with an invalid email address git-send-email: remove invalid addresses earlier git-send-email: fix fallback code in extract_valid_address() git-send-email: remove garbage after email address
2012-11-29Merge branch 'jk/send-email-sender-prompt'Libravatar Junio C Hamano9-26/+169
General clean-ups in various areas, originally written to support a patch that later turned out to be unneeded. * jk/send-email-sender-prompt: t9001: check send-email behavior with implicit sender t: add tests for "git var" ident: keep separate "explicit" flags for author and committer ident: make user_ident_explicitly_given static t7502: factor out autoident prerequisite test-lib: allow negation of prerequisites
2012-11-29Merge branch 'fc/send-email-no-sender-prompt'Libravatar Junio C Hamano2-9/+3
* fc/send-email-no-sender-prompt: send-email: avoid questions when user has an ident
2012-11-29Merge branch 'er/doc-add-new-commands'Libravatar Junio C Hamano1-0/+99
* er/doc-add-new-commands: Documentation: how to add a new command
2012-11-29Merge branch 'jl/submodule-rm'Libravatar Junio C Hamano2-0/+32
Finishing touches to "git rm $submodule" that removes the working tree of a submodule. * jl/submodule-rm: Teach rm to remove submodules when given with a trailing '/'
2012-11-29Merge branch 'pp/gitweb-config-underscore'Libravatar Junio C Hamano1-2/+5
The key "gitweb.remote_heads" is not legal git config; this maps it to "gitweb.remoteheads". * pp/gitweb-config-underscore: gitweb: make remote_heads config setting work
2012-11-29Merge branch 'fc/completion-test-simplification'Libravatar Junio C Hamano1-82/+52
Clean up completion tests. Use of conslidated helper may make instrumenting one particular test during debugging of the test itself, but I think that issue should be addressed in some other way (e.g. making sure individual tests in 9902 can be skipped). * fc/completion-test-simplification: completion: simplify __gitcomp() test helper completion: refactor __gitcomp related tests completion: consolidate test_completion*() tests completion: simplify tests using test_completion_long() completion: standardize final space marker in tests completion: add comment for test_completion()
2012-11-29Merge branch 'maint'Libravatar Junio C Hamano3-5/+45
* maint: git-fast-import.txt: improve documentation for quoted paths git-remote-mediawiki: escape ", \, and LF in file names
2012-11-29git-fast-import.txt: improve documentation for quoted pathsLibravatar Matthieu Moy1-2/+6
The documentation mentioned only newlines and double quotes as characters needing escaping, but the backslash also needs it. Also, the documentation was not clearly saying that double quotes around the file name were required (double quotes in the examples could be interpreted as part of the sentence, not part of the actual string). Signed-off-by: Matthieu Moy <Matthieu.Moy@imag.fr> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2012-11-29git-remote-mediawiki: escape ", \, and LF in file namesLibravatar Matthieu Moy2-3/+39
A mediawiki page can contain, and even start with a " character, we have to escape it when generating the fast-export stream, as well as \ character. While we're there, also escape newlines, but I don't think we can get them from MediaWiki pages. Signed-off-by: Matthieu Moy <Matthieu.Moy@imag.fr> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2012-11-29Merge branch 'master' of git://github.com/git-l10n/git-poLibravatar Junio C Hamano1-834/+896
Further l10n updates. * 'master' of git://github.com/git-l10n/git-po: l10n: vi.po: Update follow git-v1.8.0-273-g2d242
2012-11-29t4049: refocus testsLibravatar Junio C Hamano1-11/+9
The primary thing Linus's patch wanted to change was to make sure that 0-line change appears for a mode-only change. Update the first test to chmod a file that we can see in the output (limited by --stat-count) to demonstrate it. Also make sure to use test_chmod and compare the index and the tree, so that we can run this test even on a filesystem without permission bits. Later two tests are about fixes to separate issues that were introduced and/or uncovered by Linus's patch as a side effect, but the issues are not related to mode-only changes. Remove chmod from the tests. Signed-off-by: Junio C Hamano <gitster@pobox.com>
2012-11-29completion: fix warning for zshLibravatar Felipe Contreras1-0/+2
Otherwise the user might get something like: git-completion.sh:2466: command not found: compdef If this script is loaded before compinit. The script would work either way, but let's not be more annoying to the user. Signed-off-by: Felipe Contreras <felipe.contreras@gmail.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2012-11-29Merge git://github.com/vnwildman/gitLibravatar Jiang Xin1-834/+896
* git://github.com/vnwildman/git: l10n: vi.po: Update follow git-v1.8.0-273-g2d242
2012-11-28Merge branch 'master' of git://github.com/git-l10n/git-poLibravatar Junio C Hamano3-1970/+2097
Update the localization string up to 2d242fb (Update draft release notes for 1.8.1, 2012-11-21) * 'master' of git://github.com/git-l10n/git-po: l10n: Update Swedish translation (1975t0f0u) l10n: vi.po: update to git-v1.7.12-437-g1084f l10n: Update git.pot (14 new, 3 removed messages)
2012-11-28Merge branch 'maint'Libravatar Junio C Hamano2-0/+17
2012-11-28Update draft release notes to 1.8.1Libravatar Junio C Hamano1-1/+10
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2012-11-28Merge branch 'fc/zsh-completion'Libravatar Junio C Hamano2-43/+139
* fc/zsh-completion: completion: start moving to the new zsh completion completion: add new zsh completion
2012-11-28Merge branch 'mm/status-push-pull-advise'Libravatar Junio C Hamano2-3/+11
* mm/status-push-pull-advise: status: add advice on how to push/pull to tracking branch
2012-11-28Merge branch 'jk/pickaxe-textconv'Libravatar Junio C Hamano2-19/+54
Use textconv filters when searching with "log -S". * jk/pickaxe-textconv: pickaxe: use textconv for -S counting pickaxe: hoist empty needle check
2012-11-28Start preparing for 1.8.0.2Libravatar Junio C Hamano2-1/+16
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2012-11-28t9001: check send-email behavior with implicit senderLibravatar Jeff King1-0/+28
We allow send-email to use an implicitly-defined identity for the sender (because there is still a confirmation step), but we abort when we cannot generate such an identity. Let's make sure that we test this. Signed-off-by: Jeff King <peff@peff.net> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2012-11-28Merge branch 'rh/maint-gitweb-highlight-ext' into maintLibravatar Junio C Hamano1-9/+8
Syntax highlighting in "gitweb" was not quite working. * rh/maint-gitweb-highlight-ext: gitweb.perl: fix %highlight_ext mappings
2012-11-28Merge branch 'pw/maint-p4-rcs-expansion-newline' into maintLibravatar Junio C Hamano2-1/+20
"git p4" used to try expanding malformed "$keyword$" that spans across multiple lines. * pw/maint-p4-rcs-expansion-newline: git p4: RCS expansion should not span newlines
2012-11-28completion: add options --single-branch and --branch to "git clone"Libravatar Ralf Thielow1-0/+2
Signed-off-by: Ralf Thielow <ralf.thielow@gmail.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2012-11-28Merge branch 'fc/send-email-no-sender-prompt' into jk/send-email-sender-promptLibravatar Junio C Hamano2-9/+3
* fc/send-email-no-sender-prompt: send-email: avoid questions when user has an ident
2012-11-28t: add tests for "git var"Libravatar Jeff King1-0/+49
We do not currently have any explicit tests for "git var" at all (though we do exercise it to some degree as a part of other tests). Let's add a few basic sanity checks. Signed-off-by: Jeff King <peff@peff.net> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2012-11-27Documentation/git-push.txt: clarify the "push from satellite" workflowLibravatar Junio C Hamano1-2/+14
The context of the example to push into refs/remotes/satellite/ hierarchy of the other repository needs to be spelled out explicitly for the value of this example to be fully appreciated. Make it so. Signed-off-by: Junio C Hamano <gitster@pobox.com>
2012-11-27remote-hg: fix for older versions of pythonLibravatar Felipe Contreras1-4/+8
As Amit Bakshi reported, older versions of python (< 2.7) don't have subprocess.check_output, so let's use subprocess.Popen directly as suggested. Suggested-by: Amit Bakshi <ambakshi@gmail.com> Signed-off-by: Felipe Contreras <felipe.contreras@gmail.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2012-11-27remote-hg: fix for files with spacesLibravatar Felipe Contreras1-1/+1
Signed-off-by: Felipe Contreras <felipe.contreras@gmail.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2012-11-27diff --shortstat: do not count "unmerged" entriesLibravatar Junio C Hamano1-3/+2
Fix the same issue as the previous one for "git diff --stat"; unmerged entries was doubly-counted. Signed-off-by: Junio C Hamano <gitster@pobox.com>
2012-11-27Merge branch 'maint'Libravatar Junio C Hamano1-1/+2
2012-11-27Merge branch 'nd/maint-compat-fnmatch-fix' into maintLibravatar Junio C Hamano1-1/+1
* nd/maint-compat-fnmatch-fix: compat/fnmatch: fix off-by-one character class's length check
2012-11-27Merge branch 'jh/update-ref-d-through-symref' into maintLibravatar Junio C Hamano2-1/+19
* jh/update-ref-d-through-symref: Fix failure to delete a packed ref through a symref t1400-update-ref: Add test verifying bug with symrefs in delete_ref()
2012-11-27Merge branch 'esr/maint-doc-fast-import' into maintLibravatar Junio C Hamano1-2/+6
* esr/maint-doc-fast-import: doc/fast-import: clarify how content states are built
2012-11-27Merge branch 'wtk/submodule-doc-fixup' into maintLibravatar Junio C Hamano2-2/+2
* wtk/submodule-doc-fixup: git-submodule: wrap branch option with "<>" in usage strings.
2012-11-27diff --stat: do not count "unmerged" entriesLibravatar Junio C Hamano2-3/+5
Even though we show a separate *UNMERGED* entry in the patch and diffstat output (or in the --raw format, for that matter) in addition to and separately from the diff against the specified stage (defaulting to #2) for unmerged paths, they should not be counted in the total number of files affected---that would lead to counting the same path twice. The separation done by the previous step makes this fix simple and straightforward. Among the filepairs in diff_queue, paths that weren't modified, and the extra "unmerged" entries do not count as total number of files. Signed-off-by: Junio C Hamano <gitster@pobox.com>
2012-11-27diff --stat: move the "total count" logic to the last loopLibravatar Junio C Hamano2-10/+13
The diffstat generation logic, with --stat-count limit, is implemented as three loops. - The first counts the width necessary to show stats up to specified number of entries, and notes up to how many entries in the data we need to iterate to show the graph; - The second iterates that many times to draw the graph, adjusts the number of "total modified files", and counts the total added/deleted lines for the part that was shown in the graph; - The third iterates over the remainder and only does the part to count "total added/deleted lines" and to adjust "total modified files" without drawing anything. Move the logic to count added/deleted lines and modified files from the second loop to the third loop. This incidentally fixes a bug. The third loop was not filtering binary changes (counted in bytes) from the total added/deleted as it should. The second loop implemented this correctly, so if a binary change appeared earlier than the --stat-count cutoff, the code counted number of added/deleted lines correctly, but if it appeared beyond the cutoff, the number of lines would have mixed with the byte count in the buggy third loop. Signed-off-by: Junio C Hamano <gitster@pobox.com>