From: Petr Baudis <pasky@suse.cz>
To: Sergey Vlasov <vsu@altlinux.ru>
Cc: Linus Torvalds <torvalds@osdl.org>, Dave Jones <davej@redhat.com>,
git@vger.kernel.org
Subject: Re: Fwd: Re: git checkout -f branch doesn't remove extra files
Date: Sat, 13 Aug 2005 14:33:11 +0200 [thread overview]
Message-ID: <20050813123311.GD5608@pasky.ji.cz> (raw)
In-Reply-To: <20050813161053.29593972.vsu@altlinux.ru>
Dear diary, on Sat, Aug 13, 2005 at 02:10:53PM CEST, I got a letter
where Sergey Vlasov <vsu@altlinux.ru> told me that...
> However, cg-export is buggy - if you use the second argument
> (cg-export DESTFILE TREE_ID), the resulting tar file is different
> from what git-tar-tree produces for the same TREE_ID (unless that
> TREE_ID actually points to a tree - but in practice a commit or even
> tag ID is typically used).
>
> The problem is in this line:
>
> id=$(tree-id "$2")
>
> This converts the passed commit or tag to the underlying tree, which
> is then passed to git-tar-tree. However, git-tar-tree can follow
> such links itself, and, what's more important, it actually uses some
> information from the passed commit (it writes the commit ID to the
> tar file as an extended header, and sets timestamp of all archive
> members to the time of the commit). Therefore reducing the ID
> passed to git-tar-tree to a plain tree ID is wrong - if a commit ID
> is available, it should be used.
Aha! Good catch, fixed, thanks.
BTW, I also changed cg-export usage to be more consistent and flexible,
by changing it from
cg-export DESTFILE [TREE_ID]
to
cg-export [-r TREE_ID] DESTFILE
since I think not many people are using cg-export anyway and much less
of them passing it TREE_ID explicitly.
--
Petr "Pasky" Baudis
Stuff: http://pasky.or.cz/
If you want the holes in your knowledge showing up try teaching
someone. -- Alan Cox
prev parent reply other threads:[~2005-08-13 12:33 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2005-08-13 4:17 Fwd: Re: git checkout -f branch doesn't remove extra files Dave Jones
2005-08-13 5:05 ` Linus Torvalds
2005-08-13 5:27 ` Dave Jones
2005-08-13 5:39 ` Linus Torvalds
2005-08-13 5:33 ` Linus Torvalds
2005-08-13 11:00 ` Petr Baudis
2005-08-13 12:10 ` Sergey Vlasov
2005-08-13 12:33 ` Petr Baudis [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=20050813123311.GD5608@pasky.ji.cz \
--to=pasky@suse.cz \
--cc=davej@redhat.com \
--cc=git@vger.kernel.org \
--cc=torvalds@osdl.org \
--cc=vsu@altlinux.ru \
/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).