[PATCH] git-seek: Eliminate spurious warning. Fix errant reference to git-bisect in docs.

From: Carl Worth <cworth@cworth.org>
Date: 2006-02-24 12:01:55
This fixed a bug that would cause "git seek" to mistakenly try to
checkout the seek branch just after deleting it. Of course, that would
never work, but fixing the bug does squelch the annoying error caused
by the bug.

Also fix an errant title of "git-bisect" in the git-seek documentation.

---

On Thu, 23 Feb 2006 19:18:48 -0500, "J. Bruce Fields" wrote:
> On Thu, Feb 23, 2006 at 12:31:25PM -0800, Carl Worth wrote:
> > +git-bisect(1)
> > +=============
> 
> Oops.

Thanks.

> I wonder if its a good idea to silently reset a branch named with a
> short common word?

It at least takes some care not to leave commits dangling when doing
this, (the seek branch must at least be a subset of the current
HEAD). I was pretty much following the lead of git-bisect here,
(though "bisect" is definitely a touch longer and less common than
"seek").

If it would be preferred to hide such "internal" branch names behind
some unlikely symbol or such, that would obviously be easy to do.

As is, the seek branch is at least documented, and rather well
advertised in operation, (for example, returning with "git seek"
reported "Deleted branch seek.").

> These long usage texts with language duplicated from the man pages seem
> like they'd be asking for bit-rot, when an update happens in one place
> but not the other.  I dunno.

Yeah, I don't know. Again, I was just imitating things I'd seen
elsewhere.

 Documentation/git-seek.txt |    4 ++--
 git-seek.sh                |    2 +-
 2 files changed, 3 insertions(+), 3 deletions(-)

43f042982c26859b6b7f6055fc03dda8e89f4e70
diff --git a/Documentation/git-seek.txt b/Documentation/git-seek.txt
index cb5c13d..513dbc7 100644
--- a/Documentation/git-seek.txt
+++ b/Documentation/git-seek.txt
@@ -1,5 +1,5 @@
-git-bisect(1)
-=============
+git-seek(1)
+===========
 
 NAME
 ----
diff --git a/git-seek.sh b/git-seek.sh
index 26f0b76..921c014 100644
--- a/git-seek.sh
+++ b/git-seek.sh
@@ -65,7 +65,7 @@ seek_reset() {
 		source 
 	fi
 	git checkout "$source" &&
-	(git branch -d seek || err=$? ; git checkout seek ; exit $err) &&
+	(git branch -d seek || (err=$? ; git checkout seek ; exit $err)) &&
 	rm -f "$GIT_DIR/head-name"
 }
 
-- 
1.2.3.g2656-dirty


-
To unsubscribe from this list: send the line "unsubscribe git" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Received on Fri Feb 24 12:03:55 2006

This archive was generated by hypermail 2.1.8 : 2006-02-24 12:04:05 EST