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

Re: [PATCH/RFC] Created git-basis and modified git-bundle to accept --stdin.

From
Jakub Narebski <jnareb@gmail.com>
Date
Jun 24, 2008, 18:55 UTC
Message-ID
<200806242055.53776.jnareb@gmail.com>
In-Reply-To
<c376da900806240830p2a48aff0uaf6f22372fead5ef@mail.gmail.com>
Adam Brewster wrote:
Show 12 quoted lines
>> [...]
>>> Then you can add the objects in the bundle to the basis, so they won't
>>> get included in the next pack like this:
>>>
>>>  $ git-basis --update my-basis < my-bundle
>>
>> Why not use "$(git ls-remote my-bundle)" somewhere in the invocation
>> creating new bundle instead?
>>
> 
> You could use "git ls-remote my-bundle | git-basis --update my-basis"
> to do the same thing as the command I gave above.
I was thinking about
  $ git bundle create my-bundle --all --not $(git ls-remote my-bundle | cut -f1)

(or `--branches' instead of `--all'). Or, if you don't want to keep bundle, but only save basis, just use

  $ git bundle create my-bundle --all --not $(git basis --show my-basis)

No need for `--stdin' / `--revs' / `--basis' option to git-bundle, at the cost of little shell trickery.

Or even
  $ git ls-remote my-bundle | cut -f1 > my-bases
  [...]
  $ git bundle create my-bundle --all --not $(cat my-bases)
Show 9 quoted lines
>>> I'm sure that my implementation is crap, but I think this is a useful
>>> idea.  Anybody agree?  Disagree?
>>
>> Documentation, please?  Especially that it looks like '--stdin' option
>> is a bit tricky...
> 
> I wanted to test the waters and make sure that someone was at least
> vaguely interested in this (no need to document code that is never
> going to leave my machine).
See above example, to check if this would be enough...
> I'll prepare another patch with documentation and changing --stdin to
> --revs when I get a chance.

I'm not sure if another name, like --bases=<filename / basename> wouldn't be better. Perhaps --stdin is a good name...

-- 
Jakub Narebski
Poland
Previous: Adam BrewsterNext: Jakub Narebski
Message 4 of 6 in “Created git-basis and modified git-bundle to accept --stdin.”
  1. Created git-basis and modified git-bundle to accept --stdin.Adam Brewster, Jun 24, 2008
  2. Jakub NarebskiJun 24, 2008
  3. Adam BrewsterJun 24, 2008
  4. Jakub NarebskiJun 24, 2008
  5. Jakub NarebskiJun 25, 2008
  6. Adam BrewsterJun 25, 2008

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.