aboutsummaryrefslogtreecommitdiff
Commit message (Collapse)AuthorAge
* gitweb.js: Provide getElementsByClassName method (if it not exists)Jakub Narebski2011-05-24
| | | | | | | | | | The code is simplified and does not support full specification of native getElementsByClassName method, but implements just subset that would be enough for gitweb, supporting only single class name. Signed-off-by: John 'Warthog9' Hawley <warthog9@eaglescrag.net> Signed-off-by: Jakub Narebski <jnareb@gmail.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
* gitweb.js: Introduce code to handle cookies from JavaScriptJakub Narebski2011-05-24
| | | | | | | | | | | | Introduced gitweb/static/js/cookies.js file provides functions for setting, getting and deleting cookies. Code taken from subsection "Cookies in JavaScript" of "Professional JavaScript for Web Developers" by Nicholas C. Zakas and from cookie plugin for jQuery (dual licensed under the MIT and GPL licenses). Signed-off-by: Jakub Narebski <jnareb@gmail.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
* gitweb.js: Extract and improve datetime handlingJakub Narebski2011-05-24
| | | | | | | | | | | | | | | | | | | | | | | | | | Move formatDateISOLocal(epoch, timezone) function (and also helper timezoneOffset(timezoneInfo) function it requires) from common-lib.js to datetime.js Add new functions: * localTimezoneOffset - to get browser timezone offset in seconds * localTimezoneInfo - to get browser timezone in '(+|-)HHMM' format * formatTimezoneInfo - turn offset in hours and minutes into '(+|-)HHMM' * parseRFC2822Date - to parse RFC-2822 dates that gitweb uses into epoch * formatDateRFC2882 - like formatDateISOLocal, only RFC-2822 format All those functions are meant to be used in future commit 'gitweb: javascript ability to adjust time based on timezone' An alternative would be to use e.g. Datejs (http://www.datejs.com) library, or JavaScript framework that has date formatting (perhaps as a plugin). While at it escape '-' in character class inside tzRe regexp, as recommended by JSLint (http://www.jslint.com). Signed-off-by: Jakub Narebski <jnareb@gmail.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
* gitweb.js: Provide default values for padding in padLeftStr and padLeftJakub Narebski2011-05-24
| | | | | | | | | | | | This means that one can use padLeft(4, 2) and it would be equivalent to runing padLeft(4, 2, '0'), and it would return '04' i.e. '4' padded with '0' to width 2, to be used e.g. in formatting date and time. This should make those functions easier to use. Current code doesn't yet make use of this feature. Signed-off-by: Jakub Narebski <jnareb@gmail.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
* gitweb.js: Update and improve comments in JavaScript filesJakub Narebski2011-05-24
| | | | | | | | | | | | This consists of adding a few extra explanation, fixing descriptions of functions to match names of parameters in code, adding a few separators, and fixing spelling -- while at it spell 'neighbor' using American spelling (and not as 'neighbour'). This is post-split cleanup. Signed-off-by: Jakub Narebski <jnareb@gmail.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
* gitweb: Split JavaScript for maintability, combining on buildJakub Narebski2011-05-24
| | | | | | | | | | | | | | | | | | | | | | | | | | Split originally single gitweb.js file into smaller files, each dealing with single issue / area of responsibility. This move should make gitweb's JavaScript code easier to maintain. For better webapp performance it is recommended[1][2][3] to combine JavaScript files. Do it during build time (in gitweb/Makefile), by straight concatenation of files into gitweb.js file (which is now ignored as being generated). This means that there are no changes to gitweb script itself - it still uses gitweb.js or gitweb.min.js, but now generated. [1]: http://developer.yahoo.com/performance/rules.html "Minimize HTTP Requests" section [2]: http://code.google.com/speed/articles/include-scripts-properly.html "1. Combine external JavaScript files" [3]: http://javascript-reference.info/speed-up-your-javascript-load-time.htm "Combine Your Files" section. See also new gitweb/static/js/README file. Inspired-by-patch-by: John 'Warthog9' Hawley <warthog9@eaglescrag.net> Signed-off-by: Jakub Narebski <jnareb@gmail.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
* Remove gitweb/gitweb.cgi and other legacy targets from main MakefileJakub Narebski2011-05-08
| | | | | | | | | | Now that there is gitweb/Makefile, let's leave only "gitweb" and "install-gitweb" targets in main Makefile. Those targets just delegate to gitweb's Makefile. Requested-by: Junio C Hamano <gitster@pobox.com> Signed-off-by: Jakub Narebski <jnareb@gmail.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
* git-instaweb: Simplify build dependency on gitwebJakub Narebski2011-05-08
| | | | | | | | | | | | | | | | | | | Since c0cb4ed (git-instaweb: Configure it to work with new gitweb structure, 2010-05-28) git-instaweb does not re-create gitweb.cgi etc., but makes use of installed gitweb. Therefore simplify git-instaweb dependency on gitweb subsystem in main Makefile from 'gitweb/gitweb.cgi gitweb/static/gitweb.css gitweb/static/gitweb.js' to simply 'gitweb'. This is preparation for splitting gitweb.perl script, and for splitting gitweb.js (to be reassembled / combined on build). This way we don't have to duplicate parts of gitweb/Makefile in main Makefile... it is also more correct description of git-instaweb dependency. Reported-by: Junio C Hamano <gitster@pobox.com> Signed-off-by: Jakub Narebski <jnareb@gmail.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
* Git 1.7.5v1.7.5Junio C Hamano2011-04-23
| | | | Signed-off-by: Junio C Hamano <gitster@pobox.com>
* Git 1.7.5-rc3v1.7.5-rc3Junio C Hamano2011-04-19
| | | | Signed-off-by: Junio C Hamano <gitster@pobox.com>
* Sync with 1.7.4.5Junio C Hamano2011-04-19
|\ | | | | | | Signed-off-by: Junio C Hamano <gitster@pobox.com>
| * Git 1.7.4.5v1.7.4.5Junio C Hamano2011-04-19
| | | | | | | | Signed-off-by: Junio C Hamano <gitster@pobox.com>
| * git-svn.txt: Document --mergeinfoMichael J Gruber2011-04-19
| | | | | | | | | | | | | | | | 6abd933 (git-svn: allow the mergeinfo property to be set, 2010-09-24) introduced the --mergeinfo option. Document it. Signed-off-by: Michael J Gruber <git@drmicha.warpmail.net> Signed-off-by: Junio C Hamano <gitster@pobox.com>
* | Revert "run-command: prettify -D_FORTIFY_SOURCE workaround"Junio C Hamano2011-04-18
| | | | | | | | | | | | This reverts commit ebec842773932e6f853acac70c80f84209b5f83e, which somehow mistakenly thought that any non-zero return from write(2) is an error.
* | Merge branch 'maint'Junio C Hamano2011-04-14
|\ \ | |/ | | | | | | | | | | * maint: archive: document limitation of tar.umask config setting t3306,t5304: avoid clock skew issues git.txt: fix list continuation
| * archive: document limitation of tar.umask config settingRené Scharfe2011-04-14
| | | | | | | | | | | | | | | | | | | | The local value of the config variable tar.umask is not passed to the other side with --remote. We may want to change that, but for now just document this fact. Reported-by: Jacek Masiulaniec <jacek.masiulaniec@gmail.com> Signed-off-by: Rene Scharfe <rene.scharfe@lsrfire.ath.cx> Signed-off-by: Junio C Hamano <gitster@pobox.com>
| * t3306,t5304: avoid clock skew issuesMichael J Gruber2011-04-14
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | On systems where the local time and file modification time may be out of sync (e.g. test directory on NFS) t3306 and t5305 can fail because prune compares times such as "now" (client time) with file modification times (server times for remote file systems). I.e., these are spurious test failures. Avoid this by setting the relevant modification times to the local time. Noticed on a system with as little as 2s time skew. Signed-off-by: Michael J Gruber <git@drmicha.warpmail.net> Signed-off-by: Junio C Hamano <gitster@pobox.com>
| * git.txt: fix list continuationMichael J Gruber2011-04-14
| | | | | | | | | | | | | | | | | | Remove a spurious empty line which prevented asciidoc from recognizing a list continuation mark ('+'), so that it does not get output literally any more. Signed-off-by: Michael J Gruber <git@drmicha.warpmail.net> Signed-off-by: Junio C Hamano <gitster@pobox.com>
* | Git 1.7.5-rc2v1.7.5-rc2Junio C Hamano2011-04-13
| | | | | | | | Signed-off-by: Junio C Hamano <gitster@pobox.com>
* | Merge branch 'maint'Junio C Hamano2011-04-13
|\ \ | |/ | | | | * maint:
| * Merge branch 'jc/rev-list-options-fix' into maintJunio C Hamano2011-04-13
| |\ | | | | | | | | | | | | * jc/rev-list-options-fix: "log --cherry-pick" documentation regression fix
| * \ Merge branch 'js/checkout-untracked-symlink' into maintJunio C Hamano2011-04-13
| |\ \ | | | | | | | | | | | | | | | | * js/checkout-untracked-symlink: t2021: mark a test as fixed
* | | | remove doubled words, e.g., s/to to/to/, and fix related typosJim Meyering2011-04-13
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | I found that some doubled words had snuck back into projects from which I'd already removed them, so now there's a "syntax-check" makefile rule in gnulib to help prevent recurrence. Running the command below spotted a few in git, too: git ls-files | xargs perl -0777 -n \ -e 'while (/\b(then?|[iao]n|i[fst]|but|f?or|at|and|[dt])\s+\1\b/gims)' \ -e '{$n=($` =~ tr/\n/\n/ + 1); ($v=$&)=~s/\n/\\n/g;' \ -e 'print "$ARGV:$n:$v\n"}' Signed-off-by: Jim Meyering <meyering@redhat.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
* | | | revert: Hide '-r' option in default usageRamkumar Ramachandra2011-04-13
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The '-r' command-line option is a no-op provided only for backward compatiblity since abd6970 (cherry-pick: make -r the default, 2006-10-05), and somehow ended up surviving across reimplementation in C at 9509af6 (Make git-revert & git-cherry-pick a builtin, 2007-03-01) and another rewrite of the command line parser at f810379 (Make builtin-revert.c use parse_options, 2007-10-07). We should have stopped advertising the option long time ago. Signed-off-by: Ramkumar Ramachandra <artagnon@gmail.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
* | | | Merge branch 'js/checkout-untracked-symlink'Junio C Hamano2011-04-12
|\ \ \ \ | | |/ / | |/| | | | | | | | | | * js/checkout-untracked-symlink: t2021: mark a test as fixed
| * | | t2021: mark a test as fixedJohannes Sixt2011-04-12
| | | | | | | | | | | | | | | | | | | | | | | | | | | | The failure was fixed by the previous commit. Signed-off-by: Johannes Sixt <j6t@kdbg.org> Signed-off-by: Junio C Hamano <gitster@pobox.com>
* | | | Merge branch 'nd/init-gitdir'Junio C Hamano2011-04-12
|\ \ \ \ | | | | | | | | | | | | | | | | | | | | * nd/init-gitdir: t0001: guard a new test with SYMLINKS prerequisite
| * | | | t0001: guard a new test with SYMLINKS prerequisiteJohannes Sixt2011-04-11
| | | | | | | | | | | | | | | | | | | | | | | | | Signed-off-by: Johannes Sixt <j6t@kdbg.org> Signed-off-by: Junio C Hamano <gitster@pobox.com>
* | | | | Makefile: extract Q_() source strings as ngettext()Ævar Arnfjörð Bjarmason2011-04-11
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The Q_() wrapper added by 0c9ea33 (i18n: add stub Q_() wrapper for ngettext, 2011-03-09) needs to be noticed by xgettext. Add an appropriate --keyword option to the Makefile, so that "make pot" would notice the strings in the plural form marked with the wrapper. Signed-off-by: Ævar Arnfjörð Bjarmason <avarab@gmail.com> Signed-off-by: Jonathan Nieder <jrnieder@gmail.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
* | | | | i18n: avoid parenthesized string as array initializerRamsay Jones2011-04-11
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The syntax static const char ignore_error[] = ("something"); is invalid C. A parenthesized string is not allowed as an array initializer. Some compilers, for example GCC and MSVC, allow this syntax as an extension, but it is not a portable construct. tcc does not parse it, for example. Remove the parenthesis from the definition of the N_() macro to fix this. Signed-off-by: Ramsay Jones <ramsay@ramsay1.demon.co.uk> Acked-by: Jonathan Nieder <jrnieder@gmail.com> Acked-by: Ævar Arnfjörð Bjarmason <avarab@gmail.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
* | | | | Merge git://git.bogomips.org/git-svnJunio C Hamano2011-04-11
|\ \ \ \ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * git://git.bogomips.org/git-svn: git-svn: Cache results of running the executable "git config" git-svn: Add a svn-remote.<name>.pushurl config key
| * | | | | git-svn: Cache results of running the executable "git config"James Y Knight2011-04-09
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Running programs is not cheap! Signed-off-by: James Y Knight <jknight@itasoftware.com> Signed-off-by: Alejandro R. Sedeño <asedeno@mit.edu> Acked-by: Eric Wong <normalperson@yhbt.net>
| * | | | | git-svn: Add a svn-remote.<name>.pushurl config keyAlejandro R. Sedeño2011-04-09
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Similar to the 'remote.<name>.pushurl' config key for git remotes, 'pushurl' is designed to be used in cases where 'url' points to an SVN repository via a read-only transport, to provide an alternate read/write transport. It is assumed that both keys point to the same repository. The 'pushurl' key is distinct from the 'commiturl' key in that 'commiturl' is a full svn path while 'pushurl' (like 'url') is a base path. 'commiturl' takes precendece over 'pushurl' in cases where either might be used. The 'pushurl' is used by git-svn's dcommit and branch commands. Signed-off-by: Alejandro R. Sedeño <asedeno@mit.edu> Reviewed-by: James Y Knight <jknight@itasoftware.com> Acked-by: Eric Wong <normalperson@yhbt.net>
* | | | | | Merge git://git.kernel.org/pub/scm/gitk/gitkJunio C Hamano2011-04-11
|\ \ \ \ \ \ | |/ / / / / |/| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * git://git.kernel.org/pub/scm/gitk/gitk: gitk: Update cherry-pick error message parsing gitk: Quote tag names in event bindings to avoid problems with % chars gitk: Allow user to control how much of the SHA1 ID gets auto-selected gitk: spelling fixes in Russian translation gitk: Take only numeric version components when computing $git_version
| * | | | | gitk: Update cherry-pick error message parsingAnders Kaseorg2011-04-09
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Commit 981ff5c37ae20687c98d98c8689d5e89016026d2 changed the error message from git cherry-pick from Automatic cherry-pick failed. [...advice...] to error: could not apply 7ab78c9... Do something neat. [...advice...] Update gitk’s regex to match this, restoring the ability to launch git citool to resolve conflicted cherry-picks. Signed-off-by: Anders Kaseorg <andersk@mit.edu> Signed-off-by: Paul Mackerras <paulus@samba.org>
| * | | | | gitk: Quote tag names in event bindings to avoid problems with % charsPat Thoyts2011-03-09
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Tag names that contain a % character require quoting when used in event bindings or the name may be mis-recognised for percent substitution in the event script. Reported-by: Jonathan Nieder <jrnieder@gmail.com> Signed-off-by: Pat Thoyts <patthoyts@users.sourceforge.net> Signed-off-by: Paul Mackerras <paulus@samba.org>
| * | | | | gitk: Allow user to control how much of the SHA1 ID gets auto-selectedPaul Mackerras2011-03-09
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This adds a new spinbox on the Edit Preferences pane to allow the user to control how many characters of the SHA1 ID get autoselected. Signed-off-by: Paul Mackerras <paulus@samba.org>
| * | | | | gitk: spelling fixes in Russian translationSkip2011-01-19
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Signed-off-by: Skip <bsvskip@rambler.ru> Signed-off-by: Alex Riesen <raa.lkml@gmail.com> Signed-off-by: Paul Mackerras <paulus@samba.org>
| * | | | | gitk: Take only numeric version components when computing $git_versionAnders Kaseorg2011-01-19
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This fixes errors running with release candidate versions of Git: Error in startup script: expected version number but got "1.7.4-rc0" Also, $git_version is no longer artificially limited to three components. That limitation was added by commit 194bbf6cc8c2 ("gitk: Handle msysGit version during version comparisons") to deal with msysGit version strings like “1.6.4.msysgit.0”, and we don’t need it now. Hence as another side effect, this enables showing notes with git version 1.6.6.2 or 1.6.6.3, as originally intended by commit 7defefb13427 ("gitk: Show notes by default (like git log does"). Signed-off-by: Anders Kaseorg <andersk@mit.edu> Reported-by: Mathias Lafeldt <misfire@debugon.org> Reviewed-by: Jonathan Nieder <jrnieder@gmail.com> Signed-off-by: Paul Mackerras <paulus@samba.org>
* | | | | | git-p4: replace each tab with 8 spaces for consistencyAndrew Garber2011-04-07
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Note that the majority of git-p4 uses spaces, not tabs, for indentation. Consistent indentation is a good hygiene for Python scripts, and mixing tabs and spaces in Python can lead to hard-to-find bugs. Signed-off-by: Andrew Garber <andrew@andrewgarber.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
* | | | | | Git 1.7.5-rc1v1.7.5-rc1Junio C Hamano2011-04-06
| | | | | | | | | | | | | | | | | | | | | | | | Signed-off-by: Junio C Hamano <gitster@pobox.com>
* | | | | | Sync with 1.7.4.4Junio C Hamano2011-04-06
|\ \ \ \ \ \ | | |_|_|/ / | |/| | | |
| * | | | | Git 1.7.4.4v1.7.4.4Junio C Hamano2011-04-06
| | | | | | | | | | | | | | | | | | | | | | | | Signed-off-by: Junio C Hamano <gitster@pobox.com>
| * | | | | Merge branch 'nm/maint-conflicted-submodule-entries' into maintJunio C Hamano2011-04-06
| |\ \ \ \ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | * nm/maint-conflicted-submodule-entries: submodule: process conflicting submodules only once
| * \ \ \ \ \ Merge branch 'mg/rev-list-n-reverse-doc' into maintJunio C Hamano2011-04-06
| |\ \ \ \ \ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * mg/rev-list-n-reverse-doc: git-log.txt,rev-list-options.txt: put option blocks in proper order git-log.txt,rev-list-options.txt: -n/--max-count is commit limiting
* | \ \ \ \ \ \ Merge branch 'jk/maint-remote-mirror-safer'Junio C Hamano2011-04-06
|\ \ \ \ \ \ \ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * jk/maint-remote-mirror-safer: remote: deprecate --mirror remote: separate the concept of push and fetch mirrors remote: disallow some nonsensical option combinations
| * | | | | | | | remote: deprecate --mirrorJeff King2011-03-30
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The configuration created by plain --mirror is dangerous and useless, and we now have --mirror=fetch and --mirror=push to replace it. Let's warn the user. One alternative to this is to try to guess which type the user wants. In a non-bare repository, a fetch mirror doesn't make much sense, since it would overwrite local commits. But in a bare repository, you might use either type, or even both (e.g., if you are acting as an intermediate drop-point across two disconnected networks). So rather than try for complex heuristics, let's keep it simple. The user knows what they're trying to do, so let them tell us. Signed-off-by: Jeff King <peff@peff.net> Signed-off-by: Junio C Hamano <gitster@pobox.com>
| * | | | | | | | remote: separate the concept of push and fetch mirrorsJeff King2011-03-30
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | git-remote currently has one option, "--mirror", which sets up mirror configuration which can be used for either fetching or pushing. It looks like this: [remote "mirror"] url = wherever fetch = +refs/*:refs/* mirror = true However, a remote like this can be dangerous and confusing. Specifically: 1. If you issue the wrong command, it can be devastating. You are not likely to "push" when you meant to "fetch", but "git remote update" will try to fetch it, even if you intended the remote only for pushing. In either case, the results can be quite destructive. An unintended push will overwrite or delete remote refs, and an unintended fetch can overwrite local branches. 2. The tracking setup code can produce confusing results. The fetch refspec above means that "git checkout -b new master" will consider refs/heads/master to come from the remote "mirror", even if you only ever intend to push to the mirror. It will set up the "new" branch to track mirror's refs/heads/master. 3. The push code tries to opportunistically update tracking branches. If you "git push mirror foo:bar", it will see that we are updating mirror's refs/heads/bar, which corresponds to our local refs/heads/bar, and will update our local branch. To solve this, we split the concept into "push mirrors" and "fetch mirrors". Push mirrors set only remote.*.mirror, solving (2) and (3), and making an accidental fetch write only into FETCH_HEAD. Fetch mirrors set only the fetch refspec, meaning an accidental push will not force-overwrite or delete refs on the remote end. The new syntax is "--mirror=<fetch|push>". For compatibility, we keep "--mirror" as-is, setting up both types simultaneously. Signed-off-by: Jeff King <peff@peff.net> Signed-off-by: Junio C Hamano <gitster@pobox.com>
| * | | | | | | | remote: disallow some nonsensical option combinationsJeff King2011-03-30
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | It doesn't make sense to use "-m" on a mirror, since "-m" sets up the HEAD symref in the remotes namespace, but with mirror, we are by definition not using a remotes namespace. Similarly, it does not make much sense to specify refspecs with --mirror. For a mirror you plan to push to, those refspecs will be ignored. For a mirror you are fetching from, there is no point in mirroring, since the refspec specifies everything you want to grab. There is one case where "--mirror -t <X>" would be useful. Because <X> is used as-is in the refspec, and because we append it to to refs/, you could mirror a subset of the hierarchy by doing: git remote add --mirror -t 'tags/*' But using anything besides a single branch as an argument to "-t" is not documented and only happens to work, so closing it off is not a serious regression. Signed-off-by: Jeff King <peff@peff.net> Signed-off-by: Junio C Hamano <gitster@pobox.com>
* | | | | | | | | Merge branch 'mg/doc-revisions-txt'Junio C Hamano2011-04-06
|\ \ \ \ \ \ \ \ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * mg/doc-revisions-txt: revisions.txt: language improvements revisions.txt: structure with a labelled list revisions.txt: consistent use of quotes