All of lore.kernel.org
 help / color / mirror / Atom feed
From: Junio C Hamano <junkio@cox.net>
To: linux@horizon.com
Cc: git@vger.kernel.org
Subject: Re: Missing features in git
Date: Tue, 14 Nov 2006 14:13:44 -0800	[thread overview]
Message-ID: <7vy7qdy8vb.fsf@assigned-by-dhcp.cox.net> (raw)
In-Reply-To: 20061114134958.5326.qmail@science.horizon.com

linux@horizon.com writes:

> One thing I noticed is that with ref logs, you've just re-invented the
> CVS problem of associating history with a name.  If you want to rename
> a branch (say, from "mischacks" to something suitable for publication),
> do you rename the log or not?  It's a less virulent form, but it seems
> like the same disease.

I do not think we currently rename the log but it is probably a
bug.  Renaming tag should also be made easier.

> Another minor quibble: AFAICT, "git checkout -f -m" is meaningless (-f
> overrides -m), but doesn't complain.

It should be made to complain.

> An example of when you'd want to do this is performing a "git bisect"
> with a local "#define DEBUG 1" change.  Particularly if you
> hit a non-compiling version and need to back up.
> or the way git-bisect does it
>   
>         echo "$rev" > "$GIT_DIR/refs/heads/new-bisect"
>         git checkout new-bisect || exit
>         mv "$GIT_DIR/refs/heads/new-bisect" "$GIT_DIR/refs/heads/bisect" &&
>         GIT_DIR="$GIT_DIR" git-symbolic-ref HEAD refs/heads/bisect

The name new-bisect is really temporary the code just shows it
punts on a situation it does not expect (it essentially expects
a clean tree and working with a local change is by accident) and
being ony half helpful to the user while recovering from that
unexpected situation.  In other words, that's a room for
improvement.  We should be rewrite the above with something like
what we have in the else clause in git-checkout around line 150.
It might make sense to make it a shell function and sharable
between checkout and bisect (perhaps there are other uses).
Then we do not need the temporary branch.

> Either way, it reserves a second branch name, and seems like a bit of
> a hack.

You are correct to call it a hack.  git-bisect started as a
technology demonstration of the underlying rev-list --bisect
feature.  The thing is that the technology was so nice and
useful that we started using it before cleaning up these
implementation details.  I think instead of documenting the duct
tape that holds git-bisect together ("rev-list --bisect" is
great, and what "git-bisect" does is basically great but with
minor glitches like you noticed and with hacky implementation
details; I am calling the latter "duct tape"), we should redo
the hackish part.

Enough with bisect.  And jumping the head while forward/back
porting the local change would also involve the same kind of
change, so "git reset --merge-local-change" might be a good
addition, but I am not sure about the details yet.

      parent reply	other threads:[~2006-11-14 22:13 UTC|newest]

Thread overview: 16+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2006-11-14 13:49 Missing features in git linux
2006-11-14 14:53 ` Jakub Narebski
2006-11-14 15:47   ` Karl Hasselström
2006-11-14 17:15     ` Jakub Narebski
2006-11-14 17:36       ` Karl Hasselström
2006-11-14 17:45         ` Jakub Narebski
2006-11-14 17:49           ` Shawn Pearce
2006-11-14 18:40             ` Linus Torvalds
2006-11-14 19:37               ` Petr Baudis
2006-11-14 22:09               ` Junio C Hamano
2006-11-14 15:39 ` Karl Hasselström
2006-11-14 18:55 ` Edgar Toernig
2006-11-14 21:38   ` linux
2006-11-15  7:35     ` Karl Hasselström
2006-11-15 16:50       ` Linus Torvalds
2006-11-14 22:13 ` Junio C Hamano [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=7vy7qdy8vb.fsf@assigned-by-dhcp.cox.net \
    --to=junkio@cox.net \
    --cc=git@vger.kernel.org \
    --cc=linux@horizon.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 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.