All of lore.kernel.org
 help / color / mirror / Atom feed
From: Johannes Sixt <j.sixt@viscovery.net>
To: shawn wilson <ag4ve.us@gmail.com>
Cc: Phil Hord <phil.hord@gmail.com>, Git List <git@vger.kernel.org>
Subject: Re: Repo with only one file
Date: Fri, 09 Aug 2013 08:50:09 +0200	[thread overview]
Message-ID: <52049121.2080604@viscovery.net> (raw)
In-Reply-To: <CAH_OBicF3xn8+MsKH0nTg-HnPg58T-TWHW20r7GqXOm3Nbutfg@mail.gmail.com>

Am 8/9/2013 8:33, schrieb shawn wilson:
> On Fri, Aug 9, 2013 at 2:25 AM, Johannes Sixt <j.sixt@viscovery.net> wrote:
>> Am 8/8/2013 23:11, schrieb Phil Hord:
>>> On Wed, Aug 7, 2013 at 5:07 PM, shawn wilson <ag4ve.us@gmail.com> wrote:
>>>> On Wed, Aug 7, 2013 at 6:43 AM, Johannes Sixt <j.sixt@viscovery.net> wrote:
>>>>> Am 8/7/2013 8:24, schrieb shawn wilson:> ... create a repo for one of
>>>>>> these scripts and I'd like to keep the commit history.
>>>>>>
>>>>>> Ok, so:
>>>>>> % find -type f ! -iname "webban.pl" | while read f; do git
>>>>>> filter-branch -f --index-filter "git rm --cached --ignore-unmatch $f"
>>>>>> HEAD ; done
>>>>>>
> 
>> I'm not sure. On second thought, my suggested command is not sufficient.
>> It does remove the empty commits, but it does not remove the other files.
>> So, Shawn's original filter-branch invocations are still needed.
>>
> 
> Yeah, I have tried this and haven't gotten any closer. I can either
> remove all of the history or that one commit that has nothing to do
> with my file is there. This is also reproducable in a new repo.
> 
> Is this a bug with filter-branch or git? This doesn't seem like a
> feature (or how things should act).

Let's check: After running your command above to remove other files, does
the command

   git filter-branch -f HEAD webban.pl

remove the empty commit (if necessary, replace HEAD by the branch name
that you are interested in)?

-- Hannes

  reply	other threads:[~2013-08-09  6:50 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-08-07  6:24 Repo with only one file shawn wilson
2013-08-07 10:43 ` Johannes Sixt
2013-08-07 21:07   ` shawn wilson
2013-08-08 21:11     ` Phil Hord
2013-08-09  6:25       ` Johannes Sixt
2013-08-09  6:33         ` shawn wilson
2013-08-09  6:50           ` Johannes Sixt [this message]
2013-08-09 10:03             ` shawn wilson
2013-08-09 10:32               ` Johannes Sixt
2013-08-09 21:54                 ` shawn wilson
2013-08-09 15:00               ` Phil Hord

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

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

  git send-email \
    --in-reply-to=52049121.2080604@viscovery.net \
    --to=j.sixt@viscovery.net \
    --cc=ag4ve.us@gmail.com \
    --cc=git@vger.kernel.org \
    --cc=phil.hord@gmail.com \
    /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.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.