summaryrefslogtreecommitdiff
Commit message (Collapse)AuthorAgeFilesLines
* mergetool: Provide an empty file when neededda/maint-mergetool-twowayDavid Aguilar2012-01-232-5/+35
| | | | | | | | | | | | | | | | | Some merge tools cannot cope when $LOCAL, $BASE, or $REMOTE are missing. $BASE can be missing when two branches independently add the same filename. Provide an empty file to make these tools happy. When a delete/modify conflict occurs, $LOCAL and $REMOTE can also be missing. We have special case code to handle such case so this change may not affect that codepath, but try to be consistent and create an empty file for them anyway. Reported-by: Jason Wenger <jcwenger@gmail.com> Signed-off-by: David Aguilar <davvid@gmail.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
* Merge branch 'jm/mergetool-pathspec'Junio C Hamano2011-10-103-70/+71
|\ | | | | | | | | | | * jm/mergetool-pathspec: mergetool: no longer need to save standard input mergetool: Use args as pathspec to unmerged files
| * mergetool: no longer need to save standard inputJunio C Hamano2011-09-261-6/+4
| | | | | | | | | | | | | | | | | | | | Earlier code wanted to run merge_file and prompt_after_failed_merge both of which wanted to read from the standard input of the entire script inside a while loop, which read from a pipe, and in order to do so, it redirected the original standard input to another file descriptor. We no longer need to do so after the previous change. Signed-off-by: Junio C Hamano <gitster@pobox.com>
| * mergetool: Use args as pathspec to unmerged filesJonathon Mah2011-09-263-69/+72
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Mergetool now treats its path arguments as a pathspec (like other git subcommands), restricting action to the given files and directories. Files matching the pathspec are filtered so mergetool only acts on unmerged paths; previously it would assume each path argument was in an unresolved state, and get confused when it couldn't check out their other stages. Running "git mergetool subdir" will prompt to resolve all conflicted blobs under subdir. Signed-off-by: Jonathon Mah <me@JonathonMah.com> Acked-by: David Aguilar <davvid@gmail.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
* | Merge branch 'jc/maint-diffstat-numstat-context'Junio C Hamano2011-10-101-0/+2
|\ \ | | | | | | | | | | | | * jc/maint-diffstat-numstat-context: diff: teach --stat/--numstat to honor -U$num
| * | diff: teach --stat/--numstat to honor -U$numJunio C Hamano2011-09-221-0/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | "git diff -p" piped to external diffstat and "git diff --stat" may see different patch text (both are valid and describe the same change correctly) when counting the number of added and deleted lines, arriving at different results to confuse the users, as --stat/--numstat codepath always uses the hardcoded -U0 as the context length. Make --stat/--numstat codepath to honor the context length the same way as the textual patch codepath does to avoid this problem. Signed-off-by: Junio C Hamano <gitster@pobox.com>
* | | Merge branch 'mz/remote-rename'Junio C Hamano2011-10-102-7/+52
|\ \ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | * mz/remote-rename: remote: only update remote-tracking branch if updating refspec remote rename: warn when refspec was not updated remote: "rename o foo" should not rename ref "origin/bar" remote: write correct fetch spec when renaming remote 'remote'
| * | | remote: only update remote-tracking branch if updating refspecMartin von Zweigbergk2011-09-112-4/+9
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 'git remote rename' will only update the remote's fetch refspec if it looks like a default one. If the remote has no default fetch refspec, as in [remote "origin"] url = git://git.kernel.org/pub/scm/git/git.git fetch = +refs/heads/*:refs/remotes/upstream/* we would not update the fetch refspec and even if there is a ref called "refs/remotes/origin/master", we should not rename it, since it was not created by fetching from the remote. Suggested-by: Junio C Hamano <gitster@pobox.com> Signed-off-by: Martin von Zweigbergk <martin.von.zweigbergk@gmail.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
| * | | remote rename: warn when refspec was not updatedMartin von Zweigbergk2011-09-111-0/+6
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | When renaming a remote, we also try to update the fetch refspec accordingly, but only if it has the default format. For others, such as refs/heads/master:refs/heads/origin, we are conservative and leave it untouched. Let's give the user a warning about refspecs that are not updated, so he can manually update the config if necessary. Suggested-by: Jeff King <peff@peff.net> Signed-off-by: Martin von Zweigbergk <martin.von.zweigbergk@gmail.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
| * | | remote: "rename o foo" should not rename ref "origin/bar"Martin von Zweigbergk2011-09-112-1/+11
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | When renaming a remote called 'o' using 'git remote rename o foo', git should also rename any remote-tracking branches for the remote. This does happen, but any remote-tracking branches starting with 'refs/remotes/o', such as 'refs/remotes/origin/bar', will also be renamed (to 'refs/remotes/foorigin/bar' in this case). Fix it by simply matching one more character, up to the slash following the remote name. Signed-off-by: Martin von Zweigbergk <martin.von.zweigbergk@gmail.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
| * | | remote: write correct fetch spec when renaming remote 'remote'Martin von Zweigbergk2011-09-112-4/+28
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | When renaming a remote whose name is contained in a configured fetch refspec for that remote, we currently replace the first occurrence of the remote name in the refspec. This is correct in most cases, but breaks if the remote name occurs in the fetch refspec before the expected place. For example, we currently change [remote "remote"] url = git://git.kernel.org/pub/scm/git/git.git fetch = +refs/heads/*:refs/remotes/remote/* into [remote "origin"] url = git://git.kernel.org/pub/scm/git/git.git fetch = +refs/heads/*:refs/origins/remote/* Reduce the risk of changing incorrect sections of the refspec by matching the entire ":refs/remotes/<name>/" instead of just "<name>". Signed-off-by: Martin von Zweigbergk <martin.von.zweigbergk@gmail.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
* | | | Merge branch 'cb/common-prefix-unification'Junio C Hamano2011-10-106-64/+40
|\ \ \ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * cb/common-prefix-unification: rename pathspec_prefix() to common_prefix() and move to dir.[ch] consolidate pathspec_prefix and common_prefix remove prefix argument from pathspec_prefix
| * | | | rename pathspec_prefix() to common_prefix() and move to dir.[ch]Clemens Buchacher2011-09-126-12/+15
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Also make common_prefix_len() static as this refactoring makes dir.c itself the only caller of this helper function. Signed-off-by: Clemens Buchacher <drizzd@aon.at> Signed-off-by: Junio C Hamano <gitster@pobox.com>
| * | | | consolidate pathspec_prefix and common_prefixJunio C Hamano2011-09-063-56/+28
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The implementation from pathspec_prefix (slightly modified) replaces the current common_prefix, because it also respects glob characters. Based on a patch by Clemens Buchacher. Signed-off-by: Junio C Hamano <gitster@pobox.com>
| * | | | remove prefix argument from pathspec_prefixClemens Buchacher2011-09-064-6/+7
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Passing a prefix to a function that is supposed to find the prefix is strange. And it's really only used if the pathspec is NULL. Make the callers handle this case instead. As we are always returning a fresh copy of a string (or NULL), change the type of the returned value to non-const "char *". Signed-off-by: Clemens Buchacher <drizzd@aon.at> Signed-off-by: Junio C Hamano <gitster@pobox.com>
* | | | | Merge branch 'jn/maint-http-error-message'Junio C Hamano2011-10-101-2/+7
|\ \ \ \ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * jn/maint-http-error-message: http: avoid empty error messages for some curl errors http: remove extra newline in error message
| * | | | | http: avoid empty error messages for some curl errorsJonathan Nieder2011-09-061-1/+6
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | When asked to fetch over SSL without a valid /etc/ssl/certs/ca-certificates.crt file, "git fetch" writes error: while accessing https://github.com/torvalds/linux.git/info/refs which is a little disconcerting. Better to fall back to curl_easy_strerror(result) when the error string is empty, like the curl utility does: error: Problem with the SSL CA cert (path? access rights?) while accessing https://github.com/torvalds/linux.git/info/refs Signed-off-by: Jonathan Nieder <jrnieder@gmail.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
| * | | | | http: remove extra newline in error messageJonathan Nieder2011-09-061-1/+1
| | |/ / / | |/| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | There is no need for a blank line between the detailed error message and the later "fatal: HTTP request failed" notice. Keep the newline written by error() itself and eliminate the extra one. Signed-off-by: Jonathan Nieder <jrnieder@gmail.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
* | | | | Merge branch 'hv/submodule-update-none'Junio C Hamano2011-10-102-1/+69
|\ \ \ \ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * hv/submodule-update-none: add update 'none' flag to disable update of submodule by default submodule: move update configuration variable further up
| * | | | | add update 'none' flag to disable update of submodule by defaultHeiko Voigt2011-08-113-1/+78
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This is useful to mark a submodule as unneeded by default. When this option is set and the user wants to work with such a submodule he needs to configure 'submodule.<name>.update=checkout' or pass the --checkout option. Then the submodule can be handled like a normal submodule. Signed-off-by: Heiko Voigt <hvoigt@hvoigt.net> Signed-off-by: Junio C Hamano <gitster@pobox.com>
| * | | | | submodule: move update configuration variable further upHeiko Voigt2011-08-111-6/+7
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Lets always initialize the 'update_module' variable with the final value. This way we allow code which wants to check this configuration early to do so right in the beginning of cmd_update(). Signed-off-by: Heiko Voigt <hvoigt@hvoigt.net> Signed-off-by: Junio C Hamano <gitster@pobox.com>
* | | | | | Merge branch 'fg/submodule-git-file-git-dir'Junio C Hamano2011-10-1010-67/+244
|\ \ \ \ \ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * fg/submodule-git-file-git-dir: Move git-dir for submodules rev-parse: add option --resolve-git-dir <path> Conflicts: cache.h git-submodule.sh
| * | | | | | Move git-dir for submodulesfg/submodule-git-file-git-dirFredrik Gustafsson2011-08-223-7/+149
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Move git-dir for submodules into $GIT_DIR/modules/[name_of_submodule] of the superproject. This is a step towards being able to delete submodule directories without loosing the information from their .git directory as that is now stored outside the submodules work tree. This is done relying on the already existent .git-file functionality. When adding or updating a submodule whose git directory is found under $GIT_DIR/modules/[name_of_submodule], don't clone it again but simply point the .git-file to it and remove the now stale index file from it. The index will be recreated by the following checkout. This patch will not affect already cloned submodules at all. Tests that rely on .git being a directory have been fixed. Signed-off-by: Fredrik Gustafsson <iveqy@iveqy.com> Mentored-by: Jens Lehmann <Jens.Lehmann@web.de> Mentored-by: Heiko Voigt <hvoigt@hvoigt.net> Signed-off-by: Junio C Hamano <gitster@pobox.com>
| * | | | | | rev-parse: add option --resolve-git-dir <path>Fredrik Gustafsson2011-08-167-54/+78
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Check if <path> is a valid git-dir or a valid git-file that points to a valid git-dir. We want tests to be independent from the fact that a git-dir may be a git-file. Thus we changed tests to use this feature. Signed-off-by: Fredrik Gustafsson <iveqy@iveqy.com> Mentored-by: Jens Lehmann <Jens.Lehmann@web.de> Mentored-by: Heiko Voigt <hvoigt@hvoigt.net> Signed-off-by: Junio C Hamano <gitster@pobox.com>
* | | | | | | Fix some "variable might be used uninitialized" warningsRamsay Jones2011-10-092-2/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | In particular, gcc complains as follows: CC tree-walk.o tree-walk.c: In function `traverse_trees': tree-walk.c:347: warning: 'e' might be used uninitialized in this \ function CC builtin/revert.o builtin/revert.c: In function `verify_opt_mutually_compatible': builtin/revert.c:113: warning: 'opt2' might be used uninitialized in \ this function Signed-off-by: Ramsay Jones <ramsay@ramsay1.demon.co.uk> Signed-off-by: Junio C Hamano <gitster@pobox.com>
* | | | | | | Makefile: fix permissions of mergetools/ checked out with permissive umaskJunio C Hamano2011-10-091-2/+1
|\ \ \ \ \ \ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Signed-off-by: Jonathan Nieder <jrnieder@gmail.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
| * | | | | | | Makefile: fix permissions of mergetools/ checked out with permissive umaskJonathan Nieder2011-10-091-2/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Ever since mergetool--lib was split into multiple files in v1.7.7-rc0~3^2~1 (2011-08-18), the Makefile takes care to reset umask and use tar --no-owner when installing merge tool definitions to $(gitexecdir)/mergetools/. Unfortunately it does not take into account the possibility that the permission bits of the files being copied might already be wrong. Rather than fixing the "tar" incantation and making it even more complicated, let's just use the "install" utility. This only means losing the ability to install executables and subdirectories of mergetools/, which wasn't used. Noticed by installing from a copy of git checked out with umask 002. Compare v1.6.0.3~81^2 (Fix permission bits on sources checked out with an overtight umask, 2008-08-21). Signed-off-by: Jonathan Nieder <jrnieder@gmail.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
* | | | | | | | Post 1.7.7 first waveJunio C Hamano2011-10-053-2/+109
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Signed-off-by: Junio C Hamano <gitster@pobox.com>
* | | | | | | | Merge branch 'mm/mediawiki-as-a-remote'Junio C Hamano2011-10-052-0/+830
|\ \ \ \ \ \ \ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * mm/mediawiki-as-a-remote: git-remote-mediawiki: allow a domain to be set for authentication git-remote-mediawiki: obey advice.pushNonFastForward git-remote-mediawiki: set 'basetimestamp' to let the wiki handle conflicts git-remote-mediawiki: trivial fixes git-remote-mediawiki: allow push to set MediaWiki metadata Add a remote helper to interact with mediawiki (fetch & push)
| * | | | | | | | git-remote-mediawiki: allow a domain to be set for authenticationMatthieu Moy2011-09-281-0/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | When the wiki uses e.g. LDAP for authentication, the web interface shows a popup to allow the user to chose an authentication domain, and we need to use lgdomain in the API at login time. Signed-off-by: Matthieu Moy <Matthieu.Moy@imag.fr> Signed-off-by: Junio C Hamano <gitster@pobox.com>
| * | | | | | | | git-remote-mediawiki: obey advice.pushNonFastForwardMatthieu Moy2011-09-271-7/+10
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Signed-off-by: Matthieu Moy <Matthieu.Moy@imag.fr> Signed-off-by: Junio C Hamano <gitster@pobox.com>
| * | | | | | | | git-remote-mediawiki: set 'basetimestamp' to let the wiki handle conflictsMatthieu Moy2011-09-271-6/+37
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | We already have a check that no new revisions are on the wiki at the beginning of the push, but this didn't handle concurrent accesses to the wiki. Signed-off-by: Matthieu Moy <Matthieu.Moy@imag.fr> Signed-off-by: Junio C Hamano <gitster@pobox.com>
| * | | | | | | | git-remote-mediawiki: trivial fixesMatthieu Moy2011-09-271-2/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Fix a whitespace issue (no space before :) and remove unused %status in mw_push. Signed-off-by: Matthieu Moy <Matthieu.Moy@imag.fr> Signed-off-by: Junio C Hamano <gitster@pobox.com>
| * | | | | | | | git-remote-mediawiki: allow push to set MediaWiki metadataMatthieu Moy2011-09-011-2/+33
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Push can not set the commit note "mediawiki_revision:" and update the remote reference. This avoids having to "git pull --rebase" after each push, and is probably more natural. Make it the default, but let it be configurable with mediawiki.dumbPush or remote.<remotename>.dumbPush. Signed-off-by: Matthieu Moy <Matthieu.Moy@imag.fr> Signed-off-by: Junio C Hamano <gitster@pobox.com>
| * | | | | | | | Add a remote helper to interact with mediawiki (fetch & push)Jeremie Nikaes2011-09-012-0/+763
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Implement a gate between git and mediawiki, allowing git users to push and pull objects from mediawiki just as one would do with a classic git repository thanks to remote-helpers. The following packages need to be installed (available on common repositories): libmediawiki-api-perl libdatetime-format-iso8601-perl Use remote helpers in order to be as transparent as possible to the git user. Download Mediawiki revisions through the Mediawiki API and then fast-import into git. Mediawiki revision number and git commits are linked thanks to notes bound to commits. The import part is done on a refs/mediawiki/<remote> branch before coming to refs/remote/origin/master (Huge thanks to Jonathan Nieder for his help) We use UTF-8 everywhere: use encoding 'utf8'; does most of the job, but we also read the output of Git commands in UTF-8 with the small helper run_git, and write to the console (STDERR) in UTF-8. This allows a seamless use of non-ascii characters in page titles, but hasn't been tested on non-UTF-8 systems. In particular, UTF-8 encoding for filenames could raise problems if different file systems handle UTF-8 filenames differently. A uri_escape of mediawiki filenames could be imaginable, and is still to be discussed further. Partial cloning is supported using one of: git clone -c remote.origin.pages='A_Page Another_Page' mediawiki::http://wikiurl git clone -c remote.origin.categories='Some_Category' mediawiki::http://wikiurl git clone -c remote.origin.shallow='True' mediawiki::http://wikiurl Thanks to notes metadata, it is possible to compare remote and local last mediawiki revision to warn non-fast forward pushes and "everything up-to-date" case. When allowed, push looks for each commit between remotes/origin/master and HEAD, catches every blob related to these commit and push them in chronological order. To do so, it uses git rev-list --children HEAD and travels the tree from remotes/origin/master to HEAD through children. In other words: * Shortest path from remotes/origin/master to HEAD * For each commit encountered, push blobs related to this commit Signed-off-by: Jérémie Nikaes <jeremie.nikaes@ensimag.imag.fr> Signed-off-by: Arnaud Lacurie <arnaud.lacurie@ensimag.imag.fr> Signed-off-by: Claire Fousse <claire.fousse@ensimag.imag.fr> Signed-off-by: David Amouyal <david.amouyal@ensimag.imag.fr> Signed-off-by: Matthieu Moy <matthieu.moy@grenoble-inp.fr> Signed-off-by: Sylvain Boulmé <sylvain.boulme@imag.fr> Signed-off-by: Junio C Hamano <gitster@pobox.com>
* | | | | | | | | Merge branch 'js/check-attr-cached'Junio C Hamano2011-10-053-47/+48
|\ \ \ \ \ \ \ \ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * js/check-attr-cached: t0003: remove extra whitespaces Teach '--cached' option to check-attr
| * | | | | | | | | t0003: remove extra whitespacesJunio C Hamano2011-09-221-46/+22
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The test had excess whitespaces everywhere that made it harder to read than necessary. Remove them. Signed-off-by: Junio C Hamano <gitster@pobox.com>
| * | | | | | | | | Teach '--cached' option to check-attrJay Soffian2011-09-223-4/+29
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This option causes check-attr to consider .gitattributes only from the index, ignoring .gitattributes from the working tree. This allows the command to be used in situations where a working tree does not exist. Signed-off-by: Jay Soffian <jaysoffian@gmail.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
* | | | | | | | | | Merge branch 'rj/maint-t9159-svn-rev-notation'Junio C Hamano2011-10-051-0/+8
|\ \ \ \ \ \ \ \ \ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * rj/maint-t9159-svn-rev-notation: t9159-*.sh: skip for mergeinfo test for svn <= 1.4
| * | | | | | | | | | t9159-*.sh: skip for mergeinfo test for svn <= 1.4Ramsay Jones2011-09-211-0/+8
| | |_|_|_|_|/ / / / | |/| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | t9159 relies on the command-line syntax of svn >= 1.5. Given the declining install base of older svn versions, it is not worth our time to support older svn syntax. Signed-off-by: Ramsay Jones <ramsay@ramsay1.demon.co.uk> Acked-by: Eric Wong <normalperson@yhbt.net> Signed-off-by: Junio C Hamano <gitster@pobox.com>
* | | | | | | | | | Merge branch 'cn/eradicate-working-copy'Junio C Hamano2011-10-054-6/+6
|\ \ \ \ \ \ \ \ \ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * cn/eradicate-working-copy: Remove 'working copy' from the documentation and C code
| * | | | | | | | | | Remove 'working copy' from the documentation and C codeCarlos Martín Nieto2011-09-214-6/+6
| | |/ / / / / / / / | |/| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The git term is 'working tree', so replace the most public references to 'working copy'. Signed-off-by: Carlos Martín Nieto <cmn@elego.de> Signed-off-by: Junio C Hamano <gitster@pobox.com>
* | | | | | | | | | Merge branch 'jn/gitweb-highlite-sanitise'Junio C Hamano2011-10-051-1/+13
|\ \ \ \ \ \ \ \ \ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * jn/gitweb-highlite-sanitise: gitweb: Strip non-printable characters from syntax highlighter output
| * | | | | | | | | | gitweb: Strip non-printable characters from syntax highlighter outputJakub Narebski2011-09-161-1/+13
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The current code, as is, passes control characters, such as form-feed (^L) to highlight which then passes it through to the browser. User agents (web browsers) that support 'application/xhtml+xml' usually require that web pages declared as XHTML and with this mimetype are well-formed XML. Unescaped control characters cannot appear within a contents of a valid XML document. This will cause the browser to display one of the following warnings: * Safari v5.1 (6534.50) & Google Chrome v13.0.782.112: This page contains the following errors: error on line 657 at column 38: PCDATA invalid Char value 12 Below is a rendering of the page up to the first error. * Mozilla Firefox 3.6.19 & Mozilla Firefox 5.0: XML Parsing Error: not well-formed Location: http://path/to/git/repo/blah/blah Both errors were generated by gitweb.perl v1.7.3.4 w/ highlight 2.7 using arch/ia64/kernel/unwind.c from the Linux kernel. When syntax highlighter is not used, control characters are replaced by esc_html(), but with syntax highlighter they were passed through to browser (to_utf8() doesn't remove control characters). Introduce sanitize() subroutine which strips forbidden characters, but does not perform HTML escaping, and use it in git_blob() to sanitize syntax highlighter output for XHTML. Note that excluding "\t" (U+0009), "\n" (U+000A) and "\r" (U+000D) is not strictly necessary, atleast for currently the only callsite: "\t" tabs are replaced by spaces by untabify(), "\n" is stripped from each line before processing it, and replacing "\r" could be considered improvement. Originally-by: Christopher M. Fuhrman <cfuhrman@panix.com> Signed-off-by: Jakub Narebski <jnareb@gmail.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
* | | | | | | | | | | Merge branch 'jc/ls-remote-short-help'Junio C Hamano2011-10-051-0/+3
|\ \ \ \ \ \ \ \ \ \ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * jc/ls-remote-short-help: ls-remote: a lone "-h" is asking for help
| * | | | | | | | | | | ls-remote: a lone "-h" is asking for helpjc/ls-remote-short-helpJunio C Hamano2011-09-161-0/+3
| | |_|_|_|_|_|_|_|/ / | |/| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | What should happen if you run this command? $ git ls-remote -h It does not give a short-help for the command. Instead because "-h" is a synonym for "--heads", it runs "git ls-remote --heads", and because there is no remote specified on the command line, we run it against the default "origin" remote, hence end up doing the same as $ git ls-remote --heads origin Fix this counter-intuitive behaviour by special casing a lone "-h" that does not have anything else on the command line and calling usage(). Signed-off-by: Junio C Hamano <gitster@pobox.com>
* | | | | | | | | | | Merge branch 'sn/doc-update-index-assume-unchanged'Junio C Hamano2011-10-051-2/+5
|\ \ \ \ \ \ \ \ \ \ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * sn/doc-update-index-assume-unchanged: Documentation/git-update-index: refer to 'ls-files'
| * | | | | | | | | | | Documentation/git-update-index: refer to 'ls-files'Stefan Naewe2011-09-211-2/+5
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 'ls-files' refers to 'update-index' to show how the 'assume unchanged' bit can be seen. This makes the connection 'bi-directional'. Signed-off-by: Stefan Naewe <stefan.naewe@gmail.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
* | | | | | | | | | | | Merge branch 'mg/maint-doc-sparse-checkout'Junio C Hamano2011-10-054-25/+31
|\ \ \ \ \ \ \ \ \ \ \ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * mg/maint-doc-sparse-checkout: git-read-tree.txt: correct sparse-checkout and skip-worktree description git-read-tree.txt: language and typography fixes unpack-trees: print "Aborting" to stderr
| * | | | | | | | | | | | git-read-tree.txt: correct sparse-checkout and skip-worktree descriptionMichael J Gruber2011-09-211-4/+4
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The description of .git/info/sparse-checkout and skip-worktree is exactly the opposite of what is true, which is: If a file matches a pattern in sparse-checkout, then (it is to be checked out and therefore) skip-worktree is unset for that file; otherwise, it is set (so that it is not checked out). Currently, the opposite is documented, and (consistently) read-tree's behavior with respect to bit flips is descibed incorrectly. Fix it. In hindsight, it would have been much better to have a "sparse-ignore" or "sparse-skip" file so that an empty file would mean a full checkout, and the file logic would be analogous to that of .gitignore, excludes and skip-worktree. Signed-off-by: Michael J Gruber <git@drmicha.warpmail.net> Signed-off-by: Junio C Hamano <gitster@pobox.com>