- 26 5月, 2009 4 次提交
-
-
由 Junio C Hamano 提交于
When find-copies-harder is in effect, the diff frontends are expected to feed all paths, not just changed paths, to the diffcore, so that copy sources can be picked up. In such a case, not descending into subtrees using the cache-tree information is simply wrong. Signed-off-by: NJunio C Hamano <gitster@pobox.com>
-
由 Junio C Hamano 提交于
When running "diff-index --cached" after making a change to only a small portion of the index, there is no point unpacking unchanged subtrees into the index recursively, only to find that all entries match anyway. Tweak unpack_trees() logic that is used to read in the tree object to catch the case where the tree entry we are looking at matches the index as a whole by looking at the cache-tree. As an exercise, after modifying a few paths in the kernel tree, here are a few numbers on my Athlon 64X2 3800+: (without patch, hot cache) $ /usr/bin/time git diff --cached --raw :100644 100644 b57e1f5... e69de29... M Makefile :100644 000000 8c86b72... 0000000... D arch/x86/Makefile :000000 100644 0000000... e69de29... A arche 0.07user 0.02system 0:00.09elapsed 102%CPU (0avgtext+0avgdata 0maxresident)k 0inputs+0outputs (0major+9407minor)pagefaults 0swaps (with patch, hot cache) $ /usr/bin/time ../git.git/git-diff --cached --raw :100644 100644 b57e1f5... e69de29... M Makefile :100644 000000 8c86b72... 0000000... D arch/x86/Makefile :000000 100644 0000000... e69de29... A arche 0.02user 0.00system 0:00.02elapsed 103%CPU (0avgtext+0avgdata 0maxresident)k 0inputs+0outputs (0major+2446minor)pagefaults 0swaps Cold cache numbers are very impressive, but it does not matter very much in practice: (without patch, cold cache) $ su root sh -c 'echo 3 >/proc/sys/vm/drop_caches' $ /usr/bin/time git diff --cached --raw :100644 100644 b57e1f5... e69de29... M Makefile :100644 000000 8c86b72... 0000000... D arch/x86/Makefile :000000 100644 0000000... e69de29... A arche 0.06user 0.17system 0:10.26elapsed 2%CPU (0avgtext+0avgdata 0maxresident)k 247032inputs+0outputs (1172major+8237minor)pagefaults 0swaps (with patch, cold cache) $ su root sh -c 'echo 3 >/proc/sys/vm/drop_caches' $ /usr/bin/time ../git.git/git-diff --cached --raw :100644 100644 b57e1f5... e69de29... M Makefile :100644 000000 8c86b72... 0000000... D arch/x86/Makefile :000000 100644 0000000... e69de29... A arche 0.02user 0.01system 0:01.01elapsed 3%CPU (0avgtext+0avgdata 0maxresident)k 18440inputs+0outputs (79major+2369minor)pagefaults 0swaps This of course helps "git status" as well. (without patch, hot cache) $ /usr/bin/time ../git.git/git-status >/dev/null 0.17user 0.18system 0:00.35elapsed 100%CPU (0avgtext+0avgdata 0maxresident)k 0inputs+5336outputs (0major+10970minor)pagefaults 0swaps (with patch, hot cache) $ /usr/bin/time ../git.git/git-status >/dev/null 0.10user 0.16system 0:00.27elapsed 99%CPU (0avgtext+0avgdata 0maxresident)k 0inputs+5336outputs (0major+3921minor)pagefaults 0swaps Signed-off-by: NJunio C Hamano <gitster@pobox.com>
-
由 Junio C Hamano 提交于
This is one of the oldest scripts; update it to match more modern style. Notably, we should: - Put the test title on the same line as the "test_expect_success", and end the line with a single-quote to begin the body of the test which is one multi-line string; and - Run as many commands inside test_expect_success, not outside, to catch unexpected breakages. Signed-off-by: NJunio C Hamano <gitster@pobox.com>
-
由 Junio C Hamano 提交于
Earlier cache_tree_find() needs to be called with a valid cache_tree, but repeated look-up may find an invalid or missing cache_tree in between. Help simplify the callers by returning NULL to mean "nothing appropriate found" when the input is NULL. Signed-off-by: NJunio C Hamano <gitster@pobox.com>
-
- 21 5月, 2009 1 次提交
-
-
由 Junio C Hamano 提交于
This allows you to discard the cache-tree information before writing the tree out of the index (i.e. it always recomputes the tree object names for all the subtrees). This is only useful as a debug option, so I did not bother documenting it. Signed-off-by: NJunio C Hamano <gitster@pobox.com>
-
- 20 5月, 2009 2 次提交
-
-
由 Heiko Voigt 提交于
At the moment non-ascii encodings of filenames are not portably converted between different filesystems by git. This will most likely change in the future but to allow repositories to be portable among different file/operating systems this check is enabled by default. Signed-off-by: NHeiko Voigt <hvoigt@hvoigt.net> Signed-off-by: NJunio C Hamano <gitster@pobox.com>
-
由 Dan McGee 提交于
Our hash_obj and hashtable_index calls and functions were doing a lot of funny things with signedness. Unify all of it to 'unsigned int'. Signed-off-by: NDan McGee <dpmcgee@gmail.com> Signed-off-by: NJunio C Hamano <gitster@pobox.com>
-
- 19 5月, 2009 5 次提交
-
-
由 Junio C Hamano 提交于
* np/push-delta: allow OFS_DELTA objects during a push
-
由 Junio C Hamano 提交于
* ar/merge-one-file-diag: Clarify kind of conflict in merge-one-file helper
-
由 Junio C Hamano 提交于
* ar/unlink-err: print unlink(2) errno in copy_or_link_directory replace direct calls to unlink(2) with unlink_or_warn Introduce an unlink(2) wrapper which gives warning if unlink failed
-
由 Junio C Hamano 提交于
* jk/maint-add-empty: add: don't complain when adding empty project root
-
由 Junio C Hamano 提交于
* js/add-edit: t3702: fix reliance on SHELL_PATH being '/bin/sh' git-add: introduce --edit (to edit the diff vs. the index)
-
- 18 5月, 2009 6 次提交
-
-
由 Junio C Hamano 提交于
* mh/diff-stat-color: diff: do not color --stat output like patch context
-
由 Junio C Hamano 提交于
* mh/show-branch-color: bash completion: show-branch color support show-branch: color the commit status signs Conflicts: contrib/completion/git-completion.bash
-
由 Junio C Hamano 提交于
* ac/graph-horizontal-line: graph API: Use horizontal lines for more compact graphs
-
由 Junio C Hamano 提交于
* ae/anon-fetch-info: fetch: Strip usernames from url's before storing them
-
由 Junio C Hamano 提交于
* maint: show-branch: Fix die message in parse_reflog_param()
-
由 Stephen Boyd 提交于
Commit 76a44c5c (show-branch --reflog: show the reflog message at the top, 2007-01-19) introduced parse_reflog_param(). The die() call was incorrectly passed arg + 9, when it should have been passed arg. Signed-off-by: NStephen Boyd <bebarino@gmail.com> Signed-off-by: NJunio C Hamano <gitster@pobox.com>
-
- 17 5月, 2009 16 次提交
-
-
由 Junio C Hamano 提交于
* maint: completion: add missing options to show-branch and show dir.c: clean up handling of 'path' parameter in read_directory_recursive() Fix type-punning issues
-
由 Stephen Boyd 提交于
Add --oneline and --abbrev-commit to show and --sparse to show-branch. Signed-off-by: NStephen Boyd <bebarino@gmail.com> Signed-off-by: NJunio C Hamano <gitster@pobox.com>
-
由 Linus Torvalds 提交于
Right now we pass two different pathnames ('path' and 'base') down to read_directory_recursive(), and the only real reason for that is that we want to allow an empty 'base' parameter, but when we do so, we need the pathname to "opendir()" to be "." rather than the empty string. And rather than handle that confusion in the caller, we can just fix read_directory_recursive() to handle the case of an empty path itself, by just passing opendir() a "." ourselves if the path is empty. This would allow us to then drop one of the pathnames entirely from the calling convention, but rather than do that, we'll start separating them out as a "filesystem pathname" (the one we use for filesystem accesses) and a "git internal base name" (which is the name that we use for git internally). That will eventually allow us to do things like handle different encodings (eg the filesystem pathnames might be Latin1, while git itself would use UTF-8 for filename information). Signed-off-by: NLinus Torvalds <torvalds@linux-foundation.org> Signed-off-by: NJunio C Hamano <gitster@pobox.com>
-
由 Dan McGee 提交于
In these two places we are casting part of our unsigned char sha1 array into an unsigned int, which violates GCCs strict-aliasing rules (and probably other compilers). Signed-off-by: NDan McGee <dpmcgee@gmail.com> Signed-off-by: NJunio C Hamano <gitster@pobox.com>
-
由 Junio C Hamano 提交于
* maint: test: checkout shouldn't say that HEAD has moved if it didn't completion: enhance "current branch" display completion: simplify "current branch" in __git_ps1() completion: fix PS1 display during a merge on detached HEAD builtin-checkout: Don't tell user that HEAD has moved before it has pre-commit.sample: don't print incidental SHA1 tests: Add tests for missing format-patch long options api-parse-options.txt: use 'func' instead of 'funct' Turn on USE_ST_TIMESPEC for OpenBSD ls-tree manpage: output of ls-tree is compatible with update-index ls-tree manpage: use "unless" instead of "when ... is not"
-
由 Nanako Shiraishi 提交于
Signed-off-by: Nしらいしななこ <nanako3@lavabit.com> Signed-off-by: NJunio C Hamano <gitster@pobox.com>
-
由 Junio C Hamano 提交于
Introduce GIT_PS1_DESCRIBE option you can set to "contains", "branch", or "describe" to tweak the way how a detached HEAD is described. The default behaviour is to describe only exact match with some tag (otherwise use the first 7 hexdigits) as before. Signed-off-by: NJunio C Hamano <gitster@pobox.com>
-
由 Junio C Hamano 提交于
As I very often work on a detached HEAD, I found it pretty confusing when __git_ps1() said 'some-name'. Did I create a branch with that name by mistake, or do I happen to be on a commit with that exact tag? This patch fixes the issue by enclosing non branch names in a pair of parentheses when used to substitute %s token in __git_ps1() argument. It also fixes a small bug where the branch part is left empty when .git/HEAD is unreadable for whatever reason. The output now says "(unknown)". Signed-off-by: NJunio C Hamano <gitster@pobox.com>
-
由 Junio C Hamano 提交于
If your merge stops in a conflict while on a detached HEAD, recent completion code fails to show anything. This was because various cases added to support the operation-in-progress markers (e.g. REBASE, MERGING) forgot that they need to set the variable "b" to something for the result they computed to be displayed at all. Probably not many people make trial merges on a detached HEAD (which is tremendously useful feature of git, by the way), and that may be why this was not noticed for a long time. Acked-By: NShawn O. Pearce <spearce@spearce.org> Signed-off-by: NJunio C Hamano <gitster@pobox.com>
-
由 Alex Riesen 提交于
Strip leading and trailing spaces off guessed target directory, and replace sequences of whitespace and 'control' characters with one space character. User still can have any name by specifying it explicitely after url. Signed-off-by: NAlex Riesen <raa.lkml@gmail.com> Signed-off-by: NJunio C Hamano <gitster@pobox.com>
-
由 Alex Riesen 提交于
An old iconv (GNU libiconv 1.11) does not know about utf8, it does know UTF-8 though, which is also understood by all newer iconv implementations. Signed-off-by: NAlex Riesen <raa.lkml@gmail.com> Signed-off-by: NJunio C Hamano <gitster@pobox.com>
-
由 Daniel Cordero 提交于
Previously, checkout would tell the user this message before moving HEAD, without regard to whether the upcoming move will result in success. If the move failed, this causes confusion. Show the message after the move, unless the move failed. Signed-off-by: NDaniel Cordero <theappleman@gmail.com> Signed-off-by: NJunio C Hamano <gitster@pobox.com>
-
由 Jim Meyering 提交于
Make the sample pre-commit hook script discard all git-rev-parse output, not just stderr. Otherwise, it would print an SHA1. Signed-off-by: NJim Meyering <meyering@redhat.com> Signed-off-by: NJunio C Hamano <gitster@pobox.com>
-
由 Stephen Boyd 提交于
Exercise format-patch's --signoff, --in-reply-to and --start-number long options. Signed-off-by: NStephen Boyd <bebarino@gmail.com> Signed-off-by: NJunio C Hamano <gitster@pobox.com>
-
由 Stephen Boyd 提交于
Signed-off-by: NStephen Boyd <bebarino@gmail.com> Signed-off-by: NJunio C Hamano <gitster@pobox.com>
-
由 Tony Kemp 提交于
Like Darwin, OpenBSD's stat struct uses st_ctimespec and st_mtimestruct rather than st_ctim and st_mtim. Signed-off-by: NTony Kemp <tony.kemp@newcastle.edu.au> Signed-off-by: NJunio C Hamano <gitster@pobox.com>
-
- 16 5月, 2009 1 次提交
-
-
由 Junio C Hamano 提交于
* maint-1.6.2: ls-tree manpage: output of ls-tree is compatible with update-index ls-tree manpage: use "unless" instead of "when ... is not"
-
- 14 5月, 2009 5 次提交
-
-
由 Junio C Hamano 提交于
* maint-1.6.1: ls-tree manpage: output of ls-tree is compatible with update-index ls-tree manpage: use "unless" instead of "when ... is not"
-
由 Junio C Hamano 提交于
* maint-1.6.0: ls-tree manpage: output of ls-tree is compatible with update-index ls-tree manpage: use "unless" instead of "when ... is not"
-
由 Alex Riesen 提交于
The fmt-merge-msg does a strong syntax checking of its input and fails with if it is incorrect. The LF character is the only character important for fmt-merge-msg. As the url in FETCH_HEAD plays only informational role, a quoted representation of the url should be good and true enough. The url often comes from either user-editable config or command line, so it is reasonable to expect all kinds of characters in it, including the characters which the format of FETCH_HEAD considers special (line separator in this case). Noticed and reported by Hugo Mildenberger. Signed-off-by: NAlex Riesen <raa.lkml@gmail.com> Signed-off-by: NJunio C Hamano <gitster@pobox.com>
-
由 Michael J Gruber 提交于
'git check-ref-format' checks for the presence of at least one '/', the idea being that there should be no refs directly below 'refs/', so there should be a category like 'heads/' or 'tags/' in a refname. Try and make this clearer in the man page. Signed-off-by: NMichael J Gruber <git@drmicha.warpmail.net> Signed-off-by: NJunio C Hamano <gitster@pobox.com>
-
由 Stephen Boyd 提交于
This makes it easier for users to get and unset their configuration variables without having to open documentation or dig through their configuration file. __git_config_get_set_variables() retrieves the set configuration variables from the appropriate configuration file. For example, if the user has previously specified --global only the global variables are returned. The same applies for --system, and --file. If no location has been specified, all set variables are returned. Signed-off-by: NStephen Boyd <bebarino@gmail.com> Acked-by: NShawn O. Pearce <spearce@spearce.org> Signed-off-by: NJunio C Hamano <gitster@pobox.com>
-