All of lore.kernel.org
 help / color / mirror / Atom feed
From: Johannes Schindelin <Johannes.Schindelin@gmx.de>
To: Junio C Hamano <junkio@cox.net>
Cc: git@vger.kernel.org, Mike Coleman <tutufan@gmail.com>
Subject: Re: [PATCH 2/2] Teach name-rev to identify revisions containing a certain blob
Date: Sun, 18 Feb 2007 00:31:34 +0100 (CET)	[thread overview]
Message-ID: <Pine.LNX.4.63.0702180026000.22628@wbgn013.biozentrum.uni-wuerzburg.de> (raw)
In-Reply-To: <7vire0tz51.fsf@assigned-by-dhcp.cox.net>

Hi,

On Sat, 17 Feb 2007, Junio C Hamano wrote:

> Johannes Schindelin <Johannes.Schindelin@gmx.de> writes:
> 
> > +static struct object_hash file_trees = { 0, 0, NULL };
> > +static struct object_array file_commits = { 0, 0, NULL };
> 
> These don't look good for two reasons: (1) you could leave BSS
> to do the 0 initialization; (2) you need to change this if you
> need to change the shape of "struct object_hash" later.

Yes, you are right on both accounts. Can you please just ammend the 
commit?

> > +#define CONTAINS_FILE (1u<<10)
> 
> I am partly at fault, but I think we should have a consolidated
> bit assignment policy in place before introducing new users of
> object flags.  Some older code says in their comments that
> revision.h reserves lower 8 bits while others say 16.  I offhand
> know who is correct X-<.

Something like this? (I did not know where to put the comment, so I let it 
be...)

--
[PATCH] The lower 16 bits of the object flags are reserved for rev_walk

Signed-off-by: Johannes Schindelin <Johannes.Schindelin@gmx.de>

---

 builtin-blame.c    |    4 ++--
 builtin-describe.c |    2 +-
 builtin-reflog.c   |    4 ++--
 3 files changed, 5 insertions(+), 5 deletions(-)

diff --git a/builtin-blame.c b/builtin-blame.c
index 7a5665f..8323dbf 100644
--- a/builtin-blame.c
+++ b/builtin-blame.c
@@ -66,8 +66,8 @@ static unsigned blame_copy_score;
 #define BLAME_DEFAULT_COPY_SCORE	40
 
 /* bits #0..7 in revision.h, #8..11 used for merge_bases() in commit.c */
-#define METAINFO_SHOWN		(1u<<12)
-#define MORE_THAN_ONE_PATH	(1u<<13)
+#define METAINFO_SHOWN		(1u<<16)
+#define MORE_THAN_ONE_PATH	(1u<<17)
 
 /*
  * One blob in a commit that is being suspected
diff --git a/builtin-describe.c b/builtin-describe.c
index bcc6456..07a96a4 100644
--- a/builtin-describe.c
+++ b/builtin-describe.c
@@ -4,7 +4,7 @@
 #include "refs.h"
 #include "builtin.h"
 
-#define SEEN		(1u<<0)
+#define SEEN		(1u<<16)
 #define MAX_TAGS	(FLAG_BITS - 1)
 
 static const char describe_usage[] =
diff --git a/builtin-reflog.c b/builtin-reflog.c
index 3415551..3aa6902 100644
--- a/builtin-reflog.c
+++ b/builtin-reflog.c
@@ -34,8 +34,8 @@ struct expire_reflog_cb {
 	struct cmd_reflog_expire_cb *cmd;
 };
 
-#define INCOMPLETE	(1u<<10)
-#define STUDYING	(1u<<11)
+#define INCOMPLETE	(1u<<16)
+#define STUDYING	(1u<<17)
 
 static int tree_is_complete(const unsigned char *sha1)
 {

  reply	other threads:[~2007-02-17 23:31 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2007-02-17 17:39 [PATCH 2/2] Teach name-rev to identify revisions containing a certain blob Johannes Schindelin
2007-02-17 18:24 ` Junio C Hamano
2007-02-17 23:52   ` Johannes Schindelin
2007-02-18  0:04   ` Johannes Schindelin
2007-02-17 18:30 ` Junio C Hamano
2007-02-17 23:31   ` Johannes Schindelin [this message]
2007-02-18  8:34 ` Junio C Hamano
2007-02-18  8:48   ` Junio C Hamano
2007-02-18 15:41   ` Johannes Schindelin

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=Pine.LNX.4.63.0702180026000.22628@wbgn013.biozentrum.uni-wuerzburg.de \
    --to=johannes.schindelin@gmx.de \
    --cc=git@vger.kernel.org \
    --cc=junkio@cox.net \
    --cc=tutufan@gmail.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.