summaryrefslogtreecommitdiff
AgeCommit message (Collapse)AuthorFilesLines
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-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-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-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>
2007-06-24git-svn: trailing slash in prefix is mandatory with --branches/-bLibravatar Gerrit Pape1-3/+4
Make clear in the documentation that when using --branches/-b and --prefix with 'init', the prefix must include a trailing slash. This matches the actual behavior of git-svn, e.g.: $ git svn init -Ttrunk -treleases -bbranches --prefix xxx \ http://svn.sacredchao.net/svn/quodlibet/ --prefix='xxx' must have a trailing slash '/' $ This was noticed by R. Vanicat and reported through http://bugs.debian.org/429443 Signed-off-by: Gerrit Pape <pape@smarden.org> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2007-06-24new-workdir: handle rev-parse --git-dir not always giving full pathLibravatar Julian Phillips1-0/+5
rev-parse --git-dir outputs a full path - except for the single case of when the path would be $(pwd)/.git, in which case it outputs simply .git. Check for this special case and handle it. Signed-off-by: Julian Phillips <julian@quantumfyre.co.uk> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2007-06-24make dist: include configure script in tarballLibravatar Matthias Lederhofer1-2/+3
Signed-off-by: Matthias Lederhofer <matled@gmx.net> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2007-06-24Merge branch 'lt/follow'Libravatar Junio C Hamano5-1/+89
* lt/follow: Fix up "git log --follow" a bit.. Finally implement "git log --follow"
2007-06-24t9500: skip gitweb tests if perl version is too oldLibravatar Sven Verdoolaege1-0/+6
gitweb calls Encode::decode_utf8 with two arguments, but old versions of perl only allow this function to be called with one argument. Even older versions of perl do not even have an Encode module. Signed-off-by: Sven Verdoolaege <skimo@kotnet.org> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2007-06-23Merge branch 'master' of git://repo.or.cz/git/fastimportLibravatar Junio C Hamano4-1/+1738
* 'master' of git://repo.or.cz/git/fastimport: (260 commits) Avoid src:dst syntax as default bash completion for git push Make it possible to specify the HEAD for the internal findUpstreamBranchPoint function. Added git-p4 branches command that shows the mapping of perforce depot paths to imported git branches. Warn about conflicting p4 branch mappings and use the first one found. Fix the branch mapping detection to be independent from the order of the "p4 branches" output. git-p4 fails when cloning a p4 depo. Fix initial multi-branch import. Only use double quotes on Windows Fix git-p4 rebase to detect the correct upstream branch instead of unconditionally Moved the code from git-p4 submit to figure out the upstream branch point git-p4 submit: Fix missing quotes around p4 commands to make them work with spaces in filenames Mention remotes/p4/master also in the documentation. Provide some information for single branch imports where the commits go git-p4: check for existence of repo dir before trying to create Write out the options tag in the log message of imports only if we actually have Fix support for explicit disabling of syncing with the origin Fix depot-paths encoding for multi-path imports (don't split up //depot/path/foo) Fix project name guessing Fix updating/creating remotes/p4/* heads from origin/p4/* Fixed the check to make sure to exclude the HEAD symbolic refs when updating ...
2007-06-23gitk: Improve handling of whitespace and special chars in filenamesLibravatar Paul Mackerras1-51/+84
The main thing here is better parsing of the diff --git lines in the output of git diff-tree -p. We now cope with filenames in quotes with special chars escaped. If the filenames contain spaces they aren't quoted, however, which can create difficulties in parsing. We get around the difficulties by detecting the case when the filename hasn't changed (chop the part after "diff --git " in two and see if the halves match apart from a/ in one and b/ in the other), and if it hasn't changed, we just use one half. If the filename has changed we wait for the "rename from" and "rename to" lines, which give the old and new filenames unambiguously. This also improves the parsing of the output of git diff-tree. Instead of using lindex to extract the filename, we take the part from the first tab on, and if it starts with a quote, we use [lindex $str 0] to remove the quotes and convert the escapes. This also gets rid of some unused tagging of the diff text, uses [string compare] instead of [regexp] in some places, and fixes the regexp for detecting the @@ hunk-separator lines (the regexp wasn't accepting a single number, as in "-0,0 +1" for example). Signed-off-by: Paul Mackerras <paulus@samba.org>
2007-06-23gitk: Fix bug causing nearby tags/heads to sometimes not be displayedLibravatar Paul Mackerras1-3/+11
When we compute descendent heads and descendent/ancestor tags, we cache the results. We need to be careful to invalidate the cache when we add stuff to the graph. Also make sure that when we cache descendent heads for a node we only cache the heads that are actually descendents of that node. Signed-off-by: Paul Mackerras <paulus@samba.org>
2007-06-23gitk: Limit how often we change the canvas scrolling regionLibravatar Paul Mackerras1-1/+7
For some unknown reason, changing the scrolling region on the canvases provokes multiple milliseconds worth of computation in the X server, and this can end up slowing gitk down significantly. This works around the problem by limiting the rate at which we update the scrolling region after the first 100 rows to at most 2 per second. Signed-off-by: Paul Mackerras <paulus@samba.org>