git@vger.kernel.org mailing list mirror (one of many)
 help / color / mirror / code / Atom feed
* Truncating HEAD reflog on branch move
@ 2017-06-21 21:40 brian m. carlson
  2017-06-21 21:46 ` Junio C Hamano
  0 siblings, 1 reply; 69+ messages in thread
From: brian m. carlson @ 2017-06-21 21:40 UTC (permalink / raw)
  To: git; +Cc: Sahil Dua, Kyle Meyer

[-- Attachment #1: Type: text/plain, Size: 1348 bytes --]

In Git 2.11.0, using git branch -m caused an empty entry to be logged to
the reflog, but it preserved the previous history of the default (HEAD)
reflog.  In Git 2.13.1 (and in next and pu), we write a valid entry into
the reflog, but truncate it.

So for the following commands:

  git clone https://git.crustytoothpaste.net/git/bmc/homedir.git
  cd homedir
  git checkout cPanel
  git checkout master
  git branch -m master new

I get the following on 2.11.0:

2cbfbd5 HEAD@{0}:
2cbfbd5 HEAD@{1}: checkout: moving from cPanel to master
eaf8db2 HEAD@{2}: checkout: moving from master to cPanel
2cbfbd5 HEAD@{3}: clone: from https://bmc@git.crustytoothpaste.net/git/bmc/homedir.git

and this on a recent next:

2cbfbd5 HEAD@{0}: Branch: renamed refs/heads/master to refs/heads/new

For this test, any repo will work; I just picked this one because it had
two branches I could use to generate dummy reflog entries.

A colleague reported this to me as a bug.  I don't see anything in the
release notes about this as a desired behavior change, and it does seem
undesirable to truncate the reflog this way.  If this isn't intentional,
I'm happy to work up a patch.
-- 
brian m. carlson / brian with sandals: Houston, Texas, US
https://www.crustytoothpaste.net/~bmc | My opinion only
OpenPGP: https://keybase.io/bk2204

[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 868 bytes --]

^ permalink raw reply	[flat|nested] 69+ messages in thread

end of thread, other threads:[~2017-07-10 16:09 UTC | newest]

Thread overview: 69+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2017-06-21 21:40 Truncating HEAD reflog on branch move brian m. carlson
2017-06-21 21:46 ` Junio C Hamano
2017-06-21 23:04   ` Kyle Meyer
2017-06-21 23:12     ` Kyle Meyer
2017-06-22 15:16     ` Jeff King
2017-06-22 18:32       ` Junio C Hamano
2017-06-22 18:45         ` Jeff King
2017-06-22 19:03           ` Junio C Hamano
2017-06-22 20:21             ` Jeff King
2017-06-22 20:32               ` Junio C Hamano
2017-06-22 21:52                 ` Jeff King
2017-06-22 22:25                   ` Jeff King
2017-06-23  3:13                     ` Jeff King
2017-07-04 19:58                       ` brian m. carlson
2017-07-04 21:24                         ` Jeff King
2017-07-04 21:27                           ` brian m. carlson
2017-07-04 21:28                             ` Jeff King
2017-07-05  1:49                           ` Junio C Hamano
2017-07-05  7:55                           ` [PATCH 0/6] fixing reflog-walk oddities Jeff King
2017-07-05  7:57                             ` [PATCH 1/6] reflog-walk: skip over double-null oid due to HEAD rename Jeff King
2017-07-05 17:34                               ` Junio C Hamano
2017-07-05 21:21                                 ` Jeff King
2017-07-05  8:00                             ` [PATCH 2/6] t1414: document some reflog-walk oddities Jeff King
2017-07-05 17:56                               ` Junio C Hamano
2017-07-05 21:27                                 ` Jeff King
2017-07-05 22:45                                   ` Junio C Hamano
2017-07-06  7:16                                     ` Jeff King
2017-07-06  7:55                                       ` Jeff King
2017-07-06 15:42                                       ` Junio C Hamano
2017-07-07  5:19                                         ` Jeff King
2017-07-07  6:00                                           ` Junio C Hamano
2017-07-07  6:22                                             ` Jeff King
2017-07-05 20:05                               ` Ramsay Jones
2017-07-05 21:30                                 ` Jeff King
2017-07-05  8:02                             ` [PATCH 3/6] log: do not free parents when walking reflog Jeff King
2017-07-05  8:04                             ` [PATCH 4/6] get_revision_1(): replace do-while with an early return Jeff King
2017-07-05  8:06                             ` [PATCH 5/6] rev-list: check reflog_info before showing usage Jeff King
2017-07-05 18:07                               ` Junio C Hamano
2017-07-05 21:31                                 ` Jeff King
2017-07-05  8:09                             ` [PATCH 6/6] reflog-walk: stop using fake parents Jeff King
2017-07-07  0:32                               ` Eric Wong
2017-07-07  3:02                                 ` Jeff King
2017-07-07  3:15                                   ` Jeff King
2017-07-10  9:42                                   ` Eric Wong
2017-07-10 11:20                                     ` Jeff King
2017-07-10 16:09                                     ` Junio C Hamano
2017-07-07  8:36                             ` [PATCH v2 0/4] reflog-walk fixes for maint Jeff King
2017-07-07  8:37                               ` [PATCH v2 1/4] reflog-walk: skip over double-null oid due to HEAD rename Jeff King
2017-07-07  8:39                               ` [PATCH v2 2/4] reflog-walk: duplicate strings in complete_reflogs list Jeff King
2017-07-07  8:41                               ` [PATCH v2 3/4] reflog-walk: don't free reflogs added to cache Jeff King
2017-07-07  8:43                               ` [PATCH v2 4/4] reflog-walk: include all fields when freeing complete_reflogs Jeff King
2017-07-07  9:05                               ` [PATCH v2 0/7] fixing reflog-walk oddities Jeff King
2017-07-07  9:06                                 ` [PATCH v2 1/7] t1414: document some " Jeff King
2017-07-07  9:21                                   ` Jeff King
2017-07-07 15:54                                   ` Kyle Meyer
2017-07-07  9:07                                 ` [PATCH v2 2/7] revision: disallow reflog walking with revs->limited Jeff King
2017-07-07  9:07                                 ` [PATCH v2 3/7] log: do not free parents when walking reflog Jeff King
2017-07-07 17:10                                   ` Junio C Hamano
2017-07-09 10:13                                     ` Jeff King
2017-07-09 16:59                                       ` Junio C Hamano
2017-07-10 13:27                                         ` Jeff King
2017-07-07  9:07                                 ` [PATCH v2 4/7] get_revision_1(): replace do-while with an early return Jeff King
2017-07-07  9:08                                 ` [PATCH v2 5/7] rev-list: check reflog_info before showing usage Jeff King
2017-07-07  9:14                                 ` [PATCH v2 6/7] reflog-walk: stop using fake parents Jeff King
2017-07-07  9:24                                   ` Jeff King
2017-07-07 15:54                                   ` Kyle Meyer
2017-07-09 10:08                                     ` Jeff King
2017-07-07  9:16                                 ` [PATCH v2 7/7] reflog-walk: apply --since/--until to reflog dates Jeff King
2017-07-07 20:15                               ` [PATCH v2 0/4] reflog-walk fixes for maint Junio C Hamano

Code repositories for project(s) associated with this public inbox

	https://80x24.org/mirrors/git.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).