git@vger.kernel.org mailing list mirror (one of many)
 help / color / mirror / code / Atom feed
From: Thomas Rast <trast@student.ethz.ch>
To: Junio C Hamano <gitster@pobox.com>
Cc: git@vger.kernel.org, Johannes Sixt <j6t@kdbg.org>,
	Jeff King <peff@peff.net>,
	Alexander Potashev <aspotashev@gmail.com>
Subject: [PATCH v3 0/3] die_errno()
Date: Mon,  8 Jun 2009 23:02:17 +0200	[thread overview]
Message-ID: <cover.1244494646.git.trast@student.ethz.ch> (raw)
In-Reply-To: <cover.1244299302.git.trast@student.ethz.ch>

First off, thanks for the extensive review and discussion...

[1/3] I changed the snprintf handling to tack the error onto the
  format and pass that to die_routine().  I still think it's crazy to
  invent new format characters, but who knows.

[2/3] Fixed as per Johannes Sixt's comments.

[3/3] Removed the terrible empty-lines mess caused by pilot error.

  Johannes Sixt wrote:
  > > @@ -1018,8 +1017,10 @@ int cmd_commit(int argc, const char **argv, const
  > > char *prefix)
  > >
  > >  	if (commit_index_files())
  > >  		die ("Repository has been updated, but unable to write\n"
  > > -		     "new_index file. Check that disk is not full or quota is\n"
  > > -		     "not exceeded, and then \"git reset HEAD\" to recover.");
  > > +		     "new_index file: %s.\n"
  > > +		     "Check that disk is not full or quota is not exceeded,\n"
  > > +		     "and then \"git reset HEAD\" to recover.",
  > > +		     strerror(errno));
  > 
  > This change should probably not be in this patch.

  Removed...  I'm not enough of an expert to say if
  commit_index_files() can only fail because the disk is full, so I
  figured it would still be an improvement to show the real error.

  If you just meant that it should go in a separate patch because it's
  not a die->die_errno change, I can do that, it just feels like
  overkill because it is morally the same change, but in a case where
  I cannot apply the die_errno shortcut.


Thomas Rast (3):
  Introduce die_errno() that appends strerror(errno) to die()
  Convert existing die(..., strerror(errno)) to die_errno()
  Use die_errno() instead of die() when checking syscalls

 abspath.c                |   12 ++++++------
 bisect.c                 |    5 ++---
 branch.c                 |    4 ++--
 builtin-add.c            |    2 +-
 builtin-apply.c          |   12 ++++++------
 builtin-archive.c        |    4 ++--
 builtin-blame.c          |   15 +++++++--------
 builtin-clone.c          |   21 ++++++++++-----------
 builtin-commit-tree.c    |    2 +-
 builtin-commit.c         |   28 +++++++++++++---------------
 builtin-config.c         |    4 ++--
 builtin-diff.c           |    2 +-
 builtin-fast-export.c    |    4 ++--
 builtin-fetch--tool.c    |    2 +-
 builtin-fmt-merge-msg.c  |    5 ++---
 builtin-fsck.c           |   10 +++++-----
 builtin-grep.c           |    2 +-
 builtin-init-db.c        |   21 +++++++++++----------
 builtin-log.c            |    4 ++--
 builtin-mailsplit.c      |    6 +++---
 builtin-merge.c          |   29 ++++++++++++++++-------------
 builtin-mv.c             |    2 +-
 builtin-pack-objects.c   |   14 +++++---------
 builtin-rev-parse.c      |    2 +-
 builtin-revert.c         |    2 +-
 builtin-rm.c             |    2 +-
 builtin-send-pack.c      |    2 +-
 builtin-stripspace.c     |    2 +-
 builtin-tag.c            |    9 ++++-----
 builtin-tar-tree.c       |    2 +-
 builtin-unpack-objects.c |    2 +-
 combine-diff.c           |    2 +-
 csum-file.c              |    5 ++---
 daemon.c                 |   15 +++++++--------
 diff.c                   |   10 +++++-----
 dir.c                    |    2 +-
 entry.c                  |   10 +++++-----
 fast-import.c            |    8 ++++----
 git-compat-util.h        |    1 +
 git.c                    |    6 +++---
 hash-object.c            |    2 +-
 index-pack.c             |   21 ++++++++++-----------
 ll-merge.c               |    2 +-
 merge-recursive.c        |    6 +++---
 mktag.c                  |    2 +-
 pack-refs.c              |    7 +++----
 pack-write.c             |   10 +++++-----
 pkt-line.c               |    4 ++--
 read-cache.c             |    8 ++++----
 refs.c                   |    2 +-
 run-command.c            |    4 ++--
 setup.c                  |   18 +++++++++---------
 sha1_file.c              |    2 +-
 shell.c                  |    2 +-
 test-sha1.c              |    2 +-
 transport.c              |    4 ++--
 unpack-file.c            |    2 +-
 usage.c                  |   12 ++++++++++++
 wrapper.c                |    8 ++++----
 write_or_die.c           |    6 +++---
 60 files changed, 209 insertions(+), 207 deletions(-)

  reply	other threads:[~2009-06-08 21:02 UTC|newest]

Thread overview: 42+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2009-06-02 21:34 [PATCH] add strerror(errno) to die() calls where applicable Thomas Rast
2009-06-03  1:55 ` Jeff King
     [not found]   ` <2325a7950906031855t1977448lbb1c8aa671c72f3d@mail.gmail.com>
2009-06-04  1:58     ` Alexander Potashev
2009-06-04 20:32       ` Jeff King
2009-06-04  2:05   ` [PATCH] diesys calls die and also reports strerror(errno) Alexander Potashev
2009-06-04 20:50     ` Jeff King
2009-06-04 21:13       ` Junio C Hamano
2009-06-05  6:25       ` Johannes Sixt
2009-06-05  7:12         ` Junio C Hamano
2009-06-06 22:09           ` Jeff King
2009-06-06 13:09   ` [PATCH] add strerror(errno) to die() calls where applicable Thomas Rast
2009-06-06 14:44     ` [PATCH v2 0/3] Thomas Rast <trast@student.ethz.ch> Thomas Rast
2009-06-08 21:02       ` Thomas Rast [this message]
2009-06-27 15:58         ` [PATCH v4 0/4] die_errno() Thomas Rast
2009-06-27 15:58           ` [PATCH v4 1/4] Introduce die_errno() that appends strerror(errno) to die() Thomas Rast
2009-06-27 15:58           ` [PATCH v4 2/4] die_errno(): double % in strerror() output just in case Thomas Rast
2009-06-27 15:58           ` [PATCH v4 3/4] Convert existing die(..., strerror(errno)) to die_errno() Thomas Rast
2009-06-27 15:58           ` [PATCH v4 4/4] Use die_errno() instead of die() when checking syscalls Thomas Rast
2009-06-27 18:38           ` [PATCH v4 0/4] die_errno() Junio C Hamano
2009-06-08 21:02       ` [PATCH v3 1/3] Introduce die_errno() that appends strerror(errno) to die() Thomas Rast
2009-06-08 22:07         ` Jeff King
2009-06-09  8:22           ` Thomas Rast
2009-06-09  8:53             ` Jeff King
2009-06-09  9:29               ` Andreas Ericsson
2009-06-08 21:02       ` [PATCH v3 2/3] Convert existing die(..., strerror(errno)) to die_errno() Thomas Rast
2009-06-08 21:02       ` [PATCH v3 3/3] Use die_errno() instead of die() when checking syscalls Thomas Rast
2009-06-06 14:44     ` [PATCH v2 1/3] Introduce die_errno() that appends strerror(errno) to die() Thomas Rast
2009-06-06 20:36       ` Johannes Sixt
2009-06-06 20:56         ` Thomas Rast
2009-06-06 21:17           ` Johannes Sixt
2009-06-06 22:47           ` Jeff King
2009-06-06 22:13       ` Jeff King
2009-06-07 11:12         ` Alexander Potashev
2009-06-07 16:57           ` Junio C Hamano
2009-06-08 12:36             ` Jeff King
2009-06-08 15:35               ` Alexander Potashev
2009-06-08 22:04                 ` Jeff King
2009-06-06 14:44     ` [PATCH v2 2/3] Convert existing die(..., strerror(errno)) to die_errno() Thomas Rast
2009-06-06 20:31       ` Johannes Sixt
2009-06-06 14:44     ` [PATCH v2 3/3] Use die_errno() instead of die() when checking syscalls Thomas Rast
2009-06-06 21:02       ` Johannes Sixt
2009-06-06 22:27         ` Thomas Rast

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: http://vger.kernel.org/majordomo-info.html

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=cover.1244494646.git.trast@student.ethz.ch \
    --to=trast@student.ethz.ch \
    --cc=aspotashev@gmail.com \
    --cc=git@vger.kernel.org \
    --cc=gitster@pobox.com \
    --cc=j6t@kdbg.org \
    --cc=peff@peff.net \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this public inbox

	https://80x24.org/mirrors/git.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).