summaryrefslogtreecommitdiff
AgeCommit message (Collapse)AuthorFilesLines
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-28Start preparing for 1.8.0.2Libravatar Junio C Hamano2-1/+16
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-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-27Documentation: improve phrasing in git-push.txtLibravatar Mark Szepieniec1-1/+2
The current version contains the sentence: Further suppose that the other person already pushed changes leading to A back to the original repository you two obtained the original commit X. which doesn't parse for me; I've changed it to Further suppose that the other person already pushed changes leading to A back to the original repository from which you two obtained the original commit X. Signed-off-by: Mark Szepieniec <mszepien@gmail.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2012-11-26Fix typo in remote set-head usageLibravatar Antoine Pelisse1-1/+1
parenthesis are not matching in `builtin_remote_sethead_usage` as a square bracket is closing something never opened. Signed-off-by: Antoine Pelisse <apelisse@gmail.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2012-11-26Makefile: hide stderr of curl-config testLibravatar Paul Gortmaker1-1/+1
You will get $ make distclean 2>&1 | grep curl /bin/sh: curl-config: not found /bin/sh: curl-config: not found /bin/sh: curl-config: not found /bin/sh: curl-config: not found /bin/sh: curl-config: not found $ if you don't have a curl development package installed. The intent is not to alarm the user, but just to test if there is a new enough curl installed. However, if you look at search engine suggested completions, the above "error" messages are confusing people into thinking curl is a hard requirement. Redirect this error output to /dev/null as it is not necessary to be shown to the end users. Signed-off-by: Paul Gortmaker <paul.gortmaker@windriver.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2012-11-25Git 1.8.0.1Libravatar Junio C Hamano3-3/+16
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2012-11-25Merge branch 'jk/checkout-out-of-unborn' into maintLibravatar Junio C Hamano1-0/+3
* jk/checkout-out-of-unborn: checkout: print a message when switching unborn branches
2012-11-25Merge branch 'cn/config-missing-path' into maintLibravatar Junio C Hamano2-1/+7
* cn/config-missing-path: config: don't segfault when given --path with a missing value
2012-11-25Merge branch 'jk/maint-gitweb-xss' into maintLibravatar Junio C Hamano2-0/+16
Fixes an XSS vulnerability in gitweb. * jk/maint-gitweb-xss: gitweb: escape html in rss title
2012-11-24Completion must sort before using uniqLibravatar Marc Khouzam1-1/+1
The user can be presented with invalid completion results when trying to complete a 'git checkout' command. This can happen when using a branch name prefix that matches multiple remote branches. For example, if available branches are: master remotes/GitHub/maint remotes/GitHub/master remotes/origin/maint remotes/origin/master When performing completion on 'git checkout ma' the user will be given the choices: maint master However, 'git checkout maint' will fail in this case, although completion previously said 'maint' was valid. Furthermore, when performing completion on 'git checkout mai', no choices will be suggested. So, the user is first told that the branch name 'maint' is valid, but when trying to complete 'mai' into 'maint', that completion is no longer valid. The completion results should never propose 'maint' as a valid branch name, since 'git checkout' will refuse it. The reason for this bug is that the uniq program only works with sorted input. The man page states "uniq prints the unique lines in a sorted file". When __git_refs uses the guess heuristic employed by checkout for tracking branches it wants to consider remote branches but only if the branch name is unique. To do that, it calls 'uniq -u'. However the input given to 'uniq -u' is not sorted. Therefore, in the above example, when dealing with 'git checkout ma', "__git_refs '' 1" will find the following list: master maint master maint master which, when passed to 'uniq -u' will remain the same. Therefore 'maint' will be wrongly suggested as a valid option. When dealing with 'git checkout mai', the list will be: maint maint which happens to be sorted and will be emptied by 'uniq -u', properly ignoring 'maint'. A solution for preventing the completion script from suggesting such invalid branch names is to first call 'sort' and then 'uniq -u'. Signed-off-by: Marc Khouzam <marc.khouzam@gmail.com> Reviewed-by: Felipe Contreras <felipe.contreras@gmail.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2012-11-20compat/fnmatch: fix off-by-one character class's length checkLibravatar Nguyễn Thái Ngọc Duy1-1/+1
Character class "xdigit" is the only one that hits 6 character limit defined by CHAR_CLASS_MAX_LENGTH. All other character classes are 5 character long and therefore never caught by this. This should make xdigit tests in t3070 pass on Windows. Reported-by: Johannes Sixt <j6t@kdbg.org> Signed-off-by: Nguyễn Thái Ngọc Duy <pclouds@gmail.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2012-11-20Further preparation for 1.8.0.1Libravatar Junio C Hamano1-1/+7
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2012-11-20Merge branch 'mg/maint-pull-suggest-upstream-to' into maintLibravatar Junio C Hamano1-1/+1
* mg/maint-pull-suggest-upstream-to: push/pull: adjust missing upstream help text to changed interface
2012-11-20Merge branch 'mm/maint-doc-commit-edit' into maintLibravatar Junio C Hamano1-0/+5
* mm/maint-doc-commit-edit: Document 'git commit --no-edit' explicitly
2012-11-20Merge branch 'as/maint-doc-fix-no-post-rewrite' into maintLibravatar Junio C Hamano1-4/+3
* as/maint-doc-fix-no-post-rewrite: commit: fixup misplacement of --no-post-rewrite description
2012-11-20Merge branch 'rs/lock-correct-ref-during-delete' into maintLibravatar Junio C Hamano1-13/+5
* rs/lock-correct-ref-during-delete: refs: lock symref that is to be deleted, not its target
2012-11-20Merge branch 'rf/maint-mailmap-off-by-one' into maintLibravatar Junio C Hamano1-1/+1
* rf/maint-mailmap-off-by-one: mailmap: avoid out-of-bounds memory access
2012-11-20Merge branch 'jk/maint-diff-grep-textconv' into maintLibravatar Junio C Hamano2-2/+14
"git diff -G<pattern>" did not honor textconv filter when looking for changes. * jk/maint-diff-grep-textconv: diff_grep: use textconv buffers for add/deleted files
2012-11-20Merge branch 'js/format-2047' into maintLibravatar Junio C Hamano5-126/+262
Various rfc2047 quoting issues around a non-ASCII name on the From: line in the output from format-patch have been corrected. * js/format-2047: format-patch tests: check quoting/encoding in To: and Cc: headers format-patch: fix rfc2047 address encoding with respect to rfc822 specials format-patch: make rfc2047 encoding more strict format-patch: introduce helper function last_line_length() format-patch: do not wrap rfc2047 encoded headers too late format-patch: do not wrap non-rfc2047 headers too early utf8: fix off-by-one wrapping of text
2012-11-18Start preparing for 1.8.0.1Libravatar Junio C Hamano2-1/+47
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2012-11-18Merge branch 'sz/maint-curl-multi-timeout' into maintLibravatar Junio C Hamano1-0/+12
Sometimes curl_multi_timeout() function suggested a wrong timeout value when there is no file descriptors to wait on and the http transport ended up sleeping for minutes in select(2) system call. A workaround has been added for this. * sz/maint-curl-multi-timeout: Fix potential hang in https handshake
2012-11-18Merge branch 'po/maint-refs-replace-docs' into maintLibravatar Junio C Hamano1-0/+6
The refs/replace hierarchy was not mentioned in the repository-layout docs. * po/maint-refs-replace-docs: Doc repository-layout: Show refs/replace
2012-11-18Merge branch 'ph/pull-rebase-detached' into maintLibravatar Junio C Hamano1-0/+1
"git pull --rebase" run while the HEAD is detached tried to find the upstream branch of the detached HEAD (which by definition does not exist) and emitted unnecessary error messages. * ph/pull-rebase-detached: git-pull: Avoid merge-base on detached head
2012-11-18Merge branch 'mm/maint-doc-remote-tracking' into maintLibravatar Junio C Hamano4-6/+6
Update "remote tracking branch" in the documentation to "remote-tracking branch". * mm/maint-doc-remote-tracking: Documentation: remote tracking branch -> remote-tracking branch
2012-11-18Merge branch 'rs/branch-del-symref' into maintLibravatar Junio C Hamano2-26/+68
A symbolic ref refs/heads/SYM was not correctly removed with "git branch -d SYM"; the command removed the ref pointed by SYM instead. * rs/branch-del-symref: branch: show targets of deleted symrefs, not sha1s branch: skip commit checks when deleting symref branches branch: delete symref branch, not its target branch: factor out delete_branch_config() branch: factor out check_branch_commit()
2012-11-18Merge branch 'nd/grep-true-path' into maintLibravatar Junio C Hamano4-17/+51
"git grep -e pattern <tree>" asked the attribute system to read "<tree>:.gitattributes" file in the working tree, which was nonsense. * nd/grep-true-path: grep: stop looking at random places for .gitattributes
2012-11-18Merge branch 'jc/grep-pcre-loose-ends' (early part) into maintLibravatar Junio C Hamano5-128/+204
"git log -F -E --grep='<ere>'" failed to use the given <ere> pattern as extended regular expression, and instead looked for the string literally. * 'jc/grep-pcre-loose-ends' (early part): log --grep: use the same helper to set -E/-F options as "git grep" revisions: initialize revs->grep_filter using grep_init() grep: move pattern-type bits support to top-level grep.[ch] grep: move the configuration parsing logic to grep.[ch] builtin/grep.c: make configuration callback more reusable
2012-11-18Merge branch 'da/mergetools-p4' into maintLibravatar Junio C Hamano1-0/+25
"git mergetool" feeds /dev/null as a common ancestor when dealing with an add/add conflict, but p4merge backend cannot handle it. Work it around by passing a temporary empty file. * da/mergetools-p4: mergetools/p4merge: Handle "/dev/null"
2012-11-18Merge branch 'jc/test-say-color-avoid-echo-escape' into maintLibravatar Junio C Hamano1-1/+1
The "say" function in the test scaffolding incorrectly allowed "echo" to interpret "\a" as if it were a C-string asking for a BEL output. * jc/test-say-color-avoid-echo-escape: test-lib: Fix say_color () not to interpret \a\b\c in the message
2012-11-18Merge branch 'bw/config-lift-variable-name-length-limit' into maintLibravatar Junio C Hamano1-30/+29
The configuration parser had an unnecessary hardcoded limit on variable names that was not checked consistently. * bw/config-lift-variable-name-length-limit: Remove the hard coded length limit on variable names in config files
2012-11-15config: don't segfault when given --path with a missing valueLibravatar Carlos Martín Nieto2-1/+7
When given a variable without a value, such as '[section] var' and asking git-config to treat it as a path, git_config_pathname returns an error and doesn't modify its output parameter. show_config assumes that the call is always successful and sets a variable to indicate that vptr should be freed. In case of an error however, trying to do this will cause the program to be killed, as it's pointing to memory in the stack. Detect the error and return immediately to avoid freeing or accessing the uninitialed memory in the stack. Signed-off-by: Carlos Martín Nieto <cmn@elego.de> Acked-by: Jeff King <peff@peff.net> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2012-11-15checkout: print a message when switching unborn branchesLibravatar Jeff King1-0/+3
When we switch to a new branch using checkout, we usually output a message indicating what happened. However, when we switch from an unborn branch to a new branch, we do not print anything, which may leave the user wondering what happened. The reason is that the unborn branch is a special case (see abe1998), and does not follow the usual switch_branches code path. Let's add a similar informational message to the special case to match the usual code path. Signed-off-by: Jeff King <peff@peff.net> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2012-11-12gitweb: escape html in rss titleLibravatar Jeff King2-0/+16
The title of an RSS feed is generated from many components, including the filename provided as a query parameter, but we failed to quote it. Besides showing the wrong output, this is a vector for XSS attacks. Signed-off-by: Jeff King <peff@peff.net>
2012-11-08doc/fast-import: clarify how content states are builtLibravatar Eric S. Raymond1-2/+6
Signed-off-by: Eric S. Raymond <esr@thyrsus.com> Signed-off-by: Jeff King <peff@peff.net>
2012-11-08gitweb.perl: fix %highlight_ext mappingsLibravatar Richard Hubbell1-9/+8
When commit 592ea41 refactored the list of extensions for syntax highlighting, it failed to take into account perl's operator precedence within lists. As a result, we end up creating a dictionary of one-to-one elements when the intent was to map mutliple related types to one main type (e.g., bash, ksh, zsh, and sh should all map to sh since they share similar syntax, but we ended up just mapping "bash" to "bash" and so forth). This patch adds parentheses to make the mapping as the original change intended. It also reorganizes the list to keep mapped extensions together. Signed-off-by: Richard Hubbell <richard_hubbe11@lavabit.com> Signed-off-by: Jeff King <peff@peff.net>
2012-11-08git p4: RCS expansion should not span newlinesLibravatar Pete Wyckoff2-1/+20
This bug was introduced in cb585a9 (git-p4: keyword flattening fixes, 2011-10-16). The newline character is indeed special, and $File$ expansions should not try to match across multiple lines. Based-on-patch-by: Chris Goard <cgoard@gmail.com> Signed-off-by: Pete Wyckoff <pw@padd.com> Signed-off-by: Jeff King <peff@peff.net>
2012-11-08push/pull: adjust missing upstream help text to changed interfaceLibravatar Michael J Gruber1-1/+1
In case of a missing upstream, the git-parse-remote script suggests: If you wish to set tracking information for this branch you can do so with: git branch --set-upstream nsiv2 origin/<branch> But --set-upstream is deprectated. Change the suggestion to: git branch --set-upstream-to=origin/<branch> nsiv2 Reported-by: Jeroen van der Ham <vdham@uva.nl> Signed-off-by: Michael J Gruber <git@drmicha.warpmail.net> Signed-off-by: Jeff King <peff@peff.net>
2012-11-02commit: fixup misplacement of --no-post-rewrite descriptionLibravatar Andreas Schwab1-4/+3
In e858af6 (commit: document a couple of options) the description of the --no-post-rewrite option was put inside the paragraph for the --amend option. Move it down after the paragraph. Signed-off-by: Andreas Schwab <schwab@linux-m68k.org> Signed-off-by: Jeff King <peff@peff.net>
2012-11-02Document 'git commit --no-edit' explicitlyLibravatar Matthieu Moy1-0/+5
Signed-off-by: Matthieu Moy <Matthieu.Moy@imag.fr> Signed-off-by: Jeff King <peff@peff.net>
2012-10-28diff_grep: use textconv buffers for add/deleted filesLibravatar Jeff King2-2/+14
If you use "-G" to grep a diff, we will apply a configured textconv filter to the data before generating the diff. However, if the diff is an addition or deletion, we do not bother running the diff at all, and just look for the token in the added (or removed) content. This works because we know that the diff must contain every line of content. However, while we used the textconv-derived buffers in the regular diff, we accidentally passed the original unmodified buffers to regexec when checking the added or removed content. This could lead to an incorrect answer. Worse, in some cases we might have a textconv buffer but no original buffer (e.g., if we pulled the textconv data from cache, or if we reused a working tree file when generating it). In that case, we could actually feed NULL to regexec and segfault. Reported-by: Peter Oberndorfer <kumbayo84@arcor.de> Signed-off-by: Jeff King <peff@peff.net>
2012-10-28mailmap: avoid out-of-bounds memory accessLibravatar Romain Francoise1-1/+1
AddressSanitizer (http://clang.llvm.org/docs/AddressSanitizer.html) complains of a one-byte buffer underflow in parse_name_and_email() while running the test suite. And indeed, if one of the lines in the mailmap begins with '<', we dereference the address just before the beginning of the buffer when looking for whitespace to remove, before checking that we aren't going too far. So reverse the order of the tests to make sure that we don't read outside the buffer. Signed-off-by: Romain Francoise <romain@orebokech.com> Signed-off-by: Jeff King <peff@peff.net>
2012-10-25Doc repository-layout: Show refs/replaceLibravatar Philip Oakley1-0/+6
Signed-off-by: Philip Oakley <philipoakley@iee.org> Signed-off-by: Jeff King <peff@peff.net>
2012-10-25Documentation: remote tracking branch -> remote-tracking branchLibravatar Matthieu Moy4-6/+6
This change was already done by 0e615b252f3 (Matthieu Moy, Tue Nov 2 2010, Replace "remote tracking" with "remote-tracking"), but new instances of remote tracking (without dash) were introduced in the meantime. Signed-off-by: Matthieu Moy <Matthieu.Moy@imag.fr> Signed-off-by: Jeff King <peff@peff.net>