From: Mark Levedahl <mdl123@verizon•net>
To: git@vger•kernel.org
Cc: Adam Brewster <adambrewster@gmail•com>,
git@vger•kernel.org, Jakub Narebski <jnareb@gmail•com>
Subject: Re: [PATCH/v2] git-basis, a script to manage bases for git-bundle
Date: Tue, 01 Jul 2008 20:16:32 -0400 [thread overview]
Message-ID: <486AC8E0.60002@verizon.net> (raw)
In-Reply-To: <7vzlp1jh1o.fsf@gitster.siamese.dyndns.org>
Junio C Hamano wrote:
>
> Well, I have a moderately strong objection to this.
>
> This very much feels like adding a missing feature to "git bundle" command
> itself. Why isn't it a new option to it?
>
I have implemented (in script form) a different approach: basically, I just keep
a local copy of the refs pushed out via bundle in refs/remotes/*, just as for
any other remote, and then use those as the basis for later bundles. My longer
term goal is to integrate this into git push, so that with a properly configured
remote "git push foo" will create a bundle based upon the local knowledge of the
remote's basis and update the local copy of the refs.
For reference, this is the script I currently use ...
#!/bin/sh
# usage
if test $# -lt 4
then
echo "usage: $0 repoDirectory bundleName remote [git-for-each-ref args]"
exit 1
fi
# must be at toplevel
cd $1 || exit 1
cd ./$(git rev-parse --show-cdup) || exit 1
bundleName=$2
remote=$3
shift 3
# get list of what we want to bundle up
newrefs=$(git for-each-ref --format="%(refname)" $*)
# get list of the current bundle
basis=$(git for-each-ref --format="^%(objectname)" refs/remotes/$remote)
# create the bundle
if git bundle create "$bundleName" $newrefs $basis
then
# update our record of basis from the bundle
git bundle list-heads "$bundleName" | \
while read sha1 refname
do
git update-ref refs/remotes/"$remote"/"${refname##refs/}" $sha1
done
else
rm -f "$bundleName"
fi
Mark
next prev parent reply other threads:[~2008-07-02 0:18 UTC|newest]
Thread overview: 22+ messages / expand[flat|nested] mbox.gz Atom feed top
[not found] <1214272713-7808-1-git-send-email-adambrewster@gmail.com>
2008-06-30 22:49 ` [PATCH/v2] git-basis, a script to manage bases for git-bundle Adam Brewster
2008-07-01 9:51 ` Jeff King
2008-07-02 1:36 ` Adam Brewster
2008-07-02 2:10 ` Jay Soffian
2008-07-02 2:16 ` Adam Brewster
2008-07-02 2:21 ` Jay Soffian
2008-07-02 3:21 ` Jeff King
2008-07-02 9:44 ` Jakub Narebski
2008-07-03 19:59 ` Jeff King
2008-07-03 23:38 ` Adam Brewster
2008-07-04 0:44 ` Johannes Schindelin
2008-07-04 2:04 ` Adam Brewster
2008-07-04 16:47 ` Mark Levedahl
2008-07-04 20:55 ` Jakub Narebski
2008-07-04 19:51 ` Jeff King
2008-07-01 23:55 ` Junio C Hamano
2008-07-02 0:16 ` Mark Levedahl [this message]
2008-07-03 23:13 ` Adam Brewster
2008-07-04 13:14 ` Mark Levedahl
2008-07-04 13:22 ` Johannes Schindelin
2008-07-04 13:49 ` Mark Levedahl
2008-07-02 2:12 ` Adam Brewster
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=486AC8E0.60002@verizon.net \
--to=mdl123@verizon$(echo .)net \
--cc=adambrewster@gmail$(echo .)com \
--cc=git@vger$(echo .)kernel.org \
--cc=jnareb@gmail$(echo .)com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
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