Yes, stderr redirection in a subshell seems to work ok. Since I'm
creating a small git utility script I ended up doing:
--
#!/bin/bash
(git rev-parse --git-dir >/dev/null 2>&1)
if [ $? -ne 0 ] ; then
echo "Not in a git repo"
else
echo "Git repo; proceeding.."
# more logic..
fi
--
That w
On Sat, Nov 02, 2013 at 02:42:04PM -0500, Ville Walveranta wrote:
> Without the functionality such as that 1.7.9.5 still offered, it is
> now not possible to use "git-rev-parse --is-inside-work-tree" to
> detect whether the current location is controlled by a git repository
> without emitting the "
Without the functionality such as that 1.7.9.5 still offered, it is
now not possible to use "git-rev-parse --is-inside-work-tree" to
detect whether the current location is controlled by a git repository
without emitting the "fatal: Not a git
repository (or any of the parent directories): .git" erro
From: "John Keeping"
Sent: Saturday, November 02, 2013 2:06 PM
On Sat, Nov 02, 2013 at 01:47:02PM -, Philip Oakley wrote:
From: "John Keeping"
Sent: Saturday, November 02, 2013 10:58 AM
> On Fri, Nov 01, 2013 at 06:19:51PM -0500, Ville Walveranta wrote:
>> "git-rev-parse --is-inside-git-di
On Sat, Nov 02, 2013 at 01:47:02PM -, Philip Oakley wrote:
> From: "John Keeping"
> Sent: Saturday, November 02, 2013 10:58 AM
> > On Fri, Nov 01, 2013 at 06:19:51PM -0500, Ville Walveranta wrote:
> >> "git-rev-parse --is-inside-git-dir" outputs "fatal: Not a git
> >> repository (or any of the
From: "John Keeping"
Sent: Saturday, November 02, 2013 10:58 AM
On Fri, Nov 01, 2013 at 06:19:51PM -0500, Ville Walveranta wrote:
"git-rev-parse --is-inside-git-dir" outputs "fatal: Not a git
repository (or any of the parent directories): .git", instead of
"false" when outside of a git director
On Fri, Nov 01, 2013 at 06:19:51PM -0500, Ville Walveranta wrote:
> "git-rev-parse --is-inside-git-dir" outputs "fatal: Not a git
> repository (or any of the parent directories): .git", instead of
> "false" when outside of a git directory. "--is-inside-work-tree"
> behaves the same way. Both comma
Ville Walveranta gmail.com> writes:
>
> "git-rev-parse --is-inside-git-dir" outputs "fatal: Not a git
> repository (or any of the parent directories): .git", instead of
> "false" when outside of a git directory. "--is-inside-work-tree"
> behaves the same way. Both commands work correctly (i.e.
"git-rev-parse --is-inside-git-dir" outputs "fatal: Not a git
repository (or any of the parent directories): .git", instead of
"false" when outside of a git directory. "--is-inside-work-tree"
behaves the same way. Both commands work correctly (i.e. output
"true") when inside a git directory, or in
9 matches
Mail list logo