Skip Menu |

This queue is for tickets about the Git-Repository CPAN distribution.

Report information
The Basics
Id: 122047
Status: resolved
Priority: 0/
Queue: Git-Repository

People
Owner: Nobody in particular
Requestors: GANGLION [...] cpan.org
Cc:
AdminCc:

Bug Information
Severity: Critical
Broken in: 1.316
Fixed in: (no value)



Subject: git-init via Git::Repository silently clobbers existing repo
Calling git-init from the command line will not damage an existing repository in the current directory. Calling git-init via Git::Repository on my system appears to clobber the .git directory, deleting all current contents. I'm marking this critical because the behavior is undocumented, differs from calling git-init directly, risking data loss to the naive user. I think some sort of safeguard and/or documentation warning would be advisable.
On Thu Jun 08 03:09:18 2017, ganglion wrote: Show quoted text
> Calling git-init from the command line will not damage an existing > repository in the current directory. Calling git-init via > Git::Repository on my system appears to clobber the .git directory, > deleting all current contents. I'm marking this critical because the > behavior is undocumented, differs from calling git-init directly, > risking data loss to the naive user. I think some sort of safeguard > and/or documentation warning would be advisable.
Can you provide me the code that produced this behaviour? I'd like to reproduce the bug, before trying to understand what's happening and how to fix it. Thanks for your report. -- BooK
On Thu Jun 08 03:09:18 2017, ganglion wrote: Show quoted text
> Calling git-init from the command line will not damage an existing > repository in the current directory. Calling git-init via > Git::Repository on my system appears to clobber the .git directory, > deleting all current contents. I'm marking this critical because the > behavior is undocumented, differs from calling git-init directly, > risking data loss to the naive user. I think some sort of safeguard > and/or documentation warning would be advisable.
Can you provide me the code that produced this behaviour? I'd like to reproduce the bug, before trying to understand what's happening and how to fix it. Thanks for your report. -- BooK
Subject: Re: [rt.cpan.org #122047] git-init via Git::Repository silently clobbers existing repo
Date: Mon, 17 Jul 2017 17:26:25 -1000
To: "Philippe Bruhat (BooK) via RT" <bug-Git-Repository [...] rt.cpan.org>
From: Joel Roth <joelz [...] pobox.com>
On Mon, Jul 17, 2017 at 03:41:49PM -0400, Philippe Bruhat (BooK) via RT wrote: Show quoted text
> <URL: https://rt.cpan.org/Ticket/Display.html?id=122047 > > > On Thu Jun 08 03:09:18 2017, ganglion wrote:
> > Calling git-init from the command line will not damage an existing > > repository in the current directory. Calling git-init via > > Git::Repository on my system appears to clobber the .git directory, > > deleting all current contents. I'm marking this critical because the > > behavior is undocumented, differs from calling git-init directly, > > risking data loss to the naive user. I think some sort of safeguard > > and/or documentation warning would be advisable.
> > Can you provide me the code that produced this behaviour? I'd like to reproduce the bug, before trying to understand what's happening and how to fix it.
Show quoted text
> Thanks for your report. >
Hi BooK, Thanks for getting back to me. In short, I was not able to reproduce the issue. Most likely, when I created a repository in a subdirectory, it masked a repo in the parent directory, so that git log showed only the initial commits in the new repo, and I hastily concluded the repo was overwritten. Since I was unable to reproduce the issue, feel free to go ahead and close the ticket. I doubt G::R would do anything really radical. Regards, Joel Show quoted text
> -- BooK
-- Joel Roth
On Mon Jul 17 23:26:52 2017, joelz@pobox.com \ Show quoted text
> > Thanks for getting back to me. In short, I was not able to > reproduce the issue. >
Thanks for the quick reply (especially when mine wasn't that fast). Show quoted text
> Since I was unable to reproduce the issue, feel free to go > ahead and close the ticket. >
I will. Thanks, -- BooK