git/list[1] front-page[2] threads[3] people[4] search[5] about
 

Re: [PATCH/RFC 0/4] Add option to enable filters in git-svn

From
Matteo Bertini <naufraghi@develer.com>
Date
May 31, 2016, 20:34 UTC
Message-ID
<cb49a08e3ec44f7d37603e5b1fe20a22@develer.com>
In-Reply-To
<20160531181241.GA28818@dcvr.yhbt.net>
Il 2016-05-31 20:12 Eric Wong ha scritto:
> Matteo Bertini <naufraghi@develer.com> wrote:
>> Sorry to all, but I missed a Checksum mismatch error, I'll have a
>> look and submit an update.

I've had a look, the problem is a missing smudge filter. Unluckily the small svn revision range i was using was never updating a filtered file.

The code actually uses `cat-file --batch` to get the blobs, but the stored blob is not what SVN::TxDelta::apply need. What I need is the smudged blob, but cat-file does not supports it.

I can modify cat-file with a new option to call `convert_to_working_tree`, and have the filters applied, for example --use-filters, that expects an extra field, like $sha\t$path, in the stdin stream.

I don't like a lot putting an high level feature in a low level command, but --textconv seems very similar to this.

Opinions or other suggestions?
> Sure, when you reroll can you also ensure lines are wrapped at
> 80 cols or less? (at least for the git-svn code, but probably
> for the rest of it, too).
Sure
> As for the option name, the "enable" prefix doesn't seem
> right.  We already have some "use" prefixes (use-svm-props),
> so maybe "--use-filters" is better.
Ok
> I haven't looked into filters at all, yet, but you can probably
> use the existing rot13 filter in t0021 for writing tests.
Thanks for the pointer, I'll have a look.
-- 
Matteo Bertini - naufraghi@develer.com
Develer S.r.l. - http://www.develer.com/
.hardware .software .innovation
Tel.: +39 055 3986627 - ext.: 211
Previous: Eric WongNext: Eric Wong
Message 8 of 9 in “Add option to enable filters in git-svn”
  1. 0/4 Add option to enable filters in git-svnMatteo Bertini, May 31, 2016
  2. 1/4 hash-object.c: Allow distinct file/path in stdin mode too.Matteo Bertini, May 31, 2016
  3. 2/4 Git.pm: Add $path and $enable_filters arguments to hash_and_insert_object.Matteo Bertini, May 31, 2016
  4. 3/4 SVN/Fetcher.pm: Add svn-remote.<id>.enable-filters to enable the filters.Matteo Bertini, May 31, 2016
  5. 4/4 git-svn.perl: Add git svn init --enable-filters option.Matteo Bertini, May 31, 2016
  6. Matteo BertiniMay 31, 2016
  7. Eric WongMay 31, 2016
  8. Matteo BertiniMay 31, 2016
  9. Eric WongJun 2, 2016

Read the whole thread, see it on lore, or plain text.

$ cat FOOTERMessages come from the public archive at lore.kernel.org/git, fetched every hour. The front page is chosen and written each morning by an AI editor and can be wrong; the threads themselves are the record. About and API. For agents: an MCP server at https://gitlist.dev/mcp, and any thread, story or person page as Markdown by adding .md to its URL (or sending Accept: text/markdown). Details in /llms.txt.