Re: [git-users] Recreating repo structure without content?

2017-09-28 Thread Paul Smith
On Wed, 2017-09-27 at 22:41 +0100, Philip Oakley wrote:
> In the fast export there is the --anonymise 
> capability. 
> 
>  
> 
> Have a look at that.
> 
>  
> 
> https://git-scm.com/docs/git-fast-export#git-fast-export---anonymize
> 
> https://git-scm.com/docs/git-fast-export#_anonymizing

Awesome!  Thanks Philip.  I needed to run it on a bare clone: if I ran
it on my local repo it only exported local branches... which I guess
makes sense in retrospect but it would be useful if the help page had
mentioned it explicitly.  However no big deal it didn't take me long to
figure it out.
Now to see if this anonymized version shows the bug...
Cheers!

-- 
You received this message because you are subscribed to the Google Groups "Git 
for human beings" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to git-users+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: [git-users] Recreating repo structure without content?

2017-09-27 Thread Philip Oakley
In the fast export there is the --anonymise capability. 

Have a look at that.

https://git-scm.com/docs/git-fast-export#git-fast-export---anonymize
https://git-scm.com/docs/git-fast-export#_anonymizing

Philip
  - Original Message - 
  From: Paul Smith 
  To: git-users@googlegroups.com 
  Sent: Wednesday, September 27, 2017 5:52 PM
  Subject: [git-users] Recreating repo structure without content?


  Hi all. I'm wondering if anyone has a script or something that will allow me 
to create a new repository which recreates the commit structure (parent/child, 
branches, merges) of an existing repository, but with obfuscated content. It's 
OK if this is slow.


  My goal is to provide a test case that can reproduce a failure that appears 
only in our long-lived and complex Git repository, without having to hand over 
the actual content of the Git repository.


  Obviously the SHAs would not be the same, but that's not relevant (I'm sure). 
My suspicion is that the problem is caused by the very complex spaghetti 
branching structure we used to live with back in 2011/2012, before we imposed 
sanity.


  Thanks for any pointers!

  -- 
  You received this message because you are subscribed to the Google Groups 
"Git for human beings" group.
  To unsubscribe from this group and stop receiving emails from it, send an 
email to git-users+unsubscr...@googlegroups.com.
  For more options, visit https://groups.google.com/d/optout.

-- 
You received this message because you are subscribed to the Google Groups "Git 
for human beings" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to git-users+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: [git-users] Recreating repo structure without content?

2017-09-27 Thread rhkramer
On Wednesday, September 27, 2017 01:56:40 PM Konstantin Khomoutov wrote:
> On Wed, Sep 27, 2017 at 12:52:34PM -0400, Paul Smith wrote:
> > Hi all.  I'm wondering if anyone has a script or something that will
> > allow me to create a new repository which recreates the commit
> > structure (parent/child, branches, merges) of an existing repository,
> > but with obfuscated content.  It's OK if this is slow.

For future readers (and based on the subject line) presumably you don't mean 
obfuscated but more like omitted (or elided).


> 
> You need the `git filter-branch` command.
> 
> To make it as fast as possible, you can use it with the "--index-filter"
> command-line option and script around it with `git cat-file` and
> `git update-index`.
> 
> If you'd prefer to trade speed for easiness of implementation, consider
> the "--tree-filter" command-line option instead.


Re: [git-users] Recreating repo structure without content?

2017-09-27 Thread rhkramer
On Wednesday, September 27, 2017 12:52:34 PM Paul Smith wrote:
> Hi all.  I'm wondering if anyone has a script or something that will
> allow me to create a new repository which recreates the commit
> structure (parent/child, branches, merges) of an existing repository,
> but with obfuscated content.  It's OK if this is slow.



Re: [git-users] Recreating repo structure without content?

2017-09-27 Thread Konstantin Khomoutov
On Wed, Sep 27, 2017 at 12:52:34PM -0400, Paul Smith wrote:

> Hi all.  I'm wondering if anyone has a script or something that will
> allow me to create a new repository which recreates the commit
> structure (parent/child, branches, merges) of an existing repository,
> but with obfuscated content.  It's OK if this is slow.
> 
> My goal is to provide a test case that can reproduce a failure that
> appears only in our long-lived and complex Git repository, without
> having to hand over the actual content of the Git repository.
> 
> Obviously the SHAs would not be the same, but that's not relevant (I'm
> sure).  My suspicion is that the problem is caused by the very complex
> spaghetti branching structure we used to live with back in 2011/2012,
> before we imposed sanity.

You need the `git filter-branch` command.

To make it as fast as possible, you can use it with the "--index-filter"
command-line option and script around it with `git cat-file` and
`git update-index`.

If you'd prefer to trade speed for easiness of implementation, consider
the "--tree-filter" command-line option instead.

-- 
You received this message because you are subscribed to the Google Groups "Git 
for human beings" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to git-users+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


[git-users] Recreating repo structure without content?

2017-09-27 Thread Paul Smith
Hi all.  I'm wondering if anyone has a script or something that will
allow me to create a new repository which recreates the commit
structure (parent/child, branches, merges) of an existing repository,
but with obfuscated content.  It's OK if this is slow.

My goal is to provide a test case that can reproduce a failure that
appears only in our long-lived and complex Git repository, without
having to hand over the actual content of the Git repository.

Obviously the SHAs would not be the same, but that's not relevant (I'm
sure).  My suspicion is that the problem is caused by the very complex
spaghetti branching structure we used to live with back in 2011/2012,
before we imposed sanity.

Thanks for any pointers!

-- 
You received this message because you are subscribed to the Google Groups "Git 
for human beings" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to git-users+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.