aboutsummaryrefslogtreecommitdiff
Commit message (Collapse)AuthorAge
* fetch: define shallow boundary with --shallow-excludeNguyễn Thái Ngọc Duy2016-06-13
| | | | | Signed-off-by: Nguyễn Thái Ngọc Duy <pclouds@gmail.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
* upload-pack: support define shallow boundary by excluding revisionsNguyễn Thái Ngọc Duy2016-06-13
| | | | | | | | | | | | | | | This should allow the user to say "create a shallow clone of this branch after version <some-tag>". Short refs are accepted and expanded at the server side with expand_ref() because we cannot expand (unknown) refs from the client side. Like deepen-since, deepen-not cannot be used with deepen. But deepen-not can be mixed with deepen-since. The result is exactly how you do the command "git rev-list --since=... --not ref". Signed-off-by: Nguyễn Thái Ngọc Duy <pclouds@gmail.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
* refs: add expand_ref()Nguyễn Thái Ngọc Duy2016-06-13
| | | | | | | | | This is basically dwim_ref() without @{} support. To be used on the server side where we want to expand abbreviated to full ref names and nothing else. The first user is "git clone/fetch --shallow-exclude". Signed-off-by: Nguyễn Thái Ngọc Duy <pclouds@gmail.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
* t5500, t5539: tests for shallow depth since a specific dateNguyễn Thái Ngọc Duy2016-06-13
| | | | | Signed-off-by: Nguyễn Thái Ngọc Duy <pclouds@gmail.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
* clone: define shallow clone boundary based on time with --shallow-sinceNguyễn Thái Ngọc Duy2016-06-13
| | | | | Signed-off-by: Nguyễn Thái Ngọc Duy <pclouds@gmail.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
* fetch: define shallow boundary with --shallow-sinceNguyễn Thái Ngọc Duy2016-06-13
| | | | | Signed-off-by: Nguyễn Thái Ngọc Duy <pclouds@gmail.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
* upload-pack: add deepen-since to cut shallow repos based on timeNguyễn Thái Ngọc Duy2016-06-13
| | | | | | | | | | | | | | This should allow the user to say "create a shallow clone containing the work from last year" (once the client side is fixed up, of course). In theory deepen-since and deepen (aka --depth) can be used together to draw the shallow boundary (whether it's intersection or union is up to discussion, but if rev-list is used, it's likely intersection). However, because deepen goes with a custom commit walker, we can't mix the two yet. Signed-off-by: Nguyễn Thái Ngọc Duy <pclouds@gmail.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
* shallow.c: implement a generic shallow boundary finder based on rev-listNguyễn Thái Ngọc Duy2016-06-13
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Instead of a custom commit walker like get_shallow_commits(), this new function uses rev-list to mark NOT_SHALLOW to all reachable commits, except borders. The definition of reachable is to be defined by the protocol later. This makes it more flexible to define shallow boundary. The way we find border is paint all reachable commits NOT_SHALLOW. Any of them that "touches" commits without NOT_SHALLOW flag are considered shallow (e.g. zero parents via grafting mechanism). Shallow commits and their true parents are all marked SHALLOW. Then NOT_SHALLOW is removed from shallow commits at the end. There is an interesting observation. With a generic walker, we can produce all kinds of shallow cutting. In the following graph, every commit but "x" is reachable. "b" is a parent of "a". x -- a -- o / / x -- c -- b -- o After this function is run, "a" and "c" are both considered shallow commits. After grafting occurs at the client side, what we see is a -- o / c -- b -- o Notice that because of grafting, "a" has zero parents, so "b" is no longer a parent of "a". This is unfortunate and may be solved in two ways. The first is change the way shallow grafting works and keep "a -- b" connection if "b" exists and always ends at shallow commits (iow, no loose ends). This is hard to detect, or at least not cheap to do. The second way is mark one "x" as shallow commit instead of "a" and produce this graph at client side: x -- a -- o / / c -- b -- o More commits, but simpler grafting rules. Signed-off-by: Nguyễn Thái Ngọc Duy <pclouds@gmail.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
* fetch-pack: use a separate flag for fetch in deepening modeNguyễn Thái Ngọc Duy2016-06-13
| | | | | | | | | | | | | | The shallow repo could be deepened or shortened when then user gives --depth. But in future that won't be the only way to deepen/shorten a repo. Stop relying on args->depth in this mode. Future deepening methods can simply set this flag on instead of updating all these if expressions. The new name "deepen" was chosen after the command to define shallow boundary in pack protocol. New commands also follow this tradition. Signed-off-by: Nguyễn Thái Ngọc Duy <pclouds@gmail.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
* fetch-pack.c: mark strings for translatingNguyễn Thái Ngọc Duy2016-06-13
| | | | | Signed-off-by: Nguyễn Thái Ngọc Duy <pclouds@gmail.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
* fetch-pack: use a common function for verbose printingNguyễn Thái Ngọc Duy2016-06-13
| | | | | | | | | This reduces the number of "if (verbose)" which makes it a bit easier to read imo. It also makes it easier to redirect all these printouts, to a file for example. Signed-off-by: Nguyễn Thái Ngọc Duy <pclouds@gmail.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
* fetch-pack: use skip_prefix() instead of starts_with()Nguyễn Thái Ngọc Duy2016-06-13
| | | | | Signed-off-by: Nguyễn Thái Ngọc Duy <pclouds@gmail.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
* upload-pack: move rev-list code out of check_non_tip()Nguyễn Thái Ngọc Duy2016-06-13
| | | | | Signed-off-by: Nguyễn Thái Ngọc Duy <pclouds@gmail.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
* upload-pack: make check_non_tip() clean things up on errorNguyễn Thái Ngọc Duy2016-06-13
| | | | | | | | | | | On error check_non_tip() will die and not closing file descriptors is no big deal. The next patch will split the majority of this function out for reuse in other cases, where die() may not be the only outcome. Same story for popping SIGPIPE out of the signal chain. So let's make sure we clean things up properly first. Signed-off-by: Nguyễn Thái Ngọc Duy <pclouds@gmail.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
* upload-pack: tighten number parsing at "deepen" linesNguyễn Thái Ngọc Duy2016-06-13
| | | | | Signed-off-by: Nguyễn Thái Ngọc Duy <pclouds@gmail.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
* upload-pack: use skip_prefix() instead of starts_with()Nguyễn Thái Ngọc Duy2016-06-13
| | | | | Signed-off-by: Nguyễn Thái Ngọc Duy <pclouds@gmail.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
* upload-pack: move "unshallow" sending code out of deepen()Nguyễn Thái Ngọc Duy2016-06-13
| | | | | | | | | Also add some more comments in this code because it takes too long to understand what it does (to me, who should be familiar enough to understand this code well!) Signed-off-by: Nguyễn Thái Ngọc Duy <pclouds@gmail.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
* upload-pack: remove unused variable "backup"Nguyễn Thái Ngọc Duy2016-06-13
| | | | | | | | | After the last patch, "result" and "backup" are the same. "result" used to move, but the movement is now contained in send_shallow(). Delete this redundant variable. Signed-off-by: Nguyễn Thái Ngọc Duy <pclouds@gmail.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
* upload-pack: move "shallow" sending code out of deepen()Nguyễn Thái Ngọc Duy2016-06-13
| | | | | Signed-off-by: Nguyễn Thái Ngọc Duy <pclouds@gmail.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
* upload-pack: move shallow deepen code out of receive_needs()Nguyễn Thái Ngọc Duy2016-06-13
| | | | | | | | This is a prep step for further refactoring. Besides reindentation and s/shallows\./shallows->/g, no other changes are expected. Signed-off-by: Nguyễn Thái Ngọc Duy <pclouds@gmail.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
* transport-helper.c: refactor set_helper_option()Nguyễn Thái Ngọc Duy2016-06-13
| | | | | | | | | | For now we can handle two types, string and boolean, in set_helper_option(). Later on we'll add string_list support, which does not fit well. The new function strbuf_set_helper_option() can be reused for a separate function that handles string-list. Signed-off-by: Nguyễn Thái Ngọc Duy <pclouds@gmail.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
* remote-curl.c: convert fetch_git() to use argv_arrayNguyễn Thái Ngọc Duy2016-06-13
| | | | | Signed-off-by: Nguyễn Thái Ngọc Duy <pclouds@gmail.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
* tests: remove no-op full-svn-test targetEric Wong2016-02-23
| | | | | | | | | | | | | | git-svn has not supported GIT_SVN_NO_OPTIMIZE_COMMITS for the "set-tree" sub-command in 9 years since commit 490f49ea5899 ("git-svn: remove optimized commit stuff for set-tree"). So remove this target and TSVN variable to avoid confusion. ref: http://mid.gmane.org/56C9B7B7.7030406@f2.dion.ne.jp Helped-by: Kazutoshi Satoda <k_satoda@f2.dion.ne.jp> Signed-off-by: Eric Wong <normalperson@yhbt.net> Signed-off-by: Junio C Hamano <gitster@pobox.com>
* Sync with 2.7.2Junio C Hamano2016-02-22
|\
| * Git 2.7.2v2.7.2Junio C Hamano2016-02-22
| | | | | | | | Signed-off-by: Junio C Hamano <gitster@pobox.com>
| * Merge branch 'nd/ita-cleanup' into maintJunio C Hamano2016-02-22
| |\ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Paths that have been told the index about with "add -N" are not quite yet in the index, but a few commands behaved as if they already are in a harmful way. * nd/ita-cleanup: grep: make it clear i-t-a entries are ignored add and use a convenience macro ce_intent_to_add() blame: remove obsolete comment
| * \ Merge branch 'pw/completion-stash' into maintJunio C Hamano2016-02-22
| |\ \ | | | | | | | | | | | | | | | | * pw/completion-stash: completion: fix mis-indentation in _git_stash()
| * \ \ Merge branch 'mm/clean-doc-fix' into maintJunio C Hamano2016-02-22
| |\ \ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The documentation for "git clean" has been corrected; it mentioned that .git/modules/* are removed by giving two "-f", which has never been the case. * mm/clean-doc-fix: Documentation/git-clean.txt: don't mention deletion of .git/modules/*
| * \ \ \ Merge branch 'dw/mergetool-vim-window-shuffle' into maintJunio C Hamano2016-02-22
| |\ \ \ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The vimdiff backend for "git mergetool" has been tweaked to arrange and number buffers in the order that would match the expectation of majority of people who read left to right, then top down and assign buffers 1 2 3 4 "mentally" to local base remote merge windows based on that order. * dw/mergetool-vim-window-shuffle: mergetool: reorder vim/gvim buffers in three-way diffs
| * \ \ \ \ Merge branch 'ah/stripspace-optstring' into maintJunio C Hamano2016-02-22
| |\ \ \ \ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | * ah/stripspace-optstring: stripspace: call U+0020 a "space" instead of a "blank"
* | \ \ \ \ \ Merge branch 'js/git-remote-add-url-insteadof-test'Junio C Hamano2016-02-22
|\ \ \ \ \ \ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * js/git-remote-add-url-insteadof-test: t5505: 'remote add x y' should work when url.y.insteadOf = x
| * | | | | | | t5505: 'remote add x y' should work when url.y.insteadOf = xJohannes Schindelin2016-02-17
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This is the test missing from fb86e32 (git remote: allow adding remotes agreeing with url.<...>.insteadOf, 2014-12-23): we should allow adding a remote with the URL when it agrees with the url.<...>.insteadOf setting. Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de> Signed-off-by: Junio C Hamano <gitster@pobox.com>
* | | | | | | | Merge branch 'jk/config-include'Junio C Hamano2016-02-22
|\ \ \ \ \ \ \ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * jk/config-include: git-config: better document default behavior for `--include`
| * | | | | | | | git-config: better document default behavior for `--include`Jeff King2016-02-13
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | As described in the commit message of 9b25a0b (config: add include directive, 2012-02-06), the `--include` option is only on by default in some cases. But our documentation described it as just "defaults to on", which doesn't tell the whole story. Signed-off-by: Jeff King <peff@peff.net> Signed-off-by: Junio C Hamano <gitster@pobox.com>
* | | | | | | | | Merge branch 'ew/connect-verbose'Junio C Hamano2016-02-22
|\ \ \ \ \ \ \ \ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * ew/connect-verbose: t5570: add tests for "git {clone,fetch,pull} -v"
| * | | | | | | | | t5570: add tests for "git {clone,fetch,pull} -v"Eric Wong2016-02-15
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Now that git_connect is more information about connectivity progress after: ("pass transport verbosity down to git_connect") we should ensure it remains so for future users who need to to diagnose networking problems. Signed-off-by: Eric Wong <normalperson@yhbt.net> Signed-off-by: Junio C Hamano <gitster@pobox.com>
* | | | | | | | | | Merge branch 'ks/svn-pathnameencoding-4' of git://git.bogomips.org/git-svnJunio C Hamano2016-02-22
|\ \ \ \ \ \ \ \ \ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * 'ks/svn-pathnameencoding-4' of git://git.bogomips.org/git-svn: git-svn: apply "svn.pathnameencoding" before URL encoding git-svn: enable "svn.pathnameencoding" on dcommit git-svn: hoist out utf8 prep from t9129 to lib-git-svn
| * | | | | | | | | | git-svn: apply "svn.pathnameencoding" before URL encodingKazutoshi Satoda2016-02-22
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The conversion from "svn.pathnameencoding" to UTF-8 should be applied first, and then URL encoding should be applied on the resulting UTF-8 path. The reversed order of these transforms (used before this fix) makes non-UTF-8 URL which causes error from Subversion such as "Filesystem has no item: '...' path not found" when sending a rename (or a copy) from non-ASCII path. [ew: t9115 test case added (requires SVN_HTTPD_PORT set to test), squash LC_ALL=$a_utf8_locale export from Kazutoshi for Cygwin] Signed-off-by: Kazutoshi SATODA <k_satoda@f2.dion.ne.jp> Signed-off-by: Eric Wong <normalperson@yhbt.net>
| * | | | | | | | | | git-svn: enable "svn.pathnameencoding" on dcommitKazutoshi Satoda2016-02-22
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Without the initialization of $self->{pathnameencoding}, conversion in repo_path() is always skipped as $self->{pathnameencoding} is undefined even if "svn.pathnameencoding" is configured. The lack of conversion results in mysterious failure of dcommit (e.g. "Malformed XML") which happen only when a commit involves a change on non-ASCII path. [ew: add test case to t9115, squash LC_ALL=$a_utf8_locale export from Kazutoshi for Cygwin] Signed-off-by: Kazutoshi SATODA <k_satoda@f2.dion.ne.jp> Signed-off-by: Eric Wong <normalperson@yhbt.net>
| * | | | | | | | | | git-svn: hoist out utf8 prep from t9129 to lib-git-svnEric Wong2016-02-22
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | We will be reusing this in t9115. Suggested-by: Kazutoshi Satoda <k_satoda@f2.dion.ne.jp> Signed-off-by: Eric Wong <normalperson@yhbt.net>
* | | | | | | | | | | Merge branch 'pw/completion-stash'Junio C Hamano2016-02-22
|\ \ \ \ \ \ \ \ \ \ \ | |/ / / / / / / / / / |/| | | | | | | | / / | | |_|_|_|_|_|_|/ / | |/| | | | | | | | * pw/completion-stash: completion: fix mis-indentation in _git_stash()
| * | | | | | | | | completion: fix mis-indentation in _git_stash()SZEDER Gábor2016-02-22
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Signed-off-by: SZEDER Gábor <szeder@ira.uka.de> Signed-off-by: Junio C Hamano <gitster@pobox.com>
* | | | | | | | | | Merge branch 'maint'Junio C Hamano2016-02-17
|\ \ \ \ \ \ \ \ \ \ | | |_|_|_|/ / / / / | |/| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * maint: Start preparing for 2.7.2 git-cvsserver.perl: fix typo
| * | | | | | | | | Start preparing for 2.7.2Junio C Hamano2016-02-17
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Signed-off-by: Junio C Hamano <gitster@pobox.com>
| * | | | | | | | | Merge branch 'js/test-lib-windows-emulated-yes' into maintJunio C Hamano2016-02-17
| |\ \ \ \ \ \ \ \ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The emulated "yes" command used in our test scripts has been tweaked not to spend too much time generating unnecessary output that is not used, to help those who test on Windows where it would not stop until it fills the pipe buffer due to lack of SIGPIPE. * js/test-lib-windows-emulated-yes: test-lib: limit the output of the yes utility
| * \ \ \ \ \ \ \ \ \ Merge branch 'aw/push-force-with-lease-reporting' into maintJunio C Hamano2016-02-17
| |\ \ \ \ \ \ \ \ \ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | "git push --force-with-lease" has been taught to report if the push needed to force (or fast-forwarded). * aw/push-force-with-lease-reporting: push: fix ref status reporting for --force-with-lease
| * \ \ \ \ \ \ \ \ \ \ Merge branch 'nd/do-not-move-worktree-manually' into maintJunio C Hamano2016-02-17
| |\ \ \ \ \ \ \ \ \ \ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | "git worktree" had a broken code that attempted to auto-fix possible inconsistency that results from end-users moving a worktree to different places without telling Git (the original repository needs to maintain backpointers to its worktrees, but "mv" run by end-users who are not familiar with that fact will obviously not adjust them), which actually made things worse when triggered. * nd/do-not-move-worktree-manually: worktree: stop supporting moving worktrees manually worktree.c: fix indentation
| * \ \ \ \ \ \ \ \ \ \ \ Merge branch 'js/xmerge-marker-eol' into maintJunio C Hamano2016-02-17
| |\ \ \ \ \ \ \ \ \ \ \ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The low-level merge machinery has been taught to use CRLF line termination when inserting conflict markers to merged contents that are themselves CRLF line-terminated. * js/xmerge-marker-eol: merge-file: ensure that conflict sections match eol style merge-file: let conflict markers match end-of-line style of the context
| * | | | | | | | | | | | | git-cvsserver.perl: fix typoGyuYong Jung2016-02-17
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Signed-off-by: GyuYong Jung <obliviscence@gmail.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
* | | | | | | | | | | | | | Seventh batch for the 2.8 cycleJunio C Hamano2016-02-17
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Signed-off-by: Junio C Hamano <gitster@pobox.com>