Revision aba91192ae39cd1a2f79e7ed91e966df3cfe10b7 authored by Carlos Rica on 09 September 2007, 00:39:29 UTC, committed by Junio C Hamano on 10 September 2007, 04:30:54 UTC
Most of this patch code and message was written by Shawn O. Pearce.
I made some tests to know what the problem was, and then I changed
the code related with the SIGPIPE signal.

If the user has misconfigured `user.signingkey` in their .git/config
or just doesn't have any secret keys on their keyring and they ask
for a signed tag with `git tag -s` we better make sure the resulting
tag was actually signed by gpg.

Prior versions of builtin git-tag allowed this failure to slip
by without error as they were not checking the return value of
the finish_command() so they did not notice when gpg exited with
an error exit status.  They also did not fail if gpg produced an
empty output or if read_in_full received an error from the read
system call while trying to read the pipe back from gpg.

Finally, we did not actually honor any return value from the do_sign
function as it returns ssize_t but was being stored into an unsigned
long.  This caused the compiler to optimize out the die condition,
allowing git-tag to continue along and create the tag object.

However, when gpg gets a wrong username, it exits before any read was done
and then the writing process receives SIGPIPE and program is terminated.
By ignoring this signal, anyway, the function write_or_die gets EPIPE from
write_in_full and exits returning 0 to the system without a message.
Here we better call to write_in_full directly so we can fail
printing a message and return safely to the caller.

With these issues fixed `git-tag -s` will now fail to create the
tag and will report a non-zero exit status to its caller, thereby
allowing automated helper scripts to detect (and recover from)
failure if gpg is not working properly.

Proposed-by: Shawn O. Pearce <spearce@spearce.org>
Signed-off-by: Carlos Rica <jasampler@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
1 parent 7b02b85
Raw File
git-tools.txt
A short git tools survey
========================


Introduction
------------

Apart from git contrib/ area there are some others third-party tools
you may want to look.

This document presents a brief summary of each tool and the corresponding
link.


Alternative/Augmentative Porcelains
-----------------------------------

   - *Cogito* (http://www.kernel.org/pub/software/scm/cogito/)

   Cogito is a version control system layered on top of the git tree history
   storage system. It aims at seamless user interface and ease of use,
   providing generally smoother user experience than the "raw" Core GIT
   itself and indeed many other version control systems.


   - *pg* (http://www.spearce.org/category/projects/scm/pg/)

   pg is a shell script wrapper around GIT to help the user manage a set of
   patches to files. pg is somewhat like quilt or StGIT, but it does have a
   slightly different feature set.


   - *StGit* (http://www.procode.org/stgit/)

   Stacked GIT provides a quilt-like patch management functionality in the
    GIT environment. You can easily manage your patches in the scope of GIT
   until they get merged upstream.


History Viewers
---------------

   - *gitk* (shipped with git-core)

   gitk is a simple Tk GUI for browsing history of GIT repositories easily.


   - *gitview*  (contrib/)

   gitview is a GTK based repository browser for git


   - *gitweb* (shipped with git-core)

   GITweb provides full-fledged web interface for GIT repositories.


   - *qgit* (http://digilander.libero.it/mcostalba/)

   QGit is a git/StGIT GUI viewer built on Qt/C++. QGit could be used
   to browse history and directory tree, view annotated files, commit
   changes cherry picking single files or applying patches.
   Currently it is the fastest and most feature rich among the git
   viewers and commit tools.

   - *tig* (http://jonas.nitro.dk/tig/)

   tig by Jonas Fonseca is a simple git repository browser
   written using ncurses. Basically, it just acts as a front-end
   for git-log and git-show/git-diff. Additionally, you can also
   use it as a pager for git commands.


Foreign SCM interface
---------------------

   - *git-svn* (shipped with git-core)

   git-svn is a simple conduit for changesets between a single Subversion
   branch and git.


   - *quilt2git / git2quilt* (http://home-tj.org/wiki/index.php/Misc)

   These utilities convert patch series in a quilt repository and commit
   series in git back and forth.


   - *hg-to-git* (contrib/)

   hg-to-git converts a Mercurial repository into a git one, and
   preserves the full branch history in the process. hg-to-git can
   also be used in an incremental way to keep the git repository
   in sync with the master Mercurial repository.


Others
------

   - *(h)gct* (http://www.cyd.liu.se/users/~freku045/gct/)

   Commit Tool or (h)gct is a GUI enabled commit tool for git and
   Mercurial (hg). It allows the user to view diffs, select which files
   to committed (or ignored / reverted) write commit messages and
   perform the commit itself.

   - *git.el* (contrib/)

   This is an Emacs interface for git. The user interface is modeled on
   pcl-cvs. It has been developed on Emacs 21 and will probably need some
   tweaking to work on XEmacs.


http://git.or.cz/gitwiki/InterfacesFrontendsAndTools has more
comprehensive list.
back to top