- 26 11月, 2012 4 次提交
-
-
由 Junio C Hamano 提交于
Signed-off-by: NJunio C Hamano <gitster@pobox.com>
-
由 Junio C Hamano 提交于
* jk/checkout-out-of-unborn: checkout: print a message when switching unborn branches
-
由 Junio C Hamano 提交于
* cn/config-missing-path: config: don't segfault when given --path with a missing value
-
由 Junio C Hamano 提交于
Fixes an XSS vulnerability in gitweb. * jk/maint-gitweb-xss: gitweb: escape html in rss title
-
- 25 11月, 2012 1 次提交
-
-
由 Marc Khouzam 提交于
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: NMarc Khouzam <marc.khouzam@gmail.com> Reviewed-by: NFelipe Contreras <felipe.contreras@gmail.com> Signed-off-by: NJunio C Hamano <gitster@pobox.com>
-
- 21 11月, 2012 8 次提交
-
-
由 Junio C Hamano 提交于
Signed-off-by: NJunio C Hamano <gitster@pobox.com>
-
由 Junio C Hamano 提交于
* mg/maint-pull-suggest-upstream-to: push/pull: adjust missing upstream help text to changed interface
-
由 Junio C Hamano 提交于
* mm/maint-doc-commit-edit: Document 'git commit --no-edit' explicitly
-
由 Junio C Hamano 提交于
* as/maint-doc-fix-no-post-rewrite: commit: fixup misplacement of --no-post-rewrite description
-
由 Junio C Hamano 提交于
* rs/lock-correct-ref-during-delete: refs: lock symref that is to be deleted, not its target
-
由 Junio C Hamano 提交于
* rf/maint-mailmap-off-by-one: mailmap: avoid out-of-bounds memory access
-
由 Junio C Hamano 提交于
"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
-
由 Junio C Hamano 提交于
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
-
- 19 11月, 2012 11 次提交
-
-
由 Junio C Hamano 提交于
Signed-off-by: NJunio C Hamano <gitster@pobox.com>
-
由 Junio C Hamano 提交于
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
-
由 Junio C Hamano 提交于
The refs/replace hierarchy was not mentioned in the repository-layout docs. * po/maint-refs-replace-docs: Doc repository-layout: Show refs/replace
-
由 Junio C Hamano 提交于
"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
-
由 Junio C Hamano 提交于
Update "remote tracking branch" in the documentation to "remote-tracking branch". * mm/maint-doc-remote-tracking: Documentation: remote tracking branch -> remote-tracking branch
-
由 Junio C Hamano 提交于
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()
-
由 Junio C Hamano 提交于
"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
-
由 Junio C Hamano 提交于
"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
-
由 Junio C Hamano 提交于
"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"
-
由 Junio C Hamano 提交于
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
-
由 Junio C Hamano 提交于
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
-
- 16 11月, 2012 2 次提交
-
-
由 Carlos Martín Nieto 提交于
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: NCarlos Martín Nieto <cmn@elego.de> Acked-by: NJeff King <peff@peff.net> Signed-off-by: NJunio C Hamano <gitster@pobox.com>
-
由 Jeff King 提交于
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 abe19980), 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: NJeff King <peff@peff.net> Signed-off-by: NJunio C Hamano <gitster@pobox.com>
-
- 13 11月, 2012 1 次提交
-
-
由 Jeff King 提交于
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: NJeff King <peff@peff.net>
-
- 09 11月, 2012 1 次提交
-
-
由 Michael J Gruber 提交于
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: NJeroen van der Ham <vdham@uva.nl> Signed-off-by: NMichael J Gruber <git@drmicha.warpmail.net> Signed-off-by: NJeff King <peff@peff.net>
-
- 02 11月, 2012 2 次提交
-
-
由 Andreas Schwab 提交于
In e858af6d (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: NAndreas Schwab <schwab@linux-m68k.org> Signed-off-by: NJeff King <peff@peff.net>
-
由 Matthieu Moy 提交于
Signed-off-by: NMatthieu Moy <Matthieu.Moy@imag.fr> Signed-off-by: NJeff King <peff@peff.net>
-
- 28 10月, 2012 2 次提交
-
-
由 Jeff King 提交于
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: NPeter Oberndorfer <kumbayo84@arcor.de> Signed-off-by: NJeff King <peff@peff.net>
-
由 Romain Francoise 提交于
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: NRomain Francoise <romain@orebokech.com> Signed-off-by: NJeff King <peff@peff.net>
-
- 25 10月, 2012 3 次提交
-
-
由 Philip Oakley 提交于
Signed-off-by: NPhilip Oakley <philipoakley@iee.org> Signed-off-by: NJeff King <peff@peff.net>
-
由 Matthieu Moy 提交于
This change was already done by 0e615b25 (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: NMatthieu Moy <Matthieu.Moy@imag.fr> Signed-off-by: NJeff King <peff@peff.net>
-
由 Phil Hord 提交于
git pull --rebase does some clever tricks to find the base for $upstream, but it forgets that we may not have any branch at all. When this happens, git merge-base reports its "usage" help in the middle of an otherwise successful rebase operation, because git-merge is called with one too few parameters. Since we do not need the merge-base trick in the case of a detached HEAD, detect this condition and bypass the clever trick and the usage noise. Signed-off-by: NPhil Hord <hordp@cisco.com> Signed-off-by: NJeff King <peff@peff.net>
-
- 22 10月, 2012 1 次提交
-
-
由 Junio C Hamano 提交于
Signed-off-by: NJunio C Hamano <gitster@pobox.com>
-
- 20 10月, 2012 1 次提交
-
-
由 Stefan Zager 提交于
It has been observed that curl_multi_timeout may return a very long timeout value (e.g., 294 seconds and some usec) just before curl_multi_fdset returns no file descriptors for reading. The upshot is that select() will hang for a long time -- long enough for an https handshake to be dropped. The observed behavior is that the git command will hang at the terminal and never transfer any data. This patch is a workaround for a probable bug in libcurl. The bug only seems to manifest around a very specific set of circumstances: - curl version (from curl/curlver.h): #define LIBCURL_VERSION_NUM 0x071307 - git-remote-https running on an ubuntu-lucid VM. - Connecting through squid proxy running on another VM. Interestingly, the problem doesn't manifest if a host connects through squid proxy running on localhost; only if the proxy is on a separate VM (not sure if the squid host needs to be on a separate physical machine). That would seem to suggest that this issue is timing-sensitive. This patch is more or less in line with a recommendation in the curl docs about how to behave when curl_multi_fdset doesn't return and file descriptors: http://curl.haxx.se/libcurl/c/curl_multi_fdset.htmlSigned-off-by: NStefan Zager <szager@google.com> Signed-off-by: NJunio C Hamano <gitster@pobox.com>
-
- 19 10月, 2012 3 次提交
-
-
由 René Scharfe 提交于
git branch reports the abbreviated hash of the head commit of a deleted branch to make it easier for a user to undo the operation. For symref branches this doesn't help. Print the symref target instead for them. Signed-off-by: NRene Scharfe <rene.scharfe@lsrfire.ath.cx> Signed-off-by: NJunio C Hamano <gitster@pobox.com>
-
由 René Scharfe 提交于
Before a branch is deleted, we check that it points to a valid commit. With -d we also check that the commit is a merged; this check is not done with -D. The reason for that is that commits pointed to by branches should never go missing; if they do then something broke and it's better to stop instead of adding to the mess. And a non-merged commit may contain changes that are worth preserving, so we require the stronger option -D instead of -d to get rid of them. If a branch consists of a symref, these concerns don't apply. Deleting such a branch can't make a commit become unreferenced, so we don't need to check if it is merged, or even if it is actually a valid commit. Skip them in that case. This allows us to delete dangling symref branches. Signed-off-by: NRene Scharfe <rene.scharfe@lsrfire.ath.cx> Signed-off-by: NJunio C Hamano <gitster@pobox.com>
-
由 René Scharfe 提交于
If a branch that is to be deleted happens to be a symref to another branch, the current code removes the targeted branch instead of the one it was called for. Change this surprising behaviour and delete the symref branch instead. Signed-off-by: NRene Scharfe <rene.scharfe@lsrfire.ath.cx> Signed-off-by: NJunio C Hamano <gitster@pobox.com>
-