git.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Junio C Hamano <junkio@cox.net>
To: Martin Atukunda <matlads@dsmagic.com>
Cc: git@vger.kernel.org
Subject: Re: [PATCH 4/6] Add check_repo_format check for all major operations.
Date: Tue, 22 Nov 2005 09:46:18 -0800	[thread overview]
Message-ID: <7vd5ksefth.fsf@assigned-by-dhcp.cox.net> (raw)
In-Reply-To: <200511221555.24572.matlads@dsmagic.com> (Martin Atukunda's message of "Tue, 22 Nov 2005 15:55:23 +0300")

Martin Atukunda <matlads@dsmagic.com> writes:

>> that call in the current series yet.  Even if you had, this does
>> not feel quite right to me.
>
> would something like the following apply in this case: (totally untested :)

Yes, although that is exactly what I said "this does not quite
feel right" ;-).  Is it hard to arrange things so that a process
does exactly one check_repo_format() during its lifetime?

Two more issues I've been thinking about:

1. The core.repositoryformatversion scheme assumes and relies on
   that at least .git/config would stay forward compatible.  But
   if you cover unconditionally the three main entry points, I
   suspect "git-var" or "git-config-set --get" would stop
   working in a wrong repository.  I think the scripts and
   Porcelains need a way to check if we are on a repository from
   the correct vintage before running other low-level commands,
   so one of these commands probably needs to be made to work
   without check_repo_format() dying. Or we could introduce a
   new command 'git-check-repo-format' for this specific
   purpose, and special case only that one.

2. Some commands are read-only and are handy for problem
   diagnosis (e.g. cat-file), so it _might_ make sense to allow
   them to attempt running in a newer repository (which may well
   fail due to repository format difference).  I am not sure
   about the merit of doing that outweighs the complexity,
   though.  What you did covers _everything_ uniformly, and
   certainly is simpler, easier to explain, and nicer.



   

  reply	other threads:[~2005-11-22 17:46 UTC|newest]

Thread overview: 12+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2005-11-22  0:28 Git Future Proofing Martin Atukunda
2005-11-22  0:28 ` [PATCH 1/6] Add GIT_REPO_VERSION, and repository_format_version Martin Atukunda
2005-11-22  0:28 ` [PATCH 2/6] Make init-db check repo format version if copying a config file Martin Atukunda
2005-11-22  0:28 ` [PATCH 3/6] Make get_git_dir take a flag that makes it re-read the env. variables Martin Atukunda
2005-11-22  0:28 ` [PATCH 4/6] Add check_repo_format check for all major operations Martin Atukunda
2005-11-22  8:29   ` Junio C Hamano
2005-11-22 12:55     ` Martin Atukunda
2005-11-22 17:46       ` Junio C Hamano [this message]
2005-11-23  0:57         ` Junio C Hamano
2005-11-22  0:28 ` [PATCH 5/6] Allow Specification of the conf file to read for git_config operations Martin Atukunda
2005-11-22  0:28 ` [PATCH 6/6] Add check for downgrading of repo format version via init-db Martin Atukunda
2005-11-22  1:13 ` Git Future Proofing Junio C Hamano

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=7vd5ksefth.fsf@assigned-by-dhcp.cox.net \
    --to=junkio@cox.net \
    --cc=git@vger.kernel.org \
    --cc=matlads@dsmagic.com \
    /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).