summaryrefslogtreecommitdiff
AgeCommit message (Collapse)AuthorFilesLines
2007-06-30diffcore-delta.c: Ignore CR in CRLF for text filesLibravatar Junio C Hamano2-3/+44
This ignores CR byte in CRLF sequence in text file when computing similarity of two blobs. Usually this should not matter as nobody sane would be checking in a file with CRLF line endings to the repository (they would use autocrlf so that the repository copy would have LF line endings). Signed-off-by: Junio C Hamano <gitster@pobox.com>
2007-06-30diffcore-delta.c: update the comment on the algorithm.Libravatar Junio C Hamano1-12/+9
The comment at the top of the file described an old algorithm that was neutral to text/binary differences (it hashed sliding window of N-byte sequences and counted overlaps), but long time ago we switched to a new heuristics that are more suitable for line oriented (read: text) files that are much faster. Signed-off-by: Junio C Hamano <gitster@pobox.com>
2007-06-30diffcore_filespec: add is_binaryLibravatar Junio C Hamano2-0/+17
diffcore-break and diffcore-rename would want to behave slightly differently depending on the binary-ness of the data, so add one bit to the filespec, as the structure is now passed down to diffcore_count_changes() function. Signed-off-by: Junio C Hamano <gitster@pobox.com>
2007-06-30diffcore_count_changes: pass diffcore_filespecLibravatar Junio C Hamano4-10/+8
We may want to use richer information on the data we are dealing with in this function, so instead of passing a buffer address and length, just pass the diffcore_filespec structure. Existing callers always call this function with parameters taken from a filespec anyway, so there is no functionality changes. Signed-off-by: Junio C Hamano <gitster@pobox.com>
2007-06-30Don't fflush(stdout) when it's not helpfulLibravatar Theodore Ts'o6-1/+55
This patch arose from a discussion started by Jim Meyering's patch whose intention was to provide better diagnostics for failed writes. Linus proposed a better way to do things, which also had the added benefit that adding a fflush() to git-log-* operations and incremental git-blame operations could improve interactive respose time feel, at the cost of making things a bit slower when we aren't piping the output to a downstream program. This patch skips the fflush() calls when stdout is a regular file, or if the environment variable GIT_FLUSH is set to "0". This latter can speed up a command such as: GIT_FLUSH=0 strace -c -f -e write time git-rev-list HEAD | wc -l a tiny amount. Signed-off-by: "Theodore Ts'o" <tytso@mit.edu> Acked-by: Linus Torvalds <torvalds@linux-foundation.org> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2007-06-30Merge branch 'cr/tag'Libravatar Junio C Hamano7-24/+1087
* cr/tag: Add test-script for git-tag Add test script for git-stripspace. Fix git-stripspace to process correctly long lines and spaces.
2007-06-30git: Try a bit harder not to lose errno in stdioLibravatar Linus Torvalds1-4/+5
This switches the checks around upon the exit codepath of the git wrapper, so that we may recover at least non-transient errors. It's still not perfect. As I've been harping on, stdio simply isn't very good for error reporting. For example, if an IO error happened, you'd want to see EIO, wouldn't you? And yes, that's what the kernel would return. However, with buffered stdio (and flushing outside of our control), what would likely happen is that some intermediate error return _does_ return EIO, but then the kernel might decide to re-mount the filesystem read-only due to the error, and the actual *report* for us might be "write failure on standard output: read-only filesystem" which lost the EIO. Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2007-06-30Merge branch 'lt/run'Libravatar Junio C Hamano1-22/+49
* lt/run: Check for IO errors after running a command Clean up internal command handling
2007-06-30Merge branch 'maint'Libravatar Junio C Hamano3-7/+17
* maint: Correct the name of NO_R_TO_GCC_LINKER in the comment describing it. git-remote: document -n repack: improve documentation on -a option
2007-06-30Correct the name of NO_R_TO_GCC_LINKER in the comment describing it.Libravatar Matt Kraai1-3/+3
Signed-off-by: Matt Kraai <kraai@ftbfs.org> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2007-06-30git-remote: document -nLibravatar Sam Vilain1-0/+7
The 'show' and 'prune' commands accept an option '-n'; document what it does. Signed-off-by: Sam Vilain <sam.vilain@catalyst.net.nz> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2007-06-30repack: improve documentation on -a optionLibravatar Sam Vilain1-4/+7
Some minor enhancements to the git-repack manual page. Signed-off-by: Sam Vilain <sam.vilain@catalyst.net.nz> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2007-06-30git-tag: Fix "can't shift that many".Libravatar Alexandre Vassalotti1-5/+24
This stop git-tag from emitting a "shift: can't shift that many" error, when listing tags. [jc: with further fixups from Sam Vilain merged in; it passes the tests under dash now] Signed-off-by: Alexandre Vassalotti <alexandre@peadrop.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2007-06-30Correct usages of sed in git-tag for Mac OS XLibravatar Shawn O. Pearce2-9/+14
Both `git-tag -l` and `git tag -v` fail on Mac OS X due to their non-standard uses of sed. Actually `git tag -v` fails because the underlying git-tag-verify uses a non-standard sed command. We now stick to only standard sed, which does make our sed scripts slightly more complicated, but we can actually list tags with more than 0 lines of additional context and we can verify signed tags with gpg. These major Git functions are much more important than saving two or three lines of a simple sed script. Signed-off-by: Shawn O. Pearce <spearce@spearce.org> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2007-06-29Update draft Release Notes for 1.5.3Libravatar Junio C Hamano1-13/+88
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2007-06-28Merge branch 'maint'Libravatar Junio C Hamano0-0/+0
* maint:
2007-06-28Merge branch 'master' of git://repo.or.cz/git-guiLibravatar Junio C Hamano3-21/+59
* 'master' of git://repo.or.cz/git-gui: git-gui: Don't require a .pvcsrc to create Tools/Migrate menu hack git-gui: Don't nice git blame on MSYS as nice is not supported git-gui: Don't require $DISPLAY just to get --version git-gui: Quiet our installation process git-gui: Bind Tab/Shift-Tab to cycle between panes in blame git-gui: Correctly install to /usr/bin on Cygwin
2007-06-28Merge branch 'maint' of git://repo.or.cz/git-gui into maintLibravatar Junio C Hamano3-12/+26
* 'maint' of git://repo.or.cz/git-gui: git-gui: Don't require a .pvcsrc to create Tools/Migrate menu hack git-gui: Don't nice git blame on MSYS as nice is not supported git-gui: Don't require $DISPLAY just to get --version git-gui: Bind Tab/Shift-Tab to cycle between panes in blame git-gui: Correctly install to /usr/bin on Cygwin
2007-06-28Avoid perl in t1300-repo-configLibravatar Alex Riesen1-12/+10
It fixes the test on system where ActiveState Perl is used. Signed-off-by: Alex Riesen <raa.lkml@gmail.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2007-06-28git-cvsimport: force checkout of working tree after initial importLibravatar Gerrit Pape1-1/+1
When creating a brand new git repository through git-cvsimport (not incremental import), force a checkout of HEAD of master as working tree after successful import using the -f switch to git checkout. Otherwise the working tree is empty, and all files are reported as 'deleted' by git status. This was noticed and reported by Cameron Dale through http://bugs.debian.org/430903 Signed-off-by: Gerrit Pape <pape@smarden.org> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2007-06-28Add test-script for git-tagLibravatar Carlos Rica4-0/+686
These tests are useful to develop the C version for git-tag.sh, ensuring that the future builtin-tag.c will not break previous behaviour. The tests are focused on listing, verifying, deleting and creating tags, checking always that the correct status value is returned and everything remains as expected. In order to verify and create signed tags, a PGP key was also added, being created this way: gpg --homedir t/t7004 --gen-key Type DSA and Elgamal, size 2048 bits, no expiration date. Name and email: C O Mitter <committer@example.com> No password given, to enable non-interactive operation. Signed-off-by: Carlos Rica <jasampler@gmail.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2007-06-27git-log: detect dup and fdopen failureLibravatar Jim Meyering2-1/+17
This defines xdup() and xfdopen() in git-compat-util.h to give us error-catching variants of them without cluttering the code too much. Signed-off-by: Jim Meyering <jim@meyering.net> Acked-by: Linus Torvalds <torvalds@linux-foundation.org> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2007-06-27git-send-email: make options easier to configure.Libravatar Adam Roben2-30/+36
This change makes git-send-email's behavior easier to modify by adding config equivalents for two more of git-send-email's flags. The mapping of flag to config setting is: --[no-]supress-from => sendemail.suppressfrom --[no-]signed-off-cc => sendemail.signedoffcc It renames the --threaded option to --thread/--no-thread; the config variable is also called sendemail.thread. Signed-off-by: Adam Roben <aroben@apple.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2007-06-27Merge branch 'master' of git://git.kernel.org/pub/scm/gitk/gitkLibravatar Junio C Hamano1-2/+2
* 'master' of git://git.kernel.org/pub/scm/gitk/gitk: gitk: Update selection background colorbar in prefs dialog gitk: Use a spinbox for setting tabstop settings
2007-06-28gitk: Update selection background colorbar in prefs dialogLibravatar Mark Levedahl1-1/+1
The callback function was incorrectly set to update the background colorbar when updated the selection background. This did not affect the colors chosen or their use, just their presentation in the preferences dialog box. Signed-off-by: Mark Levedahl <mdl123@verizon.net>
2007-06-28gitk: Use a spinbox for setting tabstop settingsLibravatar Mark Levedahl1-1/+1
The tabstop must be a smallish positive integer, and a spinbox is the accepted UI control to accomplish this limiting rather than the text entry box previously used. Signed-off-by: Mark Levedahl <mdl123@verizon.net>
2007-06-26Add test script for git-stripspace.Libravatar Carlos Rica1-0/+355
These tests check some features that git-stripspace already has and those that it should manage well: Removing trailing spaces from lines, removing blank lines at the beginning and end, unifying multiple lines between paragraphs, doing the correct when there is no newline at the last line, etc. It seems that the implementation needs to save the whole line in memory to be able to manage correctly long lines with text and spaces conveniently distribuited on them. Signed-off-by: Carlos Rica <jasampler@gmail.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2007-06-26Merge branch 'master' of git://repo.or.cz/git/fastimportLibravatar Junio C Hamano1-0/+3
* 'master' of git://repo.or.cz/git/fastimport: Teach bash how to complete +refspec on git-push
2007-06-26git-send-email: Add --threaded optionLibravatar Adam Roben2-7/+25
The --threaded option controls whether the In-Reply-To header will be set on any emails sent. The current behavior is to always set this header, so this option is most useful in its negated form, --no-threaded. This behavior can also be controlled through the 'sendemail.threaded' config setting. Signed-off-by: Adam Roben <aroben@apple.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2007-06-26Fix git-stripspace to process correctly long lines and spaces.Libravatar Carlos Rica2-24/+46
Now the implementation gets more memory to store completely each line before removing trailing spaces, and does it right when the last line of the file ends with spaces and no newline at the end. Function stripspace needs again to be non-static in order to call it from "builtin-tag.c" and the upcoming "builtin-commit.c". A new parameter skip_comments was also added to the stripspace function to optionally strips every shell #comment from the input, needed for doing this task on those programs. Signed-off-by: Carlos Rica <jasampler@gmail.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2007-06-26Don't ignore a pack-refs write failureLibravatar Jim Meyering1-0/+2
Without this, if the size of refs_file at that point is ever an exact multiple of BUFSIZ, then an EIO or ENOSPC error on the final write would not be diagnosed. It's not worth worrying about EPIPE here. Although theoretically possible that someone kill this process with a manual SIGPIPE, it's not at all likely. Signed-off-by: Jim Meyering <jim@meyering.net> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2007-06-26detect close failure on just-written file handlesLibravatar Jim Meyering4-7/+8
I audited git for potential undetected write failures. In the cases fixed below, the diagnostics I add mimic the diagnostics used in surrounding code, even when that means not reporting the precise strerror(errno) cause of the error. Signed-off-by: Jim Meyering <jim@meyering.net> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2007-06-27Merge branch 'maint'Libravatar Shawn O. Pearce3-10/+14
* maint: git-gui: Don't require a .pvcsrc to create Tools/Migrate menu hack git-gui: Don't nice git blame on MSYS as nice is not supported git-gui: Don't require $DISPLAY just to get --version
2007-06-27git-gui: Don't require a .pvcsrc to create Tools/Migrate menu hackLibravatar Shawn O. Pearce1-2/+1
The Tools/Migrate menu option is a hack just for me. Yes, that's right, git-gui has a hidden feature that really only works for me, and the users that I support within my day-job's great firewall. The menu option is not supported outside of that environment. In the past we only enabled Tools/Migrate if our special local script 'gui-miga' existed in the proper location, and if there was a special '.pvcsrc' in the top level of the working directory. This latter test for the '.pvcsrc' file is now failing, as the file was removed from all Git repositories due to changes made to other tooling within the great firewall's realm. I have changed the test to only work on Cygwin, and only if the special 'gui-miga' is present. This works around the configuration changes made recently within the great firewall's realm, but really this entire Tools/Migrate thing should be abstracted out into some sort of plugin system so other users can extend git-gui as they need. Signed-off-by: Shawn O. Pearce <spearce@spearce.org>
2007-06-27git-gui: Don't nice git blame on MSYS as nice is not supportedLibravatar Shawn O. Pearce1-1/+5
Johannes Sixt reported that MinGW/MSYS does not have a nice.exe to drop the priority of a child process when it gets spawned. So we have to avoid trying to start `git blame` through nice when we are on Windows and do not have Cygwin available to us. Signed-off-by: Shawn O. Pearce <spearce@spearce.org>
2007-06-26config: Add --null/-z option for null-delimted outputLibravatar Frank Lichtenheld3-10/+58
Use \n as delimiter between key and value and \0 as delimiter after each key/value pair. This should be easily parsable output. Signed-off-by: Frank Lichtenheld <frank@lichtenheld.de> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2007-06-26Merge branch 'maint'Libravatar Junio C Hamano6-15/+39
* maint: config: Change output of --get-regexp for valueless keys config: Complete documentation of --get-regexp cleanup merge-base test script Fix zero-object version-2 packs Ignore submodule commits when fetching over dumb protocols
2007-06-26config: Change output of --get-regexp for valueless keysLibravatar Frank Lichtenheld2-2/+12
Print no space after the name of a key without value. Otherwise keys without values are printed exactly the same as keys with empty values. Signed-off-by: Frank Lichtenheld <frank@lichtenheld.de> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2007-06-26config: Complete documentation of --get-regexpLibravatar Frank Lichtenheld1-0/+2
The asciidoc documentation of the --get-regexp option was incomplete. Add some missing pieces: - List the option in SYNOPSIS - Mention that key names are printed Signed-off-by: Frank Lichtenheld <frank@lichtenheld.de> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2007-06-26git-new-workdir: Fix shell warning about operator == used with test.Libravatar Simon Hausmann1-1/+1
Use = instead of == with test to test for equality. Signed-off-by: Simon Hausmann <simon@lst.de> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2007-06-26cleanup merge-base test scriptLibravatar Sam Vilain1-12/+18
Add a picture, and keep the setup and the tests together. Signed-off-by: Sam Vilain <sam.vilain@catalyst.net.nz> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2007-06-26git.spec: RPM failed, looking for wrong files.Libravatar Quy Tonthat1-2/+5
RPM build broke with "File not found" error on git-gui.1 and git-citool.1 They actually are git-gui.1.gz and git-citool.1.gz Signed-off-by: Quy Tonthat <qtonthat@gmail.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2007-06-26Fix zero-object version-2 packsLibravatar Linus Torvalds1-1/+4
A pack-file can get created without any objects in it (to transfer "no data" - which can happen if you use a reference git repo, for example, or just otherwise just end up transferring only branch head information and already have all the objects themselves). And while we probably should never create an index for such a pack, if we do (and we do), the index file size sanity checking was incorrect. This fixes it. Reported-and-tested-by: Jocke Tjernlund <tjernlund@tjernlund.se> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2007-06-26Ignore submodule commits when fetching over dumb protocolsLibravatar Sven Verdoolaege1-0/+3
Without this patch, the code would look for the submodule commits in the superproject and (needlessly) fail when it couldn't find them. Signed-off-by: Sven Verdoolaege <skimo@liacs.nl> Acked-by: Linus Torvalds <torvalds@linux-foundation.org> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2007-06-26Merge branch 'master' of git://git.kernel.org/pub/scm/gitk/gitk into pm/gitkLibravatar Junio C Hamano1-945/+2072
* 'master' of git://git.kernel.org/pub/scm/gitk/gitk: (21 commits) gitk: Add a progress bar to show progress while resetting gitk: Improve handling of whitespace and special chars in filenames gitk: Fix bug causing nearby tags/heads to sometimes not be displayed gitk: Limit how often we change the canvas scrolling region gitk: Add a "reset branch to here" row context-menu operation gitk: Get rid of the childlist variable gitk: Speed up the reading of references gitk: Show local uncommitted changes as a fake commit gitk: New algorithm for drawing the graph lines gitk: Store ids in rowrangelist and idrowranges rather than row numbers gitk: Disable the head context menu entries for the checked-out branch gitk: Cope with commit messages with carriage-returns and initial blank lines gitk: Implement a simple scheduler for the compute-intensive stuff gitk: Improve the behaviour of the initial selection gitk: Add some more comments to the optimize_rows procedure gitk: Don't try to list large numbers of tags or heads in the details pane gitk: New infrastructure for working out branches & previous/next tags [PATCH] gitk: Allow specifying tabstop as other than default 8 characters. [PATCH] gitk: Update fontsize in patch / tree list [PATCH] gitk: Make selection highlight color configurable ... Conflicts: gitk
2007-06-26gitk: Add a progress bar to show progress while resettingLibravatar Paul Mackerras1-7/+45
Since git reset now gets chatty while resetting, we were getting errors reported when a reset was done using the "reset branch to here" menu item. With this we now read the progress messages from git reset and update a progress bar. Because git reset outputs the progress messages to standard error, and Tcl treats messages to standard error as error messages, we have to invoke git reset via a shell and redirect standard error into standard output. This also fixes a bug in computing descendent heads when head ids are changed via a reset. Signed-off-by: Paul Mackerras <paulus@samba.org>
2007-06-24Check for IO errors after running a commandLibravatar Linus Torvalds1-1/+20
This is trying to implement the strict IO error checks that Jim Meyering suggested, but explicitly limits it to just regular files. If a pipe gets closed on us, we shouldn't complain about it. If the subcommand already returned an error, that takes precedence (and we assume that the subcommand already printed out any relevant messages relating to it) Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2007-06-24Clean up internal command handlingLibravatar Linus Torvalds1-22/+30
This should change no code at all, it just moves the definition of "struct cmd_struct" out, and then splits out the running of the right command into the "run_command()" function. It also removes the long-unused 'envp' pointer passing. This is just preparation for adding some more error checking. Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2007-06-24Teach bash how to complete +refspec on git-pushLibravatar Shawn O. Pearce1-0/+3
Using `git push origin +foo` to forcefully overwrite the remote branch named foo is a common idiom, especially since + is shorter than the long option --force and can be specified on a per-branch basis. We now complete `git push origin +foo` just like we do the standard `git push origin foo`. The leading + on a branch refspec does not alter the completion. Signed-off-by: Shawn O. Pearce <spearce@spearce.org>
2007-06-24git-send-email: Do not make @-less message IDLibravatar Junio C Hamano1-4/+12
When the original $from address fails to yield a valid-looking e-mail address, we created a bogus looking message ID, formatted like this: Message-Id: <11823357623688-git-send-email-> This commit fixes it by moving call to make_message_id() to where it matters, namely, before the $message_id is needed to be placed in the generated e-mail header; this has an important side effect of making it clear that $from is already available. Also throw in Sys::Hostname::hostname() just for fun, although I suspect that the code would never trigger due to the modified call sequence that makes sure $from is always available. This is based on a suggestion by Michael Hendricks. Signed-off-by: Junio C Hamano <gitster@pobox.com>