summaryrefslogtreecommitdiff
Commit message (Collapse)AuthorAgeFilesLines
* Record ns-timestamps if possible, but do not use it without USE_NSECKjetil Barvik2009-03-075-30/+22
| | | | | | | | | | | | | | | | | Traditionally, the lack of USE_NSEC meant "do not record nor use the nanosecond resolution part of the file timestamps". To avoid problems on filesystems that lose the ns part when the metadata is flushed to the disk and then later read back in, disabling USE_NSEC has been a good idea in general. If you are on a filesystem without such an issue, it does not hurt to read and store them in the cached stat data in the index entries even if your git is compiled without USE_NSEC. The index left with such a version of git can be read by git compiled with USE_NSEC and it can make use of the nanosecond part to optimize the check to see if the path on the filesystem hsa been modified since we last looked at. Signed-off-by: Junio C Hamano <gitster@pobox.com>
* write_index(): update index_state->timestamp after flushing to diskKjetil Barvik2009-02-232-3/+11
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Since this timestamp is used to check for racy-clean files, it is important to keep it uptodate. For the 'git checkout' command without the '-q' option, this make a huge difference. Before, each and every file which was updated, was racy-clean after the call to unpack_trees() and write_index() but before the GIT process ended. And because of the call to show_local_changes() in builtin-checkout.c, we ended up reading those files back into memory, doing a SHA1 to check if the files was really different from the index. And, of course, no file was different. With this fix, 'git checkout' without the '-q' option should now be almost as fast as with the '-q' option, but not quite, as we still do some few lstat(2) calls more without the '-q' option. Below is some average numbers for 10 checkout's to v2.6.27 and 10 to v2.6.25 of the Linux kernel, to show the difference: before (git version 1.6.2.rc1.256.g58a87): 7.860 user 2.427 sys 19.465 real 52.8% CPU faults: 0 major 95331 minor after: 6.184 user 2.160 sys 17.619 real 47.4% CPU faults: 0 major 38994 minor Signed-off-by: Kjetil Barvik <barvik@broadpark.no> Signed-off-by: Junio C Hamano <gitster@pobox.com>
* verify_uptodate(): add ce_uptodate(ce) testKjetil Barvik2009-02-191-1/+1
| | | | | | | | | | | | | | | | | | | | | | | If we inside verify_uptodate() can already tell from the ce entry that it is already uptodate by testing it with ce_uptodate(ce), there is no need to call lstat(2) and ie_match_stat() afterwards. And, reading from the commit log message from: commit eadb5831342bb2e756fa05c03642c4aa1929d4f5 Author: Junio C Hamano <gitster@pobox.com> Date: Fri Jan 18 23:45:24 2008 -0800 Avoid running lstat(2) on the same cache entry. this also seems to be correct usage of the ce_uptodate() macro introduced by that patch. This will avoid lots of lstat(2) calls in some cases, for example by running the 'git checkout' command. Signed-off-by: Kjetil Barvik <barvik@broadpark.no> Signed-off-by: Junio C Hamano <gitster@pobox.com>
* make USE_NSEC work as expectedKjetil Barvik2009-02-193-19/+65
| | | | | | | | | | | | | | | | | | | | | | | | | Since the filesystem ext4 is now defined as stable in Linux v2.6.28, and ext4 supports nanonsecond resolution timestamps natively, it is time to make USE_NSEC work as expected. This will make racy git situations less likely to happen. For 'git checkout' this means it will be less likely that we have to open, read the contents of the file into RAM, and check if file is really modified or not. The result sould be a litle less used CPU time, less pagefaults and a litle faster program, at least for 'git checkout'. Since the number of possible racy git situations would increase when disks gets faster, this patch would be more and more helpfull as times go by. For a fast Solid State Disk, this patch should be helpfull. Note that, when file operations starts to take less than 1 nanosecond, one would again start to get more racy git situations. For more info on racy git, see Documentation/technical/racy-git.txt For more info on ext4, see http://kernelnewbies.org/Ext4 Signed-off-by: Kjetil Barvik <barvik@broadpark.no> Signed-off-by: Junio C Hamano <gitster@pobox.com>
* fix compile error when USE_NSEC is definedKjetil Barvik2009-02-191-2/+2
| | | | | | | | | 'struct cache' does not have a 'usec' member, but a 'unsigned int nsec' member. Simmilar 'struct stat' does not have a 'st_mtim.usec' member, and we should instead use 'st_mtim.tv_nsec'. Signed-off-by: Kjetil Barvik <barvik@broadpark.no> Signed-off-by: Junio C Hamano <gitster@pobox.com>
* check_updates(): effective removal of cache entries marked CE_REMOVEKjetil Barvik2009-02-183-3/+22
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Below is oprofile output from GIT command 'git chekcout -q my-v2.6.25' (move from tag v2.6.27 to tag v2.6.25 of the Linux kernel): CPU: Core 2, speed 1999.95 MHz (estimated) Counted CPU_CLK_UNHALTED events (Clock cycles when not halted) with a unit mask of 0x00 (Unhalted core cycles) count 20000 Counted INST_RETIRED_ANY_P events (number of instructions retired) with a unit mask of 0x00 (No unit mask) count 20000 CPU_CLK_UNHALT...|INST_RETIRED:2...| samples| %| samples| %| ------------------------------------ 409247 100.000 342878 100.000 git CPU_CLK_UNHALT...|INST_RETIRED:2...| samples| %| samples| %| ------------------------------------ 260476 63.6476 257843 75.1996 libz.so.1.2.3 100876 24.6492 64378 18.7758 kernel-2.6.28.4_2.vmlinux 30850 7.5382 7874 2.2964 libc-2.9.so 14775 3.6103 8390 2.4469 git 2020 0.4936 4325 1.2614 libcrypto.so.0.9.8 191 0.0467 32 0.0093 libpthread-2.9.so 58 0.0142 36 0.0105 ld-2.9.so 1 2.4e-04 0 0 libldap-2.3.so.0.2.31 Detail list of the top 20 function entries (libz counted in one blob): CPU_CLK_UNHALTED INST_RETIRED_ANY_P samples % samples % image name symbol name 260476 63.6862 257843 75.2725 libz.so.1.2.3 /lib/libz.so.1.2.3 16587 4.0555 3636 1.0615 libc-2.9.so memcpy 7710 1.8851 277 0.0809 libc-2.9.so memmove 3679 0.8995 1108 0.3235 kernel-2.6.28.4_2.vmlinux d_validate 3546 0.8670 2607 0.7611 kernel-2.6.28.4_2.vmlinux __getblk 3174 0.7760 1813 0.5293 libc-2.9.so _int_malloc 2396 0.5858 3681 1.0746 kernel-2.6.28.4_2.vmlinux copy_to_user 2270 0.5550 2528 0.7380 kernel-2.6.28.4_2.vmlinux __link_path_walk 2205 0.5391 1797 0.5246 kernel-2.6.28.4_2.vmlinux ext4_mark_iloc_dirty 2103 0.5142 1203 0.3512 kernel-2.6.28.4_2.vmlinux find_first_zero_bit 2077 0.5078 997 0.2911 kernel-2.6.28.4_2.vmlinux do_get_write_access 2070 0.5061 514 0.1501 git cache_name_compare 2043 0.4995 1501 0.4382 kernel-2.6.28.4_2.vmlinux rcu_irq_exit 2022 0.4944 1732 0.5056 kernel-2.6.28.4_2.vmlinux __ext4_get_inode_loc 2020 0.4939 4325 1.2626 libcrypto.so.0.9.8 /usr/lib/libcrypto.so.0.9.8 1965 0.4804 1384 0.4040 git patch_delta 1708 0.4176 984 0.2873 kernel-2.6.28.4_2.vmlinux rcu_sched_grace_period 1682 0.4112 727 0.2122 kernel-2.6.28.4_2.vmlinux sysfs_slab_alias 1659 0.4056 290 0.0847 git find_pack_entry_one 1480 0.3619 1307 0.3816 kernel-2.6.28.4_2.vmlinux ext4_writepage_trans_blocks Notice the memmove line, where the CPU did 7710 / 277 = 27.8 cycles per instruction, and compared to the total cycles spent inside the source code of GIT for this command, all the memmove() calls translates to (7710 * 100) / 14775 = 52.2% of this. Retesting with a GIT program compiled for gcov usage, I found out that the memmove() calls came from remove_index_entry_at() in read-cache.c, where we have: memmove(istate->cache + pos, istate->cache + pos + 1, (istate->cache_nr - pos) * sizeof(struct cache_entry *)); remove_index_entry_at() is called 4902 times from check_updates() in unpack-trees.c, and each time called we move each cache_entry pointers (from the removed one) one step to the left. Since we have 28828 entries in the cache this time, and if we on average move half of them each time, we in total move approximately 4902 * 0.5 * 28828 * 4 = 282 629 712 bytes, or twice this amount if each pointer is 8 bytes (64 bit). OK, is seems that the function check_updates() is called 28 times, so the estimated guess above had been more correct if check_updates() had been called only once, but the point is: we get lots of bytes moved. To fix this, and use an O(N) algorithm instead, where N is the number of cache_entries, we delete/remove all entries in one loop through all entries. From a retest, the new remove_marked_cache_entries() from the patch below, ended up with the following output line from oprofile: 46 0.0105 15 0.0041 git remove_marked_cache_entries If we can trust the numbers from oprofile in this case, we saved approximately ((7710 - 46) * 20000) / (2 * 1000 * 1000 * 1000) = 0.077 seconds CPU time with this fix for this particular test. And notice that now the CPU did only 46 / 15 = 3.1 cycles/instruction. Signed-off-by: Kjetil Barvik <barvik@broadpark.no> Acked-by: Linus Torvalds <torvalds@linux-foundation.org> Signed-off-by: Junio C Hamano <gitster@pobox.com>
* lstat_cache(): print a warning if doing ping-pong between cache typesKjetil Barvik2009-02-091-0/+23
| | | | | | | | | | | | | | | | | | | | | | | | This is a debug patch which is only to be used while the lstat_cache() is in the test stage, and should be removed/reverted before the final relase. I think it should be useful to catch these warnings, as I it could be an indication of that the cache would not be very effective if it is doing ping-pong by switching between different cache types too many times. Also, if someone is experimenting with the lstat_cache(), this patch will maybe be useful while debugging. If someone is able to trigger the warning, then send a mail to the GIT mailing list, containing the first 15 lines of the warning, and a short description of the GIT commands to trigger the warnings. I hope someone is willing to use this patch for a while, to be able to catch possible ping-pong's. Signed-off-by: Kjetil Barvik <barvik@broadpark.no> Signed-off-by: Junio C Hamano <gitster@pobox.com>
* show_patch_diff(): remove a call to fstat()Kjetil Barvik2009-02-091-3/+1
| | | | | | | | | Currently inside show_patch_diff() we have an fstat() call after an ok lstat() call. Since before the call to fstat() we have already tested for the link case with S_ISLNK(), the fstat() can be removed. Signed-off-by: Kjetil Barvik <barvik@broadpark.no> Signed-off-by: Junio C Hamano <gitster@pobox.com>
* write_entry(): use fstat() instead of lstat() when file is openKjetil Barvik2009-02-091-3/+9
| | | | | | | | | | Currently inside write_entry() we do an lstat(path, &st) call on a file which have just been opened inside the exact same function. It should be better to call fstat(fd, &st) on the file while it is open, and it should be at least as fast as the lstat() method. Signed-off-by: Kjetil Barvik <barvik@broadpark.no> Signed-off-by: Junio C Hamano <gitster@pobox.com>
* write_entry(): cleanup of some duplicated codeKjetil Barvik2009-02-091-45/+30
| | | | | | | | | | The switch-cases for S_IFREG and S_IFLNK was so similar that it will be better to do some cleanup and use the common parts of it. And the entry.c file should now be clean for 'gcc -Wextra' warnings. Signed-off-by: Kjetil Barvik <barvik@broadpark.no> Signed-off-by: Junio C Hamano <gitster@pobox.com>
* create_directories(): remove some memcpy() and strchr() callsKjetil Barvik2009-02-091-9/+14
| | | | | | | | | | | Remove the call to memcpy() and strchr() for each path component tested, and instead add each path component as we go forward inside the while-loop. Impact: small optimisation Signed-off-by: Kjetil Barvik <barvik@broadpark.no> Signed-off-by: Junio C Hamano <gitster@pobox.com>
* unlink_entry(): introduce schedule_dir_for_removal()Kjetil Barvik2009-02-093-24/+67
| | | | | | | | | | | | | | | | | | | | Currently inside unlink_entry() if we get a successful removal of one file with unlink(), we try to remove the leading directories each and every time. So if one directory containing 200 files is moved to an other location we get 199 failed calls to rmdir() and 1 successful call. To fix this and avoid some unnecessary calls to rmdir(), we schedule each directory for removal and wait much longer before we do the real call to rmdir(). Since the unlink_entry() function is called with alphabetically sorted names, this new function end up being very effective to avoid unnecessary calls to rmdir(). In some cases over 95% of all calls to rmdir() is removed with this patch. Signed-off-by: Kjetil Barvik <barvik@broadpark.no> Signed-off-by: Junio C Hamano <gitster@pobox.com>
* lstat_cache(): swap func(length, string) into func(string, length)Kjetil Barvik2009-02-0910-20/+23
| | | | | | | | | | Swap function argument pair (length, string) into (string, length) to conform with the commonly used order inside the GIT source code. Also, add a note about this fact into the coding guidelines. Signed-off-by: Kjetil Barvik <barvik@broadpark.no> Signed-off-by: Junio C Hamano <gitster@pobox.com>
* lstat_cache(): generalise longest_match_lstat_cache()Kjetil Barvik2009-02-091-22/+24
| | | | | | | | Rename the function to longst_path_match() and generalise it such that it can also be used by other functions. Signed-off-by: Kjetil Barvik <barvik@broadpark.no> Signed-off-by: Junio C Hamano <gitster@pobox.com>
* lstat_cache(): small cleanup and optimisationKjetil Barvik2009-02-091-20/+24
| | | | | | | | | | | | | | | | | | Simplify the if-else test in longest_match_lstat_cache() such that we only have one simple if test. Instead of testing for 'i == cache.len' or 'i == len', we transform this to a common test for 'i == max_len'. And to further optimise we use 'i >= max_len' instead of 'i == max_len', the reason is that it is now the exact opposite of one part inside the while-loop termination expression 'i < max_len && name[i] == cache.path[i]', and then the compiler can probably reuse a test instruction from it. We also throw away the arguments to reset_lstat_cache(), such that all the safeguard logic inside lstat_cache() is handled at one place. Signed-off-by: Kjetil Barvik <barvik@broadpark.no> Signed-off-by: Junio C Hamano <gitster@pobox.com>
* git-web--browse: Fix check for /bin/startTodd Zullinger2009-02-091-1/+1
| | | | | | | | | | | The previous check in git-web--browse for /bin/start used test -n /bin/start, which was always true. This lead to "start" being tried first in the browser list. On systems with upstart installed, "start" exists and might be in the PATH, but it makes a poor choice for a web browser. Instead, test that /bin/start exists and is executable. Signed-off-by: Todd Zullinger <tmz@pobox.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
* Merge branch 'maint'Junio C Hamano2009-02-083-3/+28
|\ | | | | | | | | | | * maint: gitweb: add $prevent_xss option to prevent XSS by repository content rev-list: fix showing distance when using --bisect-all
| * gitweb: add $prevent_xss option to prevent XSS by repository contentMatt McCutchen2009-02-082-3/+27
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Add a gitweb configuration variable $prevent_xss that disables features to prevent content in repositories from launching cross-site scripting (XSS) attacks in the gitweb domain. Currently, this option makes gitweb ignore README.html (a better solution may be worked out in the future) and serve a blob_plain file of an untrusted type with "Content-Disposition: attachment", which tells the browser not to show the file at its original URL. The XSS prevention is currently off by default. Signed-off-by: Matt McCutchen <matt@mattmccutchen.net> Signed-off-by: Junio C Hamano <gitster@pobox.com>
| * rev-list: fix showing distance when using --bisect-allChristian Couder2009-02-081-0/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | Before d467a52 ("Make '--decorate' set an explicit 'show_decorations' flag", Nov 3 2008), commit decorations were shown whenever they exist, and distances stored in them by "git rev-list --bisect-all" were automatically shown. d467a52 changed the rule so that commit decorations are not shown unless rev_info explicitly asks to, with its show_decorations bit, but forgot that the ones "git rev-list --bisect-all" adds need to be shown. This patch fixes this old breakage. Signed-off-by: Christian Couder <chriscool@tuxfamily.org> Signed-off-by: Junio C Hamano <gitster@pobox.com>
* | completion: Get rid of tabbed indentation in comments. Replace with spaces.Ted Pavlic2009-02-081-5/+5
| | | | | | | | | | | | Signed-off-by: Ted Pavlic <ted@tedpavlic.com> Acked-by: Shawn O. Pearce <spearce@spearce.org> Signed-off-by: Junio C Hamano <gitster@pobox.com>
* | completion: Fix GIT_PS1_SHOWDIRTYSTATE to prevent unbound variable errors.Ted Pavlic2009-02-081-1/+1
| | | | | | | | | | | | Signed-off-by: Ted Pavlic <ted@tedpavlic.com> Acked-by: Shawn O. Pearce <spearce@spearce.org> Signed-off-by: Junio C Hamano <gitster@pobox.com>
* | doc/bundle: Use the more conventional suffix '.bundle'Santi Béjar2009-02-081-7/+7
| | | | | | | | | | | | | | | | | | Although it does not matter in general it is handled different by "git clone", as it removes it to make the "humanish" name of the new repository. Signed-off-by: Santi Béjar <santi@agolina.net> Signed-off-by: Junio C Hamano <gitster@pobox.com>
* | Add two extra tests for git rebaseJohannes Schindelin2009-02-081-1/+12
| |
* | Documentation: clarify commits affected by gitk --mergeSitaram Chamarty2009-02-081-1/+2
| | | | | | | | | | Signed-off-by: Sitaram Chamarty <sitaramc@gmail.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
* | add -p: get rid of Git.pm warnings about unitialized valuesStephan Beyer2009-02-081-1/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | After invoking git add -p I always got the warnings: Use of uninitialized value $_[3] in exec at Git.pm line 1282. Use of uninitialized value $args[2] in join or string at Git.pm line 1264. A bisect showed that these warnings occur in a301973 "add -p: print errors in separate color" the first time. They can be reproduced by setting color.ui (or color.interactive) to "auto" and unsetting color.interactive.help and color.interactive.error. I am using Perl 5.10.0. The reason of the warning is that color.interactive.error defaults to color.interactive.help which defaults to nothing in the specific codepath. It defaults to 'red bold' some lines above which could lead to the wrong assumption that it always defaults to 'red bold' now. This patch lets it default to 'red bold', blowing the warnings away. Signed-off-by: Stephan Beyer <s-beyer@gmx.net> Acked-By: Thomas Rast <trast@student.ethz.ch> Signed-off-by: Junio C Hamano <gitster@pobox.com>
* | GIT 1.6.2-rc0v1.6.2-rc0Junio C Hamano2009-02-072-16/+58
| | | | | | | | Signed-off-by: Junio C Hamano <gitster@pobox.com>
* | Merge branch 'tr/add-p-single'Junio C Hamano2009-02-072-16/+73
|\ \ | | | | | | | | | | | | | | | | | | * tr/add-p-single: add -p: import Term::ReadKey with 'require' add -p: print errors in separate color add -p: prompt for single characters
| * | add -p: import Term::ReadKey with 'require'Thomas Rast2009-02-071-1/+4
| | | | | | | | | | | | | | | | | | | | | | | | | | | eval{use...} is no good because the 'use' is evaluated at compile time, so manually 'require' it. We need to forward declare the functions we use, otherwise Perl raises a compilation error. Signed-off-by: Thomas Rast <trast@student.ethz.ch> Signed-off-by: Junio C Hamano <gitster@pobox.com>
| * | add -p: print errors in separate colorThomas Rast2009-02-052-12/+22
| | | | | | | | | | | | | | | | | | | | | | | | Print interaction error messages in color.interactive.error, which defaults to the value of color.interactive.help. Signed-off-by: Thomas Rast <trast@student.ethz.ch> Signed-off-by: Junio C Hamano <gitster@pobox.com>
| * | add -p: prompt for single charactersThomas Rast2009-02-052-4/+48
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Use Term::ReadKey, if available and enabled with interactive.singlekey, to let the user answer add -p's prompts by pressing a single key. We're not doing the same in the main 'add -i' interface because file selection etc. may expect several characters. Two commands take an argument: 'g' can easily cope since it'll just offer a choice of chunks. '/' now (unconditionally, even without readkey) offers a chance to enter a regex if none was given. Signed-off-by: Thomas Rast <trast@student.ethz.ch> Signed-off-by: Junio C Hamano <gitster@pobox.com>
* | | Merge branch 'js/filter-branch-submodule'Junio C Hamano2009-02-072-14/+17
|\ \ \ | | | | | | | | | | | | | | | | | | | | * js/filter-branch-submodule: filter-branch: do not consider diverging submodules a 'dirty worktree' filter-branch: Fix fatal error on bare repositories
| * | | filter-branch: do not consider diverging submodules a 'dirty worktree'Johannes Schindelin2009-02-051-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | At the end of filter-branch in a non-bare repository, the work tree is updated with "read-tree -m -u HEAD", to carry the change forward in case the current branch was rewritten. In order to avoid losing any local change during this step, filter-branch refuses to work when there are local changes in the work tree. This "read-tree -m -u HEAD" operation does not affect what commit is checked out in a submodule (iow, it does not touch .git/HEAD in a submodule checkout), and checking if there is any local change to the submodule is not useful. Staged submodules _are_ considered to be 'dirty', however, as the "read-tree -m -u HEAD" could result in loss of staged information otherwise. Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de> Signed-off-by: Junio C Hamano <gitster@pobox.com>
| * | | filter-branch: Fix fatal error on bare repositoriesEric Kidd2009-02-032-13/+16
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | When git filter-branch is run on a bare repository, it prints out a fatal error message: $ git filter-branch branch Rewrite 476c4839280c219c2317376b661d9d95c1727fc3 (9/9) WARNING: Ref 'refs/heads/branch' is unchanged fatal: This operation must be run in a work tree Note that this fatal error message doesn't prevent git filter-branch from exiting successfully. (Why doesn't git filter-branch actually exit with an error when a shell command fails? I'm not sure why it was designed this way.) This error message is caused by the following section of code at the end of git-filter-branch.sh: if [ "$(is_bare_repository)" = false ]; then unset GIT_DIR GIT_WORK_TREE GIT_INDEX_FILE test -z "$ORIG_GIT_DIR" || { GIT_DIR="$ORIG_GIT_DIR" && export GIT_DIR } ... elided ... git read-tree -u -m HEAD fi The problem is the call to $(is_bare_repository), which is made before GIT_DIR and GIT_WORK_TREE are restored. This call always returns "false", even when we're running in a bare repository. But this means that we will attempt to call 'git read-tree' even in a bare repository, which will fail and print an error. This patch modifies git-filter-branch.sh to restore the original environment variables before trying to call is_bare_repository. Signed-off-by: Junio C Hamano <gitster@pobox.com>
* | | | Merge branch 'maint'Junio C Hamano2009-02-071-0/+32
|\ \ \ \ | | |_|/ | |/| | | | | | | | | | | | | | | | | | | | | | | | | | * maint: GIT 1.6.1.3 Conflicts: GIT-VERSION-GEN RelNotes
| * | | GIT 1.6.1.3v1.6.1.3Junio C Hamano2009-02-073-2/+34
| | | | | | | | | | | | | | | | Signed-off-by: Junio C Hamano <gitster@pobox.com>
* | | | emacs: Remove the no longer maintained vc-git package.Alexandre Julliard2009-02-072-217/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | vc-git is distributed with Emacs since version 22.2, and is maintained in the Emacs CVS tree. This file is obsolete and causes trouble for people who want to add contrib/emacs to their load-path. Signed-off-by: Alexandre Julliard <julliard@winehq.org>
* | | | git.el: Add some notes about Emacs versions compatibility.Alexandre Julliard2009-02-071-2/+10
| | | | | | | | | | | | | | | | Signed-off-by: Alexandre Julliard <julliard@winehq.org>
* | | | git.el: Use integer instead of character constants in case statement.Alexandre Julliard2009-02-071-15/+15
| | | | | | | | | | | | | | | | | | | | | | | | This is for compatibility with XEmacs. Reported by Vassili Karpov. Signed-off-by: Alexandre Julliard <julliard@winehq.org>
* | | | git.el: Set a regexp for paragraph-separate in log-edit mode.Alexandre Julliard2009-02-071-0/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | This allows using fill-paragraph on the log message without interference from the various header fields. Signed-off-by: Alexandre Julliard <julliard@winehq.org>
* | | | git.el: Make git-run-command-region display the error if any.Alexandre Julliard2009-02-071-19/+19
| | | | | | | | | | | | | | | | | | | | | | | | This makes it easier to figure out why a commit has failed. Signed-off-by: Alexandre Julliard <julliard@winehq.org>
* | | | git.el: Add commands for cherry-pick and revert.Alexandre Julliard2009-02-071-0/+42
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Support for cherry-picking and reverting commits, with automatic formatting of the commit log message. Bound to C-c C-p and C-c C-v respectively. Signed-off-by: Alexandre Julliard <julliard@winehq.org>
* | | | git.el: Add a command to create a new branch.Alexandre Julliard2009-02-071-0/+14
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Prompts for a branch name, create a new branch at HEAD and switch to it. Bound to C-c C-b by default. Based on a patch by Rémi Vanicat <vanicat@debian.org>. Signed-off-by: Alexandre Julliard <julliard@winehq.org>
* | | | git.el: Add a checkout command.Alexandre Julliard2009-02-071-2/+31
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Prompts for a branch name and checks it out. Bound to C-c C-o by default. Based on a patch by Rémi Vanicat <vanicat@debian.org>. Signed-off-by: Alexandre Julliard <julliard@winehq.org>
* | | | Merge branch 'js/maint-remote-remove-mirror'Junio C Hamano2009-02-052-7/+58
|\ \ \ \ | | | | | | | | | | | | | | | | | | | | | | | | | * js/maint-remote-remove-mirror: builtin-remote: make rm operation safer in mirrored repository builtin-remote: make rm() use properly named variable to hold return value
| * | | | builtin-remote: make rm operation safer in mirrored repositoryJay Soffian2009-02-042-2/+53
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | "git remote rm <repo>" happily removes non-remote refs and their reflogs. This may be okay if the repository truely is a mirror, but if the user had done "git remote add --mirror <repo>" by accident and was just undoing their mistake, then they are left in a situation that is difficult to recover from. After this commit, "git remote rm" skips over non-remote refs. The user is advised on how remove branches using "git branch -d", which itself has nice safety checks wrt to branch removal lacking from "git remote rm". Non-remote non-branch refs are skipped silently. Signed-off-by: Jay Soffian <jaysoffian@gmail.com> Acked-by: Jeff King <peff@peff.net> Signed-off-by: Junio C Hamano <gitster@pobox.com>
| * | | | builtin-remote: make rm() use properly named variable to hold return valueJay Soffian2009-02-031-5/+5
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | "i" is a loop counter and should not be used to hold a return value; use "result" instead which is consistent with the rest of builtin-remote.c. Signed-off-by: Jay Soffian <jaysoffian@gmail.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
* | | | | Merge branch 'js/notes'Junio C Hamano2009-02-0515-0/+504
|\ \ \ \ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * js/notes: git-notes: fix printing of multi-line notes notes: fix core.notesRef documentation Add an expensive test for git-notes Speed up git notes lookup Add a script to edit/inspect notes Introduce commit notes Conflicts: pretty.c
| * | | | | git-notes: fix printing of multi-line notesTor Arne Vestbø2009-01-142-7/+38
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The line length was read from the same position every time, causing mangled output when printing notes with multiple lines. Also, adding new-line manually for each line ensures that we get a new-line between commits, matching git-log for commits without notes. Signed-off-by: Tor Arne Vestbø <tavestbo@trolltech.com> Acked-by: Johannes Schindelin <johannes.schindelin@gmx.de> Signed-off-by: Junio C Hamano <gitster@pobox.com>
| * | | | | notes: fix core.notesRef documentationThomas Rast2009-01-131-6/+4
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The path format was inconsistent with the one used in git-notes.sh: it supposedly split the sha1 in the same 2/38 format that .git/objects uses, but the code uses the full sha1 without a path separator. While at it, also fix a grammatical error. Signed-off-by: Thomas Rast <trast@student.ethz.ch> Acked-by: Johannes Schindelin <johannes.schindelin@gmx.de> Signed-off-by: Junio C Hamano <gitster@pobox.com>
| * | | | | Add an expensive test for git-notesJohannes Schindelin2009-01-111-0/+98
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | git-notes have the potential of being pretty expensive, so test with a lot of commits. A lot. So to make things cheaper, you have to opt-in explicitely, by setting the environment variable GIT_NOTES_TIMING_TESTS. Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de> Signed-off-by: Junio C Hamano <gitster@pobox.com>