hi,

there was a problem yesterday which can be instructive to all of us, i
think.

in git, every commit has one or more parent, so all what you have to
know is the hash of the latest commit, which contains the hash of the
parent commit(s) and so on. this can be problematic: if you don't know
that hash, then you know nothing. (because of this, there is a reflog,
which stores the hashes of the "latest commits" during the time.). by
default, this magic hash is stored under .git/refs/heads/master

so here is the problem: krix found yesterday: after doing a "dg optimize",
the .git/refs/heads dir is empty, and this was considered by him as a
"big bug"

1) the positive side:

- in fact this is not a bug, it's a feature, there is even a
  git pack-refs command to pack (and thus remove) thos files. i did not
  know about this, but asked the git folks and they were helpful (in
  fact Junio himself - the git maintainer - explained the situation)

- dg had a mechanism to detect if the commit to be created will be the
  first one in the repo (thus it'll have no parent) or not. this was not
  correct because it just checked if the .git/refs/heads was empty or
  not, instead using the proper 'git rev-parse --verify' command to do
  so. i've fixed this yesterday after krix reported the dg problem

2) the negative side

this is not about blaming krix, but i would like to point out the facts
that happened now and i would like to prevent them in the future

- if you have a problem, then as long as you are not sure what that bug
  causes (here: if it really causes the corruption of a repo or not),
  please don't start to tell people what do you think it may cause
  counting the worst case - like "dont use 'dg optimize' it will break
  .git". this is simply won't help anybody

- if you have a problem and you would like to notify every dev, then use
  this mailing list, and don't highlight every dev at #frugalware.dev
  with the same text. it's just spamming

thanks,
- VMiklos

Attachment: pgp4K16DLgmpH.pgp
Description: PGP signature

_______________________________________________
Frugalware-devel mailing list
[email protected]
http://frugalware.org/mailman/listinfo/frugalware-devel

Reply via email to