Git development
 help / color / mirror / Atom feed
From: Petr Baudis <pasky@ucw.cz>
To: Junio C Hamano <junkio@cox.net>
Cc: Kay Sievers <kay.sievers@vrfy.org>, git@vger.kernel.org
Subject: Re: Broken adding of cache entries
Date: Sun, 8 May 2005 18:59:15 +0200	[thread overview]
Message-ID: <20050508165915.GW9495@pasky.ji.cz> (raw)
In-Reply-To: <7vll6q70mg.fsf@assigned-by-dhcp.cox.net>

Dear diary, on Sun, May 08, 2005 at 07:22:31AM CEST, I got a letter
where Junio C Hamano <junkio@cox.net> told me that...
> >>>>> "JCH" == Junio C Hamano <junkio@cox.net> writes:
> 
> JCH> I am not quite sure the semantics is quite right, so I am
> JCH> holding it off from putting it in git-jc repository for now, but
> JCH> please review it, give it a try and tell me what you think.
> 
> Ok, I have two updates pushed out at git-jc archive at
> http://members.cox.net/junkio/git-jc.git/

I wanted to merge with you, but I'd like to make some (mostly minor)
nitpicks first.

Sorry for totally garbled whitespace and everything, this is just gpm.

--- e19665d8d42877246ac7e98a7c671d11adbe8b56/read-cache.c  (mode:100644)
+++ uncommitted/read-cache.c  (mode:100644)
+               char *ep = strchr(cp, '/');
+               if (ep == 0)

Please use NULL.

+static struct alternate_object_database
+{
+       char *base;
+       char *name;
+} *alt_odb;

The commonly accepted style is to have the { bracket on the same line as the
struct identifier.

Sticking a brief explanation to prepare_alt_odb(), like "pass 0
allocates the array and pass 1 fills it" couldn't hurt, it took me a
while of staring at it to figure out. There's also unused @buf variable.
But I personally think all this alt_odb code is quite creepy. ;-)

--- e19665d8d42877246ac7e98a7c671d11adbe8b56/write-tree.c  (mode:100644)
+++ uncommitted/write-tree.c  (mode:100644)
-                       if (++unmerged > 10) {
+                       if (10 < ++funny) {

Do those changes make any sense? The former version is certainly much
easier to read for me. I can live with it in the new code, but changing
old code to it...

With the current update-cache protections, how can you legally achieve a
cache with duplicate entries, so that you need to check for that in
write-tree?

Thanks,

-- 
				Petr "Pasky" Baudis
Stuff: http://pasky.or.cz/
C++: an octopus made by nailing extra legs onto a dog. -- Steve Taylor

  reply	other threads:[~2005-05-08 16:52 UTC|newest]

Thread overview: 13+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <1115408460.32065.37.camel@localhost.localdomain>
     [not found] ` <20050506231447.GG32629@pasky.ji.cz>
     [not found]   ` <1115421933.32065.111.camel@localhost.localdomain>
     [not found]     ` <20050506233003.GJ32629@pasky.ji.cz>
     [not found]       ` <1115423450.32065.138.camel@localhost.localdomain>
     [not found]         ` <20050507001409.GP32629@pasky.ji.cz>
     [not found]           ` <1115431767.32065.182.camel@localhost.localdomain>
2005-05-07 15:28             ` Broken adding of cache entries Petr Baudis
2005-05-07 18:42               ` Junio C Hamano
2005-05-07 19:22               ` Junio C Hamano
2005-05-07 22:41                 ` Petr Baudis
2005-05-08  0:43                   ` Junio C Hamano
2005-05-08  1:50                     ` Junio C Hamano
2005-05-08  5:22                       ` Junio C Hamano
2005-05-08 16:59                         ` Petr Baudis [this message]
2005-05-08 21:06                           ` Junio C Hamano
2005-05-08 21:22                             ` Petr Baudis
2005-05-08 22:18                               ` Junio C Hamano
2005-05-08 22:22                                 ` Junio C Hamano
2005-05-08 22:42                                   ` 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=20050508165915.GW9495@pasky.ji.cz \
    --to=pasky@ucw.cz \
    --cc=git@vger.kernel.org \
    --cc=junkio@cox.net \
    --cc=kay.sievers@vrfy.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