All of lore.kernel.org
 help / color / mirror / Atom feed
From: Michael J Gruber <git@drmicha.warpmail.net>
To: jidanni@jidanni.org
Cc: git@vger.kernel.org
Subject: Re: read-only mode
Date: Thu, 04 Dec 2008 10:47:13 +0100	[thread overview]
Message-ID: <4937A721.6000606@drmicha.warpmail.net> (raw)
In-Reply-To: <8763m0swtz.fsf@jidanni.org>

jidanni@jidanni.org venit, vidit, dixit 03.12.2008 23:44:
> Here's a documentation stub. Please fix and finish it and place in some manual.

[Warning: irony ahead] Yes master, at your service!
[I'm aware he tone in the quote above may be due to translation issues.]

> ==Using git in read-only mode==
> Let's say you just want to examine things. There is a fine line
> between commands and options that just examine things vs. those that
> change things. One might worry that they can't remember that fine line.
> 
> Therefore the safest way to ensure you are using git in 'read-only mode' is to
> * su nobody, or
> * chmod -R u-w . (and remember to chmod -R u+w when you are finished), or

This does change things (time stamps).

I'd say the two above are no git-specific suggestions at all, and "cp -a
.git .git-orig" is the best safety-net for the cautious (assuming a
clean working tree) when doing heavy work but overkill for inspection.

> * ???

* clone and inspect the clone instead
* use obvious read-only commands (status, log, diff, show, ls-files,
tag&branch without argument) and avoid obvious write commands (commit,
checkout, apply, ...)

Without specifying "things" any further (repo, objects, index, working
tree) I don't really understand what the problem is.

Michael

      parent reply	other threads:[~2008-12-04  9:48 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2008-12-03 22:44 read-only mode jidanni
2008-12-03 23:10 ` Miklos Vajna
2008-12-04  9:47 ` Michael J Gruber [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=4937A721.6000606@drmicha.warpmail.net \
    --to=git@drmicha.warpmail.net \
    --cc=git@vger.kernel.org \
    --cc=jidanni@jidanni.org \
    /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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.