Re: [PATCH 3/4] refs.c: add a transaction function to append a reflog entry

2014-12-03 Thread Jonathan Nieder
Stefan Beller wrote: > On Tue, Dec 02, 2014 at 07:15:19PM -0800, Jonathan Nieder wrote: >> Stefan Beller wrote: >>> +int transaction_update_reflog(struct transaction *transaction, >>> + const char *refname, >>> + const unsigned char *new_sha1, >>> +

Re: [PATCH 3/4] refs.c: add a transaction function to append a reflog entry

2014-12-03 Thread Stefan Beller
On Tue, Dec 02, 2014 at 07:15:19PM -0800, Jonathan Nieder wrote: I'll think about rewriting the commit message, so it is easier to digest. I'll follow your suggestions except for the following annotations > > > +int transaction_update_reflog(struct transaction *transaction, > > +

Re: [PATCH 3/4] refs.c: add a transaction function to append a reflog entry

2014-12-02 Thread Jonathan Nieder
Stefan Beller wrote: > When performing a reflog transaction update, only write to the reflog iff > msg is non-NULL. This can then be combined with REFLOG_TRUNCATE to perform > an update that only truncates but does not write. This change only affects > whether or not a reflog entry should be gener

[PATCH 3/4] refs.c: add a transaction function to append a reflog entry

2014-12-01 Thread Stefan Beller
When performing a reflog transaction update, only write to the reflog iff msg is non-NULL. This can then be combined with REFLOG_TRUNCATE to perform an update that only truncates but does not write. This change only affects whether or not a reflog entry should be generated and written. If msg == NU

[PATCH 3/4] refs.c: add a transaction function to append a reflog entry

2014-12-01 Thread Stefan Beller
When performing a reflog transaction update, only write to the reflog iff msg is non-NULL. This can then be combined with REFLOG_TRUNCATE to perform an update that only truncates but does not write. This change only affects whether or not a reflog entry should be generated and written. If msg == NU

[PATCH 3/4] refs.c: add a transaction function to append a reflog entry

2014-11-26 Thread Stefan Beller
From: Ronnie Sahlberg Define a new transaction update type, UPDATE_LOG, and a new function transaction_update_reflog. This function will lock the reflog and append an entry to it during transaction commit. We can pass a flag to this function, which can truncate the the reflog file before we write