git.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Jakub Narebski <jnareb@gmail.com>
To: Dmitry Potapov <dpotapov@gmail.com>
Cc: Govind Salinas <blix@sophiasuchtig.com>,
	Git Mailing List <git@vger.kernel.org>
Subject: Re: [PYRITE] Status update and call for information.
Date: Sat, 24 May 2008 22:47:06 +0200	[thread overview]
Message-ID: <200805242247.07565.jnareb@gmail.com> (raw)
In-Reply-To: <20080524195957.GC3745@dpotapov.dyndns.org>

On Sat, 24 May 2008, Dmitry Potapov wrote:
> On Sat, May 24, 2008 at 12:16:17AM -0500, Govind Salinas wrote:
>> On Fri, May 23, 2008 at 8:07 PM, Jakub Narebski <jnareb@gmail.com> wrote:
>>> "Govind Salinas" <blix@sophiasuchtig.com> writes:
>>>
>>>> 1) Reduce the number of commands.
>>>>
>>>> I am currently at 30 total commands, and while I have some more to go, I
>>>> think there are some ways that I can get rid of some of them by
>>>> combining them.  Do we really need a clone, branch and checkout?  Don't
>>>> these all mean the same thing in the end?  They mean get me a working
>>>> directory of the repository starting at X.  For clone, you start
>>>> with 'master'. For checkout, you tell it what to get you.  Branch
>>>> will help you manage things you can locally get.  So perhaps we can
>>>> do something like the following...
>>>
>>> Note that you sometimes want to make a branch without checking it out.
>>> Also note that git-branch is overloaded to get a list of branches
>>> available.
>>>
>> 
>> Sure, removing commands is not about removing features, its about
>> reducing the learning curve and reducing confusion.
> 
> I don't see how hiding creating branch functionality behind some other
> command will help with learning curve or reduce confusion. If I started
> to use any new SCM and had to create a new branch, I would look for the
> "branch" command. If there is something wrong with the git-branch then
> it is that this command does not checkout the newly created branch by
> default. So, I usually create branches using git-checkout, which is
> counterintuitive.

That of course depends on the point of view [1].  Branches in git
are "growth point" pointers to DAG of revisions.  git-branch lists
and creates branches, and can be used to rename and delete branches
as well, and to enable reflog for branch.  It does not touch working
area; separation of domains.  (Note that sometimes you want to create
branch without checking it out).

git-checkout on the other hand is used to bring working area to given
state, usually from given branch (switching branches) or arbitrary
revision (detaching HEAD), but in some cases (with filename/pathspec)
from index.

Now, the seqence of
  $ git branch <newbranch>
  $ git checkout <newbranch>
could be written as
  $ git checkout -b <newbranch>
but could have been done as
  $ git branch -c <newbranch>
instead.  I think it is largely matter of priorities, taste... and
of course historical reasons and backwards compatibility.
 
> I don't think any commonly used SCM unites 'clone', 'branch', and
> 'checkout' functionality under the same name. This approach seems
> to be more confusing than helpful.

This is also my opinion.  Perhaps 'clone' and 'init', or 'clone' and
'import' could be the same command... hat might make sense...

Footnotes:
==========
[1] "The only intuitive interface is the nipple; everything else is
    learned." (attribution, anyone?)
-- 
Jakub Narebski
Poland

  reply	other threads:[~2008-05-24 20:48 UTC|newest]

Thread overview: 18+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2008-05-23  6:18 [PYRITE] Status update and call for information Govind Salinas
2008-05-23  6:45 ` Karl Hasselström
2008-05-23 12:36   ` Govind Salinas
2008-05-23 13:12     ` Karl Hasselström
2008-05-24  1:07 ` Jakub Narebski
2008-05-24  5:16   ` Govind Salinas
2008-05-24  8:41     ` Jakub Narebski
2008-05-24 17:43       ` Govind Salinas
2008-05-24 23:27         ` Jakub Narebski
2008-05-25  9:23         ` Jan Krueger
2008-05-25 18:22           ` Govind Salinas
2008-05-24 19:59     ` Dmitry Potapov
2008-05-24 20:47       ` Jakub Narebski [this message]
2008-05-24 21:50         ` Govind Salinas
2008-05-25 11:35           ` Jakub Narebski
2008-05-25 19:03             ` Govind Salinas
2008-05-24 19:57   ` Dmitry Potapov
2008-05-24 22:23     ` Jakub Narebski

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=200805242247.07565.jnareb@gmail.com \
    --to=jnareb@gmail.com \
    --cc=blix@sophiasuchtig.com \
    --cc=dpotapov@gmail.com \
    --cc=git@vger.kernel.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 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).