summaryrefslogtreecommitdiff
AgeCommit message (Collapse)AuthorFilesLines
2011-07-06Fix prefix handling in ref iteration functionsLibravatar Josh Triplett1-4/+4
The do_for_each_ref iteration function accepts a prefix and a trim, and checks for the prefix on each ref before passing in that ref; it also supports trimming off part of the ref before passing it. However, do_for_each_ref used trim as the length of the prefix to check, ignoring the actual length of the prefix. Switch to using prefixcmp, checking the entire length of the prefix string, to properly support a trim value different than the length of the prefix. Several callers passed a prefix of "refs/" to filter out everything outside of refs/, but a trim of 0 to avoid trimming off the "refs/"; the trim of 0 meant that the filter of "refs/" no longer applied. Change these callers to pass an empty prefix instead, to avoid changing the existing behavior. Various callers count on this lack of filtering, such as receive-pack which uses add_extra_ref to add alternates as refs named ".have"; adding filtering would break that, causing t5501-fetch-push-alternates.sh to fail. That lack of filtering doesn't currently have any other effect, since the loose ref functions can never supply refs outside of "refs/", and packed-refs will not normally include such refs unless manually edited. Signed-off-by: Josh Triplett <josh@joshtriplett.org> Signed-off-by: Jamey Sharp <jamey@minilop.net> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2011-05-23Update 1.7.6 draft release notesLibravatar Junio C Hamano1-1/+29
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2011-05-23Merge branch 'tr/add-i-no-escape'Libravatar Junio C Hamano1-0/+19
* tr/add-i-no-escape: add -i: ignore terminal escape sequences
2011-05-23Merge branch 'jm/maint-diff-words-with-sbe'Libravatar Junio C Hamano2-2/+36
* jm/maint-diff-words-with-sbe: do not read beyond end of malloc'd buffer
2011-05-23Merge branch 'js/mingw-shutdown'Libravatar Junio C Hamano2-0/+10
* js/mingw-shutdown: Windows: add a wrapper for the shutdown() system call
2011-05-23Merge branch 'ms/ls-remote-exit-with-status'Libravatar Junio C Hamano3-3/+40
* ms/ls-remote-exit-with-status: ls-remote: the --exit-code option reports "no matching refs"
2011-05-23Merge branch 'mg/config-symbolic-constants'Libravatar Junio C Hamano4-21/+38
* mg/config-symbolic-constants: config: Give error message when not changing a multivar config: define and document exit codes
2011-05-23Merge branch 'ab/i18n-scripts-basic'Libravatar Junio C Hamano7-1/+602
* ab/i18n-scripts-basic: Makefile: add xgettext target for *.sh files git-sh-i18n.sh: add GIT_GETTEXT_POISON support git-sh-i18n.sh: add no-op gettext() and eval_gettext() wrappers git-sh-i18n--envsubst: our own envsubst(1) for eval_gettext()
2011-05-23Merge branch 'jc/magic-pathspec'Libravatar Junio C Hamano10-31/+276
* jc/magic-pathspec: setup.c: Fix some "symbol not declared" sparse warnings t3703: Skip tests using directory name ":" on Windows revision.c: leave a note for "a lone :" enhancement t3703, t4208: add test cases for magic pathspec rev/path disambiguation: further restrict "misspelled index entry" diag fix overslow :/no-such-string-ever-existed diagnostics fix overstrict :<path> diagnosis grep: use get_pathspec() correctly pathspec: drop "lone : means no pathspec" from get_pathspec() Revert "magic pathspec: add ":(icase)path" to match case insensitively" magic pathspec: add ":(icase)path" to match case insensitively magic pathspec: futureproof shorthand form magic pathspec: add tentative ":/path/from/top/level" pathspec support
2011-05-23Merge branch 'jk/blame-line-porcelain'Libravatar Junio C Hamano4-10/+131
* jk/blame-line-porcelain: blame: add --line-porcelain output format blame: refactor porcelain output add tests for various blame formats
2011-05-20Merge branch 'maint'Libravatar Junio C Hamano2-1/+16
* maint: git-svn: Fix git svn log --show-commit
2011-05-20do not read beyond end of malloc'd bufferLibravatar Jim Meyering2-2/+36
With diff.suppress-blank-empty=true, "git diff --word-diff" would output data that had been read from uninitialized heap memory. The problem was that fn_out_consume did not account for the possibility of a line with length 1, i.e., the empty context line that diff.suppress-blank-empty=true converts from " \n" to "\n". Since it assumed there would always be a prefix character (the space), it decremented "len" unconditionally, thus passing len=0 to emit_line, which would then blindly call emit_line_0 with len=-1 which would pass that value on to fwrite as SIZE_MAX. Boom. Signed-off-by: Jim Meyering <meyering@redhat.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2011-05-20git-svn: Fix git svn log --show-commitLibravatar Michael J Gruber2-1/+16
git svn log --show-commit had no tests and, consequently, no attention by the author of b1b4755 (git-log: put space after commit mark, 2011-03-10) who kept git svn log working only without --show-commit. Introduce a test and fix it. Reported-by: Bernt Hansen <bernt@norang.ca> Signed-off-by: Michael J Gruber <git@drmicha.warpmail.net> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2011-05-19Update draft release notes to 1.7.6Libravatar Junio C Hamano1-1/+22
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2011-05-19Merge branch 'jc/maint-1.7.4-pathspec-stdin-and-cmdline'Libravatar Junio C Hamano0-0/+0
* jc/maint-1.7.4-pathspec-stdin-and-cmdline:
2011-05-19Merge branch 'rg/copy-gecos-username'Libravatar Junio C Hamano1-0/+1
* rg/copy-gecos-username: copy_gecos: fix not adding nlen to len when processing "&"
2011-05-19Merge branch 'jl/submodule-conflicted-gitmodules'Libravatar Junio C Hamano2-6/+117
* jl/submodule-conflicted-gitmodules: Submodules: Don't parse .gitmodules when it contains, merge conflicts test that git status works with merge conflict in, .gitmodules
2011-05-19Merge branch 'jc/replacing'Libravatar Junio C Hamano8-23/+45
* jc/replacing: read_sha1_file(): allow selective bypassing of replacement mechanism inline lookup_replace_object() calls read_sha1_file(): get rid of read_sha1_file_repl() madness t6050: make sure we test not just commit replacement Declare lookup_replace_object() in cache.h, not in commit.h Conflicts: environment.c
2011-05-19Merge branch 'nd/sparse-co-fix'Libravatar Junio C Hamano2-33/+83
* nd/sparse-co-fix: sparse checkout: do not eagerly decide the fate for whole directory t1011: fix sparse-checkout initialization and add new file
2011-05-19Merge branch 'ld/p4-preserve-user-names'Libravatar Junio C Hamano3-38/+340
* ld/p4-preserve-user-names: git-p4: warn if git authorship won't be retained git-p4: small improvements to user-preservation git-p4: add option to preserve user names
2011-05-19Merge branch 'ms/tagname-does-not-begin-with-dash'Libravatar Junio C Hamano1-8/+18
* ms/tagname-does-not-begin-with-dash: tag: disallow '-' as tag name
2011-05-19Merge branch 'jk/git-connection-deadlock-fix'Libravatar Junio C Hamano4-14/+67
* jk/git-connection-deadlock-fix: test core.gitproxy configuration send-pack: avoid deadlock on git:// push with failed pack-objects connect: let callers know if connection is a socket connect: treat generic proxy processes like ssh processes Conflicts: connect.c
2011-05-19Merge branch 'js/maint-send-pack-stateless-rpc-deadlock-fix'Libravatar Junio C Hamano1-2/+2
* js/maint-send-pack-stateless-rpc-deadlock-fix: sideband_demux(): fix decl-after-stmt
2011-05-19Merge branch 'jk/cherry-pick-root-with-resolve'Libravatar Junio C Hamano3-7/+36
* jk/cherry-pick-root-with-resolve: t3503: test cherry picking and reverting root commits revert: allow reverting a root commit cherry-pick: handle root commits with external strategies
2011-05-19Merge branch 'jc/maint-pathspec-stdin-and-cmdline'Libravatar Junio C Hamano2-52/+45
* jc/maint-pathspec-stdin-and-cmdline: setup_revisions(): take pathspec from command line and --stdin correctly Conflicts: revision.c
2011-05-19Merge 1.7.5.2 inLibravatar Junio C Hamano2-1/+513
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2011-05-19Revert "Merge branch 'en/merge-recursive'"Libravatar Junio C Hamano2-81/+6
As the band-aid to merge-recursive seems to regress complex merges in an unpleasant way. The merge-recursive implementation needs to be rewritten in such a way that it resolves renames and D/F conflicts entirely in-core and not to touch working tree at all while doing so. But in the meantime, this reverts commit ac9666f84 that merged the topic in its entirety.
2011-05-19Git 1.7.5.2Libravatar Junio C Hamano2-2/+3
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2011-05-19Makefile: sort TEST_PROGRAMS listLibravatar Jeff King1-2/+2
We usually keep these lists in sorted order, but the last few entries were just tacked on the end. Signed-off-by: Jeff King <peff@peff.net> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2011-05-19provide a copy of the LGPLv2.1Libravatar Jonathan Nieder1-0/+511
The LGPL seems to require providing a copy of the license when distributing xdiff, compat/fnmatch, and so on, or altering the license notices to refer to the GPL intead. Since we don't want to do the latter, let's do the former. It's nice to let people know their rights anyway. Inspired-by: Erik Faye-Lund <kusmabite@gmail.com> Signed-off-by: Jonathan Nieder <jrnieder@gmail.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2011-05-18ls-remote: the --exit-code option reports "no matching refs"Libravatar Michael Schubert3-3/+40
The "git ls-remote" uses its exit status to indicate if it successfully talked with the remote repository. A new option "--exit-code" makes the command exit with status "2" when there is no refs to be listed, even when the command successfully talked with the remote repository. This way, the caller can tell if we failed to contact the remote, or the remote did not have what we wanted to see. Of course, you can inspect the output from the command, which has been and will continue to be a valid way to check the same thing. Signed-off-by: Michael Schubert <mschub@elegosoft.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2011-05-18Windows: add a wrapper for the shutdown() system callLibravatar Johannes Sixt2-0/+10
Even though Windows's socket functions look like their POSIX counter parts, they do not operate on file descriptors, but on "socket objects". To bring the functions in line with POSIX, we have proxy functions that wrap and unwrap the socket objects in file descriptors using open_osfhandle and get_osfhandle. But shutdown() was not proxied, yet. Fix this. Signed-off-by: Johannes Sixt <j6t@kdbg.org> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2011-05-18test core.gitproxy configurationLibravatar Jeff King1-0/+43
This is just a basic sanity test to see whether core.gitproxy works at all. Until now, we were not testing anywhere. Signed-off-by: Jeff King <peff@peff.net> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2011-05-17copy_gecos: fix not adding nlen to len when processing "&"Libravatar Rafael Gieschke1-0/+1
nlen has to be added to len when inserting (capitalized) pw_name as substitution for "&" in pw_gecos. Otherwise, pw_gecos will be truncated and data might be written beyond name+sz. Signed-off-by: Rafael Gieschke <rafael@gieschke.de> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2011-05-17setup.c: Fix some "symbol not declared" sparse warningsLibravatar Ramsay Jones1-2/+2
In particular, sparse issues the "symbol 'a_symbol' was not declared. Should it be static?" warnings for the following symbols: setup.c:159:3: 'pathspec_magic' setup.c:176:12: 'prefix_pathspec' These symbols only require file scope, so we add the static modifier to their declarations. Signed-off-by: Ramsay Jones <ramsay@ramsay1.demon.co.uk> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2011-05-17config: Give error message when not changing a multivarLibravatar Michael J Gruber1-1/+6
When trying to set a multivar with "git config var value", "git config" issues warning: remote.repoor.push has multiple values leaving the user under the impression that the operation succeeded, unless one checks the return value. Instead, make it warning: remote.repoor.push has multiple values error: cannot overwrite multiple values with a single value Use a regexp, --add or --set-all to change remote.repoor.push. to be clear and helpful. Note: The "warning" is raised through other code paths also so that it needs to remain a warning for these (which do not raise the error). Only the caller can determine how to go on from that. Signed-off-by: Michael J Gruber <git@drmicha.warpmail.net> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2011-05-17config: define and document exit codesLibravatar Michael J Gruber3-20/+32
The return codes of git_config_set() and friends are magic numbers right in the source. #define them in cache.h where the functions are declared, and use the constants in the source. Also, mention the resulting exit codes of "git config" in its man page (and complete the list). Signed-off-by: Michael J Gruber <git@drmicha.warpmail.net> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2011-05-17add -i: ignore terminal escape sequencesLibravatar Thomas Rast1-0/+19
On the author's terminal, the up-arrow input sequence is ^[[A, and thus fat-fingering an up-arrow into 'git checkout -p' is quite dangerous: git-add--interactive.perl will ignore the ^[ and [ characters and happily treat A as "discard everything". As a band-aid fix, use Term::Cap to get all terminal capabilities. Then use the heuristic that any capability value that starts with ^[ (i.e., \e in perl) must be a key input sequence. Finally, given an input that starts with ^[, read more characters until we have read a full escape sequence, then return that to the caller. We use a timeout of 0.5 seconds on the subsequent reads to avoid getting stuck if the user actually input a lone ^[. Since none of the currently recognized keys start with ^[, the net result is that the sequence as a whole will be ignored and the help displayed. Signed-off-by: Thomas Rast <trast@student.ethz.ch> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2011-05-16Update release notes to 1.7.6Libravatar Junio C Hamano1-13/+20
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2011-05-16Merge branch 'js/maint-1.6.6-send-pack-stateless-rpc-deadlock-fix' into ↵Libravatar Junio C Hamano1-2/+2
js/maint-send-pack-stateless-rpc-deadlock-fix * js/maint-1.6.6-send-pack-stateless-rpc-deadlock-fix: sideband_demux(): fix decl-after-stmt
2011-05-16Merge branch 'jc/convert'Libravatar Junio C Hamano4-90/+84
* jc/convert: convert: make it harder to screw up adding a conversion attribute convert: make it safer to add conversion attributes convert: give saner names to crlf/eol variables, types and functions convert: rename the "eol" global variable to "core_eol"
2011-05-16Merge branch 'ci/commit--interactive-atomic'Libravatar Junio C Hamano6-31/+75
* ci/commit--interactive-atomic: Test atomic git-commit --interactive Add commit to list of config.singlekey commands Add support for -p/--patch to git-commit Allow git commit --interactive with paths t7501.8: feed a meaningful command Use a temporary index for git commit --interactive
2011-05-16Merge branch 'sg/completion-updates'Libravatar Junio C Hamano1-4/+16
* sg/completion-updates: Revert "completion: don't declare 'local words' to make zsh happy" git-completion: fix regression in zsh support completion: move private shopt shim for zsh to __git_ namespace completion: don't declare 'local words' to make zsh happy
2011-05-16Merge branch 'kk/maint-prefix-in-config-mak'Libravatar Junio C Hamano1-9/+9
* kk/maint-prefix-in-config-mak: Honor $(prefix) set in config.mak* when defining ETC_GIT* Revert "Honor $(prefix) set in config.mak* when defining ETC_GIT* and sysconfdir" Honor $(prefix) set in config.mak* when defining ETC_GIT* and sysconfdir
2011-05-16Merge branch 'mg/merge-ff-config'Libravatar Junio C Hamano3-6/+77
* mg/merge-ff-config: tests: check git does not barf on merge.ff values for future versions of git merge: introduce merge.ff configuration variable Conflicts: t/t7600-merge.sh
2011-05-16Merge branch 'maint'Libravatar Junio C Hamano2-2/+17
* maint: Update draft release notes to 1.7.5.2 Documentation/git-fsck.txt: fix typo: unreadable -> unreachable
2011-05-16Update draft release notes to 1.7.5.2Libravatar Junio C Hamano1-0/+15
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2011-05-16Merge branch 'jn/maint-format-patch-doc' into maintLibravatar Junio C Hamano1-0/+58
* jn/maint-format-patch-doc: Documentation: describe the format of messages with inline patches
2011-05-16Merge branch 'ss/cherry-pick-x-doc' into maintLibravatar Junio C Hamano1-3/+4
* ss/cherry-pick-x-doc: doc: Clarify that "cherry-pick -x" does not use "git notes"
2011-05-16Merge branch 'vr/merge-base-doc' into maintLibravatar Junio C Hamano2-14/+23
* vr/merge-base-doc: Restructure documentation for git-merge-base. Documentation: update to git-merge-base --octopus