aboutsummaryrefslogtreecommitdiff
Commit message (Collapse)AuthorAge
* Add support for the Mongoose web server.Wilhansen Li2009-08-23
| | | | | | | | | Mongoose (http://code.google.com/p/mongoose/) is a lightweight web server. It's just a single binary so it's a lot simpler to configure and install. Signed-off-by: Wilhansen Li <wil@nohakostudios.net> Signed-off-by: Junio C Hamano <gitster@pobox.com>
* git-compat-util.h: remove superfluous test for __sun__Brandon Casey2009-08-19
| | | | | | | | | | This 'ifndef' macro is entered only when __sun__ is not defined. This test will never fail since it is located inside of the 'else' branch of an 'if' macro which tests whether __sun__ is defined. It has had no effect since the merge at 436f66b7. Signed-off-by: Brandon Casey <casey@nrlssc.navy.mil> Signed-off-by: Junio C Hamano <gitster@pobox.com>
* Merge branch 'rc/maint-http-fix'Junio C Hamano2009-08-18
|\ | | | | | | | | * rc/maint-http-fix: http.c: don't assume that urls don't end with slash
| * http.c: don't assume that urls don't end with slashTay Ray Chuan2009-08-18
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Make append_remote_object_url() (and by implication, get_remote_object_url) use end_url_with_slash() to ensure that the url ends with a slash. Previously, they assumed that the url did not end with a slash and as a result appended a slash, sometimes errorneously. This fixes an issue introduced in 5424bc5 ("http*: add helper methods for fetching objects (loose)"), where the append_remote_object_url() implementation in http-push.c, which assumed that urls end with a slash, was replaced by another one in http.c, which assumed urls did not end with a slash. The above issue was raised by Thomas Schlichter: http://marc.info/?l=git&m=125043105231327 Signed-off-by: Tay Ray Chuan <rctay89@gmail.com> Tested-by: Thomas Schlichter <thomas.schlichter@web.de> Signed-off-by: Junio C Hamano <gitster@pobox.com>
* | Merge branch 'tr/maint-1.6.3-add-p-modeonly-fix'Junio C Hamano2009-08-18
|\ \ | | | | | | | | | | | | | | | * tr/maint-1.6.3-add-p-modeonly-fix: add -p: do not attempt to coalesce mode changes git add -p: demonstrate failure when staging both mode and hunk
| * | add -p: do not attempt to coalesce mode changesThomas Rast2009-08-15
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | In 0392513 (add-interactive: refactor mode hunk handling, 2009-04-16), we merged the interaction loops for mode changes and hunk staging. This was fine at the time, because 0beee4c (git-add--interactive: remove hunk coalescing, 2008-07-02) removed hunk coalescing. However, in 7a26e65 (Revert "git-add--interactive: remove hunk coalescing", 2009-05-16), we resurrected it. Since then, the code would attempt in vain to merge mode changes with diff hunks, corrupting both in the process. We add a check to the coalescing loop to ensure it only looks at diff hunks, thus skipping mode changes. Noticed-by: Kirill Smelkov <kirr@mns.spb.ru> Signed-off-by: Thomas Rast <trast@student.ethz.ch> Signed-off-by: Junio C Hamano <gitster@pobox.com>
| * | git add -p: demonstrate failure when staging both mode and hunkKirill Smelkov2009-08-15
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | When trying to stage changes to file which has also pending `chmod +x`, `git add -p` produces lots of 'Use of uninitialized value ...' warnings and fails to do the job: $ echo content >> file $ chmod +x file $ git add -p diff --git a/file b/file index e69de29..d95f3ad --- a/file +++ b/file old mode 100644 new mode 100755 Stage mode change [y,n,q,a,d,/,j,J,g,?]? y @@ -0,0 +1 @@ +content Stage this hunk [y,n,q,a,d,/,K,g,e,?]? y Use of uninitialized value $o_ofs in addition (+) at .../git-add--interactive line 776. Use of uninitialized value $ofs in numeric le (<=) at .../git-add--interactive line 806. Use of uninitialized value $o0_ofs in concatenation (.) or string at .../git-add--interactive line 830. Use of uninitialized value $n0_ofs in concatenation (.) or string at .../git-add--interactive line 830. Use of uninitialized value $o_ofs in addition (+) at .../git-add--interactive line 776. fatal: corrupt patch at line 5 diff --git a/file b/file index e69de29..d95f3ad --- a/file +++ b/file @@ -,0 + @@ +content Signed-off-by: Kirill Smelkov <kirr@mns.spb.ru> Signed-off-by: Junio C Hamano <gitster@pobox.com>
* | | graph API: use a new color when starting a brand new columnAdam Simpkins2009-08-18
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Use a new color for commits that don't have any previously printed children. The following command demonstrates the changes: git log --graph --pretty=tformat:'%h %s%n' -7 481c7a6 18b0793 Now the two independent lines of development are displayed with different colors, instead of both using the same color. Signed-off-by: Adam Simpkins <simpkins@facebook.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
* | | git-svn: Use GIT_SSH setting if SVN_SSH is not setKarthik R2009-08-18
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | If SVN_SSH is defined, it will be used. Else value in GIT_SSH is copied to SVN_SSH & then, only on Windows, the \s are escaped. On Windows, the shell-variables must be set as follows GIT_SSH="C:\Program Files\PuTTY\plink.exe" SVN_SSH="C:\\Program Files\\PuTTY\\plink.exe" See http://code.google.com/p/msysgit/issues/detail?id=305 [ew: fixed indentation to use tabs] Acked-by: Eric Wong <normalperson@yhbt.net> Signed-off-by: Karthik Rajagopalan <karthikr@fastmail.fm>
* | | svn: assume URLs from the command-line are URI-encodedEric Wong2009-08-18
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | And then unescape them when writing to $GIT_CONFIG. SVN has different rules for repository URLs (usually the root) and for paths within that repository (below the HTTP layer). Thus, for the request URI path at the HTTP level, the URI needs to be encoded. However, in the body of the HTTP request (the with underlying SVN XML protocol), those paths should not be URI-encoded[1]. For non-HTTP(S) requests, SVN appears to be more flexible and will except weird characters in the URL as well as URI-encoded ones. Since users are used to using URLs being entirely URI-encoded, git svn will now attempt to unescape the path portion of URLs while leaving the actual repository URL untouched. This change will be reflected in newly-created $GIT_CONFIG files only. This allows users to switch between svn(+ssh)://, file:// and http(s):// urls without changing the fetch/branches/tags config keys. This won't affect existing imports at all (since things didn't work before this commit anyways), and will allow users to force escaping into repository paths that look like they're escaped (but are not). Thanks to Mike Smullin for the original bug report and Björn Steinbrink for summarizing it into testable cases for me. [1] Except when committing copies/renames, see commit 29633bb91c7bcff31ff3bb59378709e3e3ef627d Signed-off-by: Eric Wong <normalperson@yhbt.net>
* | | git-svn.txt: Fix location of parent argumentTuomas Suutari2009-08-18
| | | | | | | | | | | | | | | | | | | | | | | | The note about interoperating in different timezones and such is about localtime argument, not parent. Signed-off-by: Tuomas Suutari <tuomas.suutari@gmail.com> Acked-by: Eric Wong <normalperson@yhbt.net>
* | | Merge branch 'maint'Junio C Hamano2009-08-18
|\ \ \ | | | | | | | | | | | | | | | | | | | | | | | | * maint: filter-branch: make the usage string fit on 80 chars terminals. filter-branch: add an example how to add ACKs to a range of commits docs: describe impact of repack on "clone -s"
| * | | filter-branch: make the usage string fit on 80 chars terminals.Matthieu Moy2009-08-18
| | | | | | | | | | | | | | | | | | | | | | | | | | | | It used to be a single, huge line, badly wrapped by xterm. Signed-off-by: Matthieu Moy <Matthieu.Moy@imag.fr> Signed-off-by: Junio C Hamano <gitster@pobox.com>
| * | | filter-branch: add an example how to add ACKs to a range of commitsJohannes Schindelin2009-08-18
| | |/ | |/| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | When you have to add certain lines like ACKs (or for that matter, Signed-off-by:s) to a range of commits starting with HEAD, you might be tempted to use 'git rebase -i -10', but that is a waste of your time. It is better to use 'git filter-branch' with an appropriate message filter, and this commit adds an example how to do so to filter-branch's man page. Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de> Signed-off-by: Junio C Hamano <gitster@pobox.com>
| * | docs: describe impact of repack on "clone -s"Jeff King2009-08-17
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The effects of repacking on a repository with alternates are a bit subtle. The two main things users will want are: 1. Not to waste disk space by accidentally copying objects which could be shared. 2. Copying all objects explicitly to break the dependency on the source repo. This patch describes both under the "clone -s" documentation. It makes sense to put it there rather than in git-repack.txt for both cases. For (1), we are warning the user who is using "clone -s" about what _not_ to do, so we need to get their attention when reading about "clone -s". For (2), we are telling them how git-repack can be used to accomplish a task, but until they know that git-repack is the right tool, they have no reason to look at the repack documentation. Signed-off-by: Jeff King <peff@peff.net> Signed-off-by: Junio C Hamano <gitster@pobox.com>
* | | Merge branch 'lt/block-sha1'Junio C Hamano2009-08-16
|\ \ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * lt/block-sha1: block-sha1/sha1.c: silence compiler complaints by casting void * to char * block-sha1: more good unaligned memory access candidates block-sha1: support for architectures with memory alignment restrictions block-sha1: split the different "hacks" to be individually selected block-sha1: move code around block-sha1: improve code on large-register-set machines block-sha1: improved SHA1 hashing block-sha1: perform register rotation using cpp block-sha1: get rid of redundant 'lenW' context block-sha1: Use '(B&C)+(D&(B^C))' instead of '(B&C)|(D&(B|C))' in round 3 block-sha1: macroize the rounds a bit further block-sha1: re-use the temporary array as we calculate the SHA1 block-sha1: make the 'ntohl()' part of the first SHA1 loop block-sha1: minor fixups block-sha1: try to use rol/ror appropriately block-sha1: undo ctx->size change Add new optimized C 'block-sha1' routines
| * | | block-sha1/sha1.c: silence compiler complaints by casting void * to char *Brandon Casey2009-08-14
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Some compilers produce errors when arithmetic is attempted on pointers to void. We want computations done on byte addresses, so cast them to char * to work them around. Signed-off-by: Brandon Casey <casey@nrlssc.navy.mil> Signed-off-by: Junio C Hamano <gitster@pobox.com>
| * | | block-sha1: more good unaligned memory access candidatesNicolas Pitre2009-08-13
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | In addition to X86, PowerPC and S390 are capable of unaligned memory accesses. Signed-off-by: Nicolas Pitre <nico@cam.org> Signed-off-by: Junio C Hamano <gitster@pobox.com>
| * | | block-sha1: support for architectures with memory alignment restrictionsNicolas Pitre2009-08-12
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This is needed on architectures with poor or non-existent unaligned memory support and/or no fast byte swap instruction (such as ARM) by using byte accesses to memory and shifting the result together. This also makes the code portable, therefore the byte access methods are the defaults. Any architecture that properly supports unaligned word accesses in hardware simply has to enable the alternative methods. Signed-off-by: Nicolas Pitre <nico@cam.org> Signed-off-by: Junio C Hamano <gitster@pobox.com>
| * | | block-sha1: split the different "hacks" to be individually selectedNicolas Pitre2009-08-12
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This is to make it easier for them to be selected individually depending on the architecture instead of the other way around i.e. having each architecture select a list of hacks up front. That makes for clearer documentation as well. Signed-off-by: Nicolas Pitre <nico@cam.org> Signed-off-by: Junio C Hamano <gitster@pobox.com>
| * | | block-sha1: move code aroundNicolas Pitre2009-08-12
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Move the code around so specific architecture hacks are defined first. Also make one line comments actually one line. No code change. Signed-off-by: Nicolas Pitre <nico@cam.org> Signed-off-by: Junio C Hamano <gitster@pobox.com>
| * | | block-sha1: improve code on large-register-set machinesLinus Torvalds2009-08-10
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | For x86 performance (especially in 32-bit mode) I added that hack to write the SHA1 internal temporary hash using a volatile pointer, in order to get gcc to not try to cache the array contents. Because gcc will do all the wrong things, and then spill things in insane random ways. But on architectures like PPC, where you have 32 registers, it's actually perfectly reasonable to put the whole temporary array[] into the register set, and gcc can do so. So make the 'volatile unsigned int *' cast be dependent on a SMALL_REGISTER_SET preprocessor symbol, and enable it (currently) on just x86 and x86-64. With that, the routine is fairly reasonable even when compared to the hand-scheduled PPC version. Ben Herrenschmidt reports on a G5: * Paulus asm version: about 3.67s * Yours with no change: about 5.74s * Yours without "volatile": about 3.78s so with this the C version is within about 3% of the asm one. And add a lot of commentary on what the heck is going on. Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org> Signed-off-by: Junio C Hamano <gitster@pobox.com>
| * | | block-sha1: improved SHA1 hashingLinus Torvalds2009-08-07
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | I think I have found a way to avoid the gcc crazyness. Lookie here: # TIME[s] SPEED[MB/s] rfc3174 5.094 119.8 rfc3174 5.098 119.7 linus 1.462 417.5 linusas 2.008 304 linusas2 1.878 325 mozilla 5.566 109.6 mozillaas 5.866 104.1 openssl 1.609 379.3 spelvin 1.675 364.5 spelvina 1.601 381.3 nettle 1.591 383.6 notice? I outperform all the hand-tuned asm on 32-bit too. By quite a margin, in fact. Now, I didn't try a P4, and it's possible that it won't do that there, but the 32-bit code generation sure looks impressive on my Nehalem box. The magic? I force the stores to the 512-bit hash bucket to be done in order. That seems to help a lot. The diff is trivial (on top of the "rename registers with cpp" patch), as appended. And it does seem to fix the P4 issues too, although I can obviously (once again) only test Prescott, and only in 64-bit mode: # TIME[s] SPEED[MB/s] rfc3174 1.662 36.73 rfc3174 1.64 37.22 linus 0.2523 241.9 linusas 0.4367 139.8 linusas2 0.4487 136 mozilla 0.9704 62.9 mozillaas 0.9399 64.94 that's some really impressive improvement. All from just saying "do the stores in the order I told you to, dammit!" to the compiler. Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org> Signed-off-by: Junio C Hamano <gitster@pobox.com>
| * | | block-sha1: perform register rotation using cppLinus Torvalds2009-08-07
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Instead of letting the compiler to figure out the optimal way to rotate register usage, explicitly rotate the register names with cpp. Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org> Signed-off-by: Junio C Hamano <gitster@pobox.com>
| * | | block-sha1: get rid of redundant 'lenW' contextLinus Torvalds2009-08-06
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | .. and simplify the ctx->size logic. We now count the size in bytes, which means that 'lenW' was always just the low 6 bits of the total size, so we don't carry it around separately any more. And we do the 'size in bits' shift at the end. Suggested by Nicolas Pitre and linux@horizon.com. Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org> Signed-off-by: Junio C Hamano <gitster@pobox.com>
| * | | block-sha1: Use '(B&C)+(D&(B^C))' instead of '(B&C)|(D&(B|C))' in round 3Linus Torvalds2009-08-06
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | It's an equivalent expression, but the '+' gives us some freedom in instruction selection (for example, we can use 'lea' rather than 'add'), and associates with the other additions around it to give some minor scheduling freedom. Suggested-by: linux@horizon.com Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org> Signed-off-by: Junio C Hamano <gitster@pobox.com>
| * | | block-sha1: macroize the rounds a bit furtherLinus Torvalds2009-08-06
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Avoid repeating the shared parts of the different rounds by adding a macro layer or two. It was already more cpp than C. Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org> Signed-off-by: Junio C Hamano <gitster@pobox.com>
| * | | block-sha1: re-use the temporary array as we calculate the SHA1Linus Torvalds2009-08-06
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The mozilla-SHA1 code did this 80-word array for the 80 iterations. But the SHA1 state is really just 512 bits, and you can actually keep it in a kind of "circular queue" of just 16 words instead. This requires us to do the xor updates as we go along (rather than as a pre-phase), but that's really what we want to do anyway. This gets me really close to the OpenSSL performance on my Nehalem. Look ma, all C code (ok, there's the rol/ror hack, but that one doesn't strictly even matter on my Nehalem, it's just a local optimization). Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org> Signed-off-by: Junio C Hamano <gitster@pobox.com>
| * | | block-sha1: make the 'ntohl()' part of the first SHA1 loopLinus Torvalds2009-08-06
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This helps a teeny bit. But what I -really- want to do is to avoid the whole 80-array loop, and do the xor updates as I go along.. Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org> Signed-off-by: Junio C Hamano <gitster@pobox.com>
| * | | block-sha1: minor fixupsJunio C Hamano2009-08-06
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Bert Wesarg noticed non-x86 version of SHA_ROT() had a typo. Also spell in-line assembly as __asm__(), otherwise I seem to get error: implicit declaration of function 'asm' from my compiler. Signed-off-by: Junio C Hamano <gitster@pobox.com>
| * | | block-sha1: try to use rol/ror appropriatelyLinus Torvalds2009-08-06
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Use the one with the smaller constant. It _can_ generate slightly smaller code (a constant of 1 is special), but perhaps more importantly it's possibly faster on any uarch that does a rotate with a loop. Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org> Signed-off-by: Junio C Hamano <gitster@pobox.com>
| * | | block-sha1: undo ctx->size changeJunio C Hamano2009-08-06
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Undo the change I picked up from the mailing list discussion suggested by Nico, not because it is wrong, but it will be done at the end of the follow-up series. Signed-off-by: Junio C Hamano <gitster@pobox.com>
| * | | Add new optimized C 'block-sha1' routinesLinus Torvalds2009-08-05
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Based on the mozilla SHA1 routine, but doing the input data accesses a word at a time and with 'htonl()' instead of loading bytes and shifting. It requires an architecture that is ok with unaligned 32-bit loads and a fast htonl(). Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org> Signed-off-by: Junio C Hamano <gitster@pobox.com>
* | | | Merge branch 'bc/maint-am-email'Junio C Hamano2009-08-16
|\ \ \ \ | | | | | | | | | | | | | | | | | | | | | | | | | * bc/maint-am-email: git-am: print fair error message when format detection fails am: allow individual e-mail files as input
| * | | | git-am: print fair error message when format detection failsNicolas Sebrecht2009-08-10
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Avoid git ending with this message: "Patch format is not supported." With improved error message in the format detection failure case by Giuseppe Bilotta. Signed-off-by: Nicolas Sebrecht <ni.s@laposte.net> Signed-off-by: Brandon Casey <drafnel@gmail.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
| * | | | am: allow individual e-mail files as inputJunio C Hamano2009-08-10
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | We traditionally allowed a mbox file or a directory name of a maildir (but never an individual file inside a maildir) to be given to "git am". Even though an individual file in a maildir (or more generally, a piece of RFC2822 e-mail) is not a mbox file, it contains enough information to create a commit out of it, so there is no reason to reject one. Running mailsplit on such a file feels stupid, but it does not hurt. This builds on top of a5a6755 (git-am foreign patch support: introduce patch_format, 2009-05-27) that introduced mailbox format detection. The codepath to deal with a mbox requires it to begin with "From " line and also allows it to begin with "From: ", but a random piece of e-mail can and often do begin with any valid RFC2822 header lines. Instead of checking the first line, we extract all the lines up to the first empty line, and make sure they look like e-mail headers. A test is added to t4150 to demonstrate this feature. Signed-off-by: Junio C Hamano <gitster@pobox.com> Signed-off-by: Brandon Casey <drafnel@gmail.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
* | | | | Merge branch 'js/maint-cover-letter-non-ascii'Junio C Hamano2009-08-16
|\ \ \ \ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * js/maint-cover-letter-non-ascii: Correctly mark cover letters' encodings if they are not pure ASCII Expose the has_non_ascii() function
| * | | | | Correctly mark cover letters' encodings if they are not pure ASCIIJohannes Schindelin2009-08-10
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | If your name is, say, Üwë, you want your cover letters to appear correctly. Convince format-patch to mark it as 8-bit. Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de> Signed-off-by: Junio C Hamano <gitster@pobox.com>
| * | | | | Expose the has_non_ascii() functionJohannes Schindelin2009-08-10
| |/ / / / | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This function is useful outside of log-tree.c, too. Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de> Signed-off-by: Junio C Hamano <gitster@pobox.com>
* | | | | Merge branch 'jc/maint-clean-nested-dir-safety'Junio C Hamano2009-08-16
|\ \ \ \ \ | | | | | | | | | | | | | | | | | | | | | | | | * jc/maint-clean-nested-dir-safety: clean: require double -f options to nuke nested git repository and work tree
| * | | | | clean: require double -f options to nuke nested git repository and work treeJunio C Hamano2009-07-29
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | When you have an embedded git work tree in your work tree (be it an orphaned submodule, or an independent checkout of an unrelated project), "git clean -d -f" blindly descended into it and removed everything. This is rarely what the user wants. Signed-off-by: Junio C Hamano <gitster@pobox.com>
* | | | | | Merge branch 'jk/maint-merge-msg-fix'Junio C Hamano2009-08-16
|\ \ \ \ \ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * jk/maint-merge-msg-fix: merge: indicate remote tracking branches in merge message merge: fix incorrect merge message for ambiguous tag/branch add tests for merge message headings
| * | | | | | merge: indicate remote tracking branches in merge messageJeff King2009-08-09
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Previously when merging directly from a local tracking branch like: git merge origin/master The merge message said: Merge commit 'origin/master' * commit 'origin/master': ... Instead, let's be more explicit about what we are merging: Merge remote branch 'origin/master' * origin/master: ... We accomplish this by recognizing remote tracking branches in git-merge when we build the simulated FETCH_HEAD output that we feed to fmt-merge-msg. In addition to a new test in t7608, we have to tweak the expected output of t3409, which does such a merge. Signed-off-by: Jeff King <peff@peff.net> Signed-off-by: Junio C Hamano <gitster@pobox.com>
| * | | | | | merge: fix incorrect merge message for ambiguous tag/branchJeff King2009-08-09
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | If we have both a tag and a branch named "foo", then calling "git merge foo" will warn about the ambiguous ref, but merge the tag. When generating the commit message, though, we simply checked whether "refs/heads/foo" existed, and if it did, assumed it was a branch. This led to the statement "Merge branch 'foo'" in the commit message, which is quite wrong. Instead, we should use dwim_ref to find the actual ref used, and describe it appropriately. In addition to the test in t7608, we must also tweak the expected output of t4202, which was accidentally triggering this bug. Signed-off-by: Jeff King <peff@peff.net> Signed-off-by: Junio C Hamano <gitster@pobox.com>
| * | | | | | add tests for merge message headingsJeff King2009-08-09
| | |/ / / / | |/| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | When calling "git merge $X", we automatically generate a commit message containing something like "Merge branch '$X'". This test script checks that those messages say what they should, and exposes a failure when merging a refname that is ambiguous between a tag and a branch. Signed-off-by: Jeff King <peff@peff.net> Signed-off-by: Junio C Hamano <gitster@pobox.com>
* | | | | | Merge git://git.kernel.org/pub/scm/gitk/gitkJunio C Hamano2009-08-16
|\ \ \ \ \ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * git://git.kernel.org/pub/scm/gitk/gitk: gitk: Parse arbitrary commit-ish in SHA1 field gitk: Fix direction of symmetric difference in optimized mode gitk: New option to hide remote refs gitk: Do not hard-code "encoding" in attribute lookup functions
| * | | | | | gitk: Parse arbitrary commit-ish in SHA1 fieldThomas Rast2009-08-13
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | We only accepted either SHA1s or heads/tags that have been read. This meant the user could not, e.g., enter HEAD to go back to the current commit. This adds code to call out to git rev-parse --verify if all other methods of interpreting the string the user entered fail. (git-rev-parse alone is not enough as we really want a single revision.) The error paths change slighly, because we now know from the rev-parse invocation whether the expression was valid at all. The previous "unknown" path is now only triggered if the revision does exist, but is not in the current view display. Signed-off-by: Thomas Rast <trast@student.ethz.ch> Signed-off-by: Paul Mackerras <paulus@samba.org>
| * | | | | | gitk: Fix direction of symmetric difference in optimized modeThomas Rast2009-08-13
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | ee66e08 (gitk: Make updates go faster, 2008-05-09) implemented an optimized mode where gitk parses the arguments with rev-parse, and manually reads history in chunks. As mentioned in the commit message, symmetric differences are a problem there: One wrinkle is that we have to turn symmetric diff arguments (of the form a...b) back into symmetric diff form so that --left-right still works, as git rev parse turns a...b into a b ^merge_base(a,b). However, git-rev-parse returns a...b in the swapped order b a ^merge_base(a,b) This has been the case since at least 1f8115b (the state of master at the time of the abovementioned ee66e08; Merge branch 'maint', 2008-05-08). So gitk flipped the sides of symmetric differences whenever it was in optimized mode. Fix this by swapping the sides of the reconstruction code. Signed-off-by: Thomas Rast <trast@student.ethz.ch> Signed-off-by: Paul Mackerras <paulus@samba.org>
| * | | | | | gitk: New option to hide remote refsThomas Rast2009-08-13
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | In repositories with lots of remotes, looking at the history in gitk can be borderline insane with all the red labels for remote refs. Introduce a new option in the preferences that makes gitk ignore remote refs entirely, so they don't take up space in the display. Wished-for-by: Thell Fowler <tbfowler4@gmail.com> Signed-off-by: Thomas Rast <trast@student.ethz.ch> Signed-off-by: Paul Mackerras <paulus@samba.org>
| * | | | | | gitk: Do not hard-code "encoding" in attribute lookup functionsJohannes Sixt2009-08-13
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Commit 39ee47e (Clean up file encoding code and add enable/disable option, 2008-10-15) rewrote the attribute lookup functions gitattr and cache_gitattr, but in the process hard-coded the attribute name "encoding" instead of using the functions' parameters. This fixes it. This is not a serious regression because currently all callers look only for "encoding". Further note that this fix assumes that future callers will not pass an attribute name that contains regex special characters. Signed-off-by: Johannes Sixt <j6t@kdbg.org> Signed-off-by: Paul Mackerras <paulus@samba.org>