]> arthur.barton.de Git - bup.git/commit
Handle commit mergetags (at all)
authorRob Browning <rlb@defaultvalue.org>
Fri, 12 Apr 2019 19:55:13 +0000 (14:55 -0500)
committerRob Browning <rlb@defaultvalue.org>
Fri, 12 Apr 2019 19:55:24 +0000 (14:55 -0500)
commit3a66f25b253bf7790b45f5640d22298f0f00c70b
tree895fe1d62851b1bed6a9ec2de658de268efcdbd6
parent9ef961303049e17da0db16f75b35d1380f109643
Handle commit mergetags (at all)

Previously bup would just crash (i.e. bup ls) if it encountered a
commit with a mergetag header (apparently a new thing).  For now,
adjust git.parse_commit to accept and ignore them as long as they only
appear as an optional, final header in the commit.  That may or may
not turn out to be sufficient, and it does mean that for now we won't
be able to preserve mergetags (if we want to) whenever we rewrite
commits via bup gc, get, etc.

A mergetag example (indented two spaces):

  tree 1ebcecb7117725fd567de6e9652dc34b5b103f6d
  parent d3e6b8a251634ad673242aaa4a298edbb2e8ee39
  parent 3a34412caae002accd0fc7a7fc0b718c2f34159b
  author Rob Browning <rlb@defaultvalue.org> 1498341839 -0500
  committer Rob Browning <rlb@defaultvalue.org> 1498341839 -0500
  mergetag object 3a34412caae002accd0fc7a7fc0b718c2f34159b
   type commit
   tag emacs-25.2
   tagger Nicolas Petton <nicolas@petton.fr> 1492704766 +0200

   Emacs 25.2 release
   -----BEGIN PGP SIGNATURE-----
   Version: GnuPG v2

   iQEcBAABCAAGBQJY+N4EAAoJECM1h6R8IHkQFeEH/2FlBZSzsxNnXcMLVNirG0Uu
   8CBEAlme4LcViKs6Ae2uzPP4DrwN1g4LLNGnHBYQoL5nzwPtNOLDjaVtB2D7Q5Lj
   OgtiLix5kHNXh6j2GRnCHI5a6h52FY0yiaslefbstVu554S+1ttDbmqCgo5wtzFM
   eSPbxjLn1SrXSe9Mpfi/tBM2go7J4bihF6GyUktObwAkhOCz3ctJGTMltHzub1RC
   fZBku7bYjgbJocKJ+8MyfcgGz8sb1lV6jeJ9Yu+FuO6PIH9JtHZkjYbFhXqV8TxU
   vHfiCD8QK8w3SJ4RiMltfaFqhc0LFt1mUYOtHzwMbML8nqDV9SfozG7APN7f4OE=
   =oY2c
   -----END PGP SIGNATURE-----

  Merge upstream version 25.2

Signed-off-by: Rob Browning <rlb@defaultvalue.org>
Tested-by: Rob Browning <rlb@defaultvalue.org>
lib/bup/git.py