git.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: "Bert Wesarg" <bert.wesarg@googlemail.com>
To: "Petr Baudis" <pasky@suse.cz>
Cc: git@vger.kernel.org
Subject: Re: [TopGit PATCH 2/2] tg-import.sh: A dump quilt queue importer
Date: Sat, 9 Aug 2008 09:56:58 +0200	[thread overview]
Message-ID: <36ca99e90808090056n63ce97bduc64a24a524eae2b9@mail.gmail.com> (raw)
In-Reply-To: <20080809005736.GR10151@machine.or.cz>

On Sat, Aug 9, 2008 at 02:57, Petr Baudis <pasky@suse.cz> wrote:
> On Fri, Aug 08, 2008 at 08:19:48PM +0200, Bert Wesarg wrote:
>> +tg import
>> +~~~~~~~~~
>> +     Import a quilt queue into TopGit. First argument is the series
>> +     file from quilt. Second is the prefix for the topic names
>> +     (i.e. "t/"). All remaining arguments are the dependencies for
>> +     the first patch in the series.
>
> Sensible usage, but I'm not happy with making tg import quilt-only;
> what if we will say want to import to topgit from existing branches,
> or from StGIT or something else? The command name is good, but maybe
> I'd add a required --quilt switch. After all, this is not a command you
> run three times a day by hand.
Your absolutly right, that import should not be quilt specific. It was
just what I currently need, so I made it.

>
>> + Use '-s' if you want to strip
>> +     common patch suffixes from the patch file name (like .diff and
>> +     .patch).
>
> When *wouldn't* we want to do this? Doesn't it make sense to make this
> the default?
I suggest never ;-)

>> +             # add all modified files from patch to index
>> +             # (and prepending it with $root_dir)
>> +             # be stupid, hard coded -p1 --strip=1
>> +             lsdiff --strip=1 "$patchfile" |
>> +                     sed -e "s/^/$root_dir_esc\//" |
>> +                     xargs git add
>
> lsdiff? I don't have this tool. And this won't work with file removals
> properly anyway.
lsdiff comes with the patchutils package.

>
> I guess git add -u is too new for us, so you might opt for this snippet
> I've used in git-filter-branch:
>
>        (
>                git diff-index -r --name-only HEAD
>                git ls-files --others
>        ) |
>        git update-index --add --replace --remove --stdin
>
> Or even better, use git apply?
Ohh yeah, that sounds reasonable. Sometimes it an be so easy.

Thanks for the comments and input.

Bert
>
> --
>                                Petr "Pasky" Baudis

      reply	other threads:[~2008-08-09  8:00 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2008-08-08 18:19 [TopGit PATCH 1/2] Factor out the template generation for the .topmsg file Bert Wesarg
2008-08-08 18:19 ` [TopGit PATCH 2/2] tg-import.sh: A dump quilt queue importer Bert Wesarg
2008-08-09  0:57   ` Petr Baudis
2008-08-09  7:56     ` Bert Wesarg [this message]

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=36ca99e90808090056n63ce97bduc64a24a524eae2b9@mail.gmail.com \
    --to=bert.wesarg@googlemail.com \
    --cc=git@vger.kernel.org \
    --cc=pasky@suse.cz \
    /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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).