Re: [PATCH 05/15] refs.c: update rename_ref to use a transaction

2014-10-30 Thread Ronnie Sahlberg
On Wed, Oct 29, 2014 at 11:43 AM, Junio C Hamano gits...@pobox.com wrote: Ronnie Sahlberg sahlb...@google.com writes: On Tue, Oct 28, 2014 at 2:12 PM, Junio C Hamano gits...@pobox.com wrote: More importantly, when you know that the end result you want to see is that the old and new log files

Re: [PATCH 05/15] refs.c: update rename_ref to use a transaction

2014-10-29 Thread Ronnie Sahlberg
On Tue, Oct 28, 2014 at 2:12 PM, Junio C Hamano gits...@pobox.com wrote: Ronnie Sahlberg sahlb...@google.com writes: I timed a git branch -m for a branch with ~2400 log entries and it takes neglible time : real 0m0.008s user 0m0.000s sys 0m0.007s I really hate this line of

Re: [PATCH 05/15] refs.c: update rename_ref to use a transaction

2014-10-29 Thread Junio C Hamano
Ronnie Sahlberg sahlb...@google.com writes: On Tue, Oct 28, 2014 at 2:12 PM, Junio C Hamano gits...@pobox.com wrote: More importantly, when you know that the end result you want to see is that the old and new log files are bit-for-bit identical, and if not there is some bug in either parsing

Re: [PATCH 05/15] refs.c: update rename_ref to use a transaction

2014-10-28 Thread Junio C Hamano
Ronnie Sahlberg sahlb...@google.com writes: commit 0295e9cebc41020ee84da275549b164a8770ffba upstream. Change refs.c to use a single transaction to copy/rename both the refs and its reflog. Since we are no longer using rename() to move the reflog file we no longer need to disallow rename_ref

Re: [PATCH 05/15] refs.c: update rename_ref to use a transaction

2014-10-28 Thread Junio C Hamano
Junio C Hamano gits...@pobox.com writes: Ronnie Sahlberg sahlb...@google.com writes: commit 0295e9cebc41020ee84da275549b164a8770ffba upstream. Change refs.c to use a single transaction to copy/rename both the refs and its reflog. Since we are no longer using rename() to move the reflog file

Re: [PATCH 05/15] refs.c: update rename_ref to use a transaction

2014-10-28 Thread Ronnie Sahlberg
On Tue, Oct 28, 2014 at 12:56 PM, Junio C Hamano gits...@pobox.com wrote: Junio C Hamano gits...@pobox.com writes: Ronnie Sahlberg sahlb...@google.com writes: commit 0295e9cebc41020ee84da275549b164a8770ffba upstream. Change refs.c to use a single transaction to copy/rename both the refs and

Re: [PATCH 05/15] refs.c: update rename_ref to use a transaction

2014-10-28 Thread Junio C Hamano
Ronnie Sahlberg sahlb...@google.com writes: I timed a git branch -m for a branch with ~2400 log entries and it takes neglible time : real 0m0.008s user 0m0.000s sys 0m0.007s I really hate this line of reasoning. Small things tend to add up. More importantly, when you know that the

[PATCH 05/15] refs.c: update rename_ref to use a transaction

2014-10-21 Thread Ronnie Sahlberg
commit 0295e9cebc41020ee84da275549b164a8770ffba upstream. Change refs.c to use a single transaction to copy/rename both the refs and its reflog. Since we are no longer using rename() to move the reflog file we no longer need to disallow rename_ref for refs with a symlink for its reflog so we can