Bug#458954: git-diff silently fails if not a git repo or .git is not readable
tags 458954 fixed-upstream thanks Joey Hess wrote: Version: 1:1.5.3.7-1 [...] [EMAIL PROTECTED]:/etc/splashygit diff [EMAIL PROTECTED]:/etc/splashy git diff should print an error and exit nonzero if it's not in a git repo or cannot read .git. The current behavior is indistingushable from being in a git repo with no changes. This was fixed upstream in commit 59b0c24a 'git-svn: detect and fail gracefully when dcommitting to a void' (really!) and the fix was included in v1.5.6-rc0. So I think the bug could be closed. ~$ git diff fatal: git diff [--no-index] takes two paths Regards, Jonathan -- To UNSUBSCRIBE, email to [EMAIL PROTECTED] with a subject of unsubscribe. Trouble? Contact [EMAIL PROTECTED]
Bug#458954: git-diff silently fails if not a git repo or .git is not readable
On Thu, Mar 06, 2008 at 03:39:59PM +, Gerrit Pape wrote: On Thu, Jan 03, 2008 at 03:57:15PM -0500, Joey Hess wrote: [EMAIL PROTECTED]:/etc/splashygit diff [EMAIL PROTECTED]:/etc/splashy git diff should print an error and exit nonzero if it's not in a git repo or cannot read .git. The current behavior is indistingushable from being in a git repo with no changes. Yes, this is kind of a mess. Contrary to what the git-diff documentation says, git-diff actually can be used outside a repository $ echo foo foo echo bar bar git diff foo bar diff --git a/foo b/bar index 257cc56..5716ca5 100644 --- a/foo +++ b/bar @@ -1 +1 @@ -foo +bar and IIRC this is by intention. Nevertheless, git-diff without any arguments outside a repository should probably error out. FYI http://thread.gmane.org/gmane.comp.version-control.git/80722/ Regards, Gerrit. -- To UNSUBSCRIBE, email to [EMAIL PROTECTED] with a subject of unsubscribe. Trouble? Contact [EMAIL PROTECTED]
Bug#458954: git-diff silently fails if not a git repo or .git is not readable
On Thu, Jan 03, 2008 at 03:57:15PM -0500, Joey Hess wrote: [EMAIL PROTECTED]:/etc/splashygit diff [EMAIL PROTECTED]:/etc/splashy git diff should print an error and exit nonzero if it's not in a git repo or cannot read .git. The current behavior is indistingushable from being in a git repo with no changes. Yes, this is kind of a mess. Contrary to what the git-diff documentation says, git-diff actually can be used outside a repository $ echo foo foo echo bar bar git diff foo bar diff --git a/foo b/bar index 257cc56..5716ca5 100644 --- a/foo +++ b/bar @@ -1 +1 @@ -foo +bar and IIRC this is by intention. Nevertheless, git-diff without any arguments outside a repository should probably error out. Regards, Gerrit. -- To UNSUBSCRIBE, email to [EMAIL PROTECTED] with a subject of unsubscribe. Trouble? Contact [EMAIL PROTECTED]
Bug#458954: git-diff silently fails if not a git repo or .git is not readable
Package: git-core Version: 1:1.5.3.7-1 Severity: normal [EMAIL PROTECTED]:/etc/splashygit diff [EMAIL PROTECTED]:/etc/splashy git diff should print an error and exit nonzero if it's not in a git repo or cannot read .git. The current behavior is indistingushable from being in a git repo with no changes. git log does it right: [EMAIL PROTECTED]:/etc/splashygit log fatal: Not a git repository zsh: exit 128 git log -- System Information: Debian Release: lenny/sid APT prefers unstable APT policy: (500, 'unstable'), (500, 'stable') Architecture: i386 (i686) Kernel: Linux 2.6.23-1-686 (SMP w/1 CPU core) Locale: LANG=en_US.UTF-8, LC_CTYPE=en_US.UTF-8 (charmap=UTF-8) Shell: /bin/sh linked to /bin/bash Versions of packages git-core depends on: ii cpio2.9-9GNU cpio -- a program to manage ar ii libc6 2.7-5GNU C Library: Shared libraries ii libcurl3-gnutls 7.17.1-1 Multi-protocol file transfer libra ii libdigest-sha1-perl 2.11-2 NIST SHA-1 message digest algorith ii liberror-perl 0.17-1 Perl module for error/exception ha ii libexpat1 1.95.8-4 XML parsing C library - runtime li ii perl-modules5.8.8-12 Core Perl modules ii zlib1g 1:1.2.3.3.dfsg-8 compression library - runtime Versions of packages git-core recommends: ii curl 7.17.1-1Get a file from an HTTP, HTTPS or ii git-doc 1:1.5.3.7-1 fast, scalable, distributed revisi ii less 416-1 Pager program similar to more ii openssh-client [ssh-client] 1:4.7p1-1 secure shell client, an rlogin/rsh ii patch2.5.9-4 Apply a diff file to an original ii rsync2.6.9-6 fast remote file copy program (lik -- no debconf information -- see shy jo signature.asc Description: Digital signature