git.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: "René Scharfe" <rene.scharfe@lsrfire.ath.cx>
To: Junio C Hamano <junkio@cox.net>
Cc: Nick Williams <njw@jarb.freeserve.co.uk>, git@vger.kernel.org
Subject: Re: [PATCH] git-archive: document CWD effect
Date: Mon, 09 Apr 2007 17:04:27 +0200	[thread overview]
Message-ID: <461A55FB.6070600@lsrfire.ath.cx> (raw)
In-Reply-To: <7virc68nc1.fsf@assigned-by-dhcp.cox.net>

Junio C Hamano schrieb:
> While the updated description reflects what the command does
> more accurately, I am not sure if it is a desired behaviour.
> For one thing, --format=tar (by the way, maybe we would want to
> make this the default when none is specified?) adds the comment
> that is readable by get-tar-commit-id that claims the tarball
> contains the named commit, giving a false impression that it is
> the whole thing.

It marks the archive as being _created_ from this specific commit, not
necessarily as containing all of it.  Perhaps this should be noted in
the documentation..

Making '--format=tar' the default is a good idea.  I doubt we'll see the
addition of a new archive format -- that deserves to be the default one
instead of tar -- soon.

> Since people who _really_ want a subtree can
> just say "git archive --format=tar HEAD:Documentation", I
> suspect we may be better off not doing "current directory only"
> by default.  This changes the behaviour, but (1) it affects only
> people who run from a subdirectory, (2) it is counterintuitive
> that your location in the working tree matters when you say "I
> want a tarball of that commit", and (3) it is an undocumented
> behaviour anyway.

I agree with (1) and (3), meaning that we are free to change the
behaviour.  I don't agree with (2), though.  I'd find it strange if
changing the working directory wouldn't change the archive contents.

We should keep consistency with the rest of git here.  Since git-archive
is just a fancy git-ls-tree, I think we should mirror its behaviour with
respect to the working directory.  (Which is what the current code does.
 Modulo bugs, of course.)

René

  reply	other threads:[~2007-04-09 15:04 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2007-03-03 16:07 bug in git-archive? Nick Williams
2007-03-03 16:09 ` Johannes Schindelin
2007-04-08 12:28 ` [PATCH] git-archive: document CWD effect René Scharfe
2007-04-08 23:21   ` Junio C Hamano
2007-04-09 15:04     ` René Scharfe [this message]
2007-04-09 20:00       ` Junio C Hamano
2007-04-09 20:37       ` Andy Parkins
2007-04-10 14:24         ` René Scharfe
2007-04-10 21:49           ` Junio C Hamano
2007-04-11 20:36             ` René Scharfe

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=461A55FB.6070600@lsrfire.ath.cx \
    --to=rene.scharfe@lsrfire.ath.cx \
    --cc=git@vger.kernel.org \
    --cc=junkio@cox.net \
    --cc=njw@jarb.freeserve.co.uk \
    /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).