This is the whole refs-transactions-reflog series[1],
which was in discussion for a bit already. It applies to origin/master.
The idea is to have the reflog being part of the transactions, which
the refs are already using, so the we're moving towards a database
like API in the long run. This
From: Ronnie Sahlberg sahlb...@google.com
The ref_transaction_update function can already be used to create refs by
passing null_sha1 as the old_sha1 parameter. Simplify by replacing
transaction_create with a thin wrapper.
Signed-off-by: Ronnie Sahlberg sahlb...@google.com
Signed-off-by: Stefan
Signed-off-by: Stefan Beller sbel...@google.com
---
Notes:
Also a patch, which hasn't been posted on the mailing list before.
refs.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/refs.c b/refs.c
index b54b5b3..2942227 100644
--- a/refs.c
+++ b/refs.c
@@ -3532,7 +3532,7
From: Ronnie Sahlberg sahlb...@google.com
No one is using this function so we can delete it.
Signed-off-by: Ronnie Sahlberg sahlb...@google.com
Signed-off-by: Stefan Beller sbel...@google.com
---
refs.c | 7 ---
refs.h | 9 +
2 files changed, 1 insertion(+), 15 deletions(-)
diff
From: Ronnie Sahlberg sahlb...@google.com
Add back support to make it possible to delete refs that have a broken
sha1.
Add new internal flags REF_ALLOW_BROKEN and RESOLVE_REF_ALLOW_BAD_SHA1
to pass intent from branch.c that we are willing to allow
resolve_ref_unsafe and lock_ref_sha1_basic to
From: Ronnie Sahlberg sahlb...@google.com
unlock|close|commit_ref can be made static since there are no more external
callers.
Signed-off-by: Ronnie Sahlberg sahlb...@google.com
Signed-off-by: Stefan Beller sbel...@google.com
---
refs.c | 24
refs.h | 9 -
2
From: Ronnie Sahlberg sahlb...@google.com
Signed-off-by: Ronnie Sahlberg sahlb...@google.com
Signed-off-by: Stefan Beller sbel...@google.com
Reviewed-by: Michael Haggerty mhag...@alum.mit.edu
Reviewed-by: Jonathan Nieder jrnie...@gmail.com
---
Notes:
origin/sb/ref-transaction-unify-to-update
From: Ronnie Sahlberg sahlb...@google.com
Use a transaction for all updates during expire_reflog.
Signed-off-by: Ronnie Sahlberg sahlb...@google.com
Signed-off-by: Stefan Beller sbel...@google.com
---
Notes:
Jonathan writes:
This doesn't match the signature of each_reflog_ent_fn.
From: Ronnie Sahlberg sahlb...@google.com
log_ref_setup is used to do several semi-related things:
* Sometimes it will create a new reflog including missing parent
directories and cleaning up any conflicting stale directories
in the path.
* Fill in a filename buffer for the full path to the
From: Ronnie Sahlberg sahlb...@google.com
Rename the transaction functions. Remove the leading ref_ from the
names and append _ref to the names for functions that create/delete/
update sha1 refs.
Signed-off-by: Ronnie Sahlberg sahlb...@google.com
Signed-off-by: Stefan Beller sbel...@google.com
The updates are only holding refs not reflogs, so express it to the reader.
Signed-off-by: Stefan Beller sbel...@google.com
Reviewed-by: Jonathan Nieder jrnie...@gmail.com
---
Notes:
remotes/origin/sb/ref-transaction-reflog
no changes since last review
refs.c | 14 +++---
Now the struct ref_lock is used completely internally, so let's
remove it from the header file.
Signed-off-by: Stefan Beller sbel...@google.com
---
Notes:
This patch is brand new in this series,
so digest it while it's hot!
refs.c | 9 +
refs.h | 9 -
2 files changed, 9
This patch introduces two transaction functions for dealing with reflog
changes. The first function transaction_truncate_reflog can be used,
when a rebuilding of the reflog is desired, e.g. on reflog expire.
The transaction_update_reflog function can be used to amend a line to the
reflog.
We
From: Ronnie Sahlberg sahlb...@google.com
Break out the code to create the string and writing it to the file
descriptor from log_ref_write and add it into a dedicated function
log_ref_write_fd. For now this is only used from log_ref_write,
but later on we will call this function from reflog
On 12/04/2014 08:32 AM, Ulrich Windl wrote:
Hi!
I'm native German, but German git messages confuse me (yopu'll have to correlate them
with the man pages). At the moment git uses the locale settings from the environment, so
you can only change git's locale settings by changing the environment
Your solution adds a strbuf. That helps with context and stomping, but
loses readability and adds allocation.
If we changed the strbuf to a fixed-size buffer, that would help the
allocation issue. Some messages might be truncated, but it seems
unlikely in practice. It still loses
On Thu, Dec 04, 2014 at 12:36:46AM -0800, Stefan Beller wrote:
Your solution adds a strbuf. That helps with context and stomping, but
loses readability and adds allocation.
If we changed the strbuf to a fixed-size buffer, that would help the
allocation issue. Some messages might be
Hello,
I reported this issue on the git-user mailing list and they redirected me here.
The problem I have observed is that with a ignored path `git add
single file` behaves differently then `git add list of files`.
I my git/info/excludes file i have
/COM/config
!COM/config/Project.gny
The
On Wed, Dec 03, 2014 at 01:21:03PM -0800, Brodie Rao wrote:
I think it is also not sufficient. This patch seems to cover only
objects. But we assume that we can atomically rename() new versions of
files into place whenever we like without disrupting existing readers.
This is the case for
On Tue, Dec 02, 2014 at 09:26:00AM -0800, Junio C Hamano wrote:
Jeff King p...@peff.net writes:
There is also git var, which is a catch-all for printing some deduced
environmental defaults. I'd be just as happy to see it go away, though.
Having:
git --exec-path
git --toplevel
On Tue, Nov 25, 2014 at 12:48:26PM +0100, Peter Wu wrote:
git remote set-url knew about the '--push' option to update just the
pushurl, but it does not have a similar option for update fetch URL and
leave whatever was in place for the push URL.
This patch adds support for a '--fetch' option
On Thu, Dec 04, 2014 at 09:29:04AM +0100, Torsten Bögershausen wrote:
How about
alias git='LANGUAGE=de_DE.UTF-8 git'
in your ~/.profile ?
(Of course you need to change de to the language you want )
Besides being awkward in scripts (which will not respect the alias and
use a different
On Sat, Nov 22, 2014 at 10:04:57AM -0800, Kyle J. McKay wrote:
By stealth enabler I mean the removal of refs/notes/ restriction
that was originally done as a safety measure to avoid mistakes of
storing notes outside. The refs/remote-notes/ future direction
declares that it is no longer a
On Thu, 4 Dec 2014 10:06:23 +0100
Guilherme guibuf...@gmail.com wrote:
I reported this issue on the git-user mailing list and they
redirected me here.
The problem I have observed is that with a ignored path `git add
single file` behaves differently then `git add list of files`.
[...]
To
I forgot to mention:
Environment: Cygwin
Git version 2.1.1
On Thu, Dec 4, 2014 at 12:11 PM, Konstantin Khomoutov
flatw...@users.sourceforge.net wrote:
On Thu, 4 Dec 2014 10:06:23 +0100
Guilherme guibuf...@gmail.com wrote:
I reported this issue on the git-user mailing list and they
For many git commands, '-f/--force' is a way to force actions which
would otherwise error out. Way more than once, I've been trying this
with 'git branch -d' and 'git branch -m'...
I've had these two patches sitting in my tree for 3 years now it seems.
Here's a rebase.
Before applying these for
-f/--force is the standard way to force an action, and is used by branch
for the recreation of existing branches, but not for deleting unmerged
branches nor for renaming to an existing branch.
Make -m -f equivalent to -M and -d -f equivalent to -D, i.e.
allow -f/--force to be used with -m/-d
Signed-off-by: Michael J Gruber g...@drmicha.warpmail.net
---
t/t3200-branch.sh | 9 +
1 file changed, 9 insertions(+)
diff --git a/t/t3200-branch.sh b/t/t3200-branch.sh
index 432921b..0b3b8f5 100755
--- a/t/t3200-branch.sh
+++ b/t/t3200-branch.sh
@@ -97,6 +97,15 @@ test_expect_success
Guilherme schrieb am 04.12.2014 um 10:06:
Hello,
I reported this issue on the git-user mailing list and they redirected me
here.
The problem I have observed is that with a ignored path `git add
single file` behaves differently then `git add list of files`.
I my git/info/excludes file
By default, check-ignore does not list tracked files at all since
they are not subject to ignore patterns.
Make this clearer in the man page.
Reported-by: Guilherme guibuf...@gmail.com
Signed-off-by: Michael J Gruber g...@drmicha.warpmail.net
---
That really is a bit confusing. Does this help?
On Thu, Dec 4, 2014 at 10:55 AM, Jeff King p...@peff.net wrote:
On Thu, Dec 04, 2014 at 09:29:04AM +0100, Torsten Bögershausen wrote:
How about
alias git='LANGUAGE=de_DE.UTF-8 git'
in your ~/.profile ?
(Of course you need to change de to the language you want )
Besides being awkward in
Torsten Bögershausen tbo...@web.de schrieb am 04.12.2014 um 09:29 in
Nachricht 54801b50.4080...@web.de:
On 12/04/2014 08:32 AM, Ulrich Windl wrote:
Hi!
I'm native German, but German git messages confuse me (yopu'll have to
correlate them with the man pages). At the moment git uses the
On 12/04/2014 09:29 AM, Stefan Beller wrote:
Somewhat short commit message, especially the motivation is missing.
What do we gain with this patch ?
In the struct the compiler needs to layout 2*20 bytes for the sha's.
It follows an int, typically 4 bytes.
It follows another int, now with one bit.
Ævar Arnfjörð Bjarmason schrieb am 04.12.2014 um 16:49:
On Thu, Dec 4, 2014 at 10:55 AM, Jeff King p...@peff.net wrote:
On Thu, Dec 04, 2014 at 09:29:04AM +0100, Torsten Bögershausen wrote:
How about
alias git='LANGUAGE=de_DE.UTF-8 git'
in your ~/.profile ?
(Of course you need to change de
Michael J Gruber g...@drmicha.warpmail.net writes:
The main issue at hand is really that we have localised git but not its
man pages. Even if you understand English, the man pages don't help you
at all if you can't connect the technical terms used there to their
localised counterparts in
Stefan Beller sbel...@google.com writes:
diff --git a/refs.c b/refs.c
index b54b5b3..2942227 100644
--- a/refs.c
+++ b/refs.c
@@ -3532,7 +3532,7 @@ struct ref_update {
unsigned char new_sha1[20];
unsigned char old_sha1[20];
int flags; /* REF_NODEREF? */
- int
On 12/04/2014 09:29 AM, Stefan Beller wrote:
This is the whole refs-transactions-reflog series[1],
which was in discussion for a bit already. It applies to origin/master.
I am still unhappy with the approach of this series, for the reasons
that I explained earlier [1]. In short, I think that
Dear git mailing list,
Dear Mike Gerwitz,
according to http://mikegerwitz.com/papers/git-horror-story#script-trust
the output of:
git log --pretty=format:%H$t%aN$t%s$t%G? --show-signature
should look like this:
-
f72924356896ab95a542c495b796555d016cbddd Mike GerwitzYet
another
On Thu, Dec 4, 2014 at 5:12 PM, Michael J Gruber
g...@drmicha.warpmail.net wrote:
Ævar Arnfjörð Bjarmason schrieb am 04.12.2014 um 16:49:
On Thu, Dec 4, 2014 at 10:55 AM, Jeff King p...@peff.net wrote:
On Thu, Dec 04, 2014 at 09:29:04AM +0100, Torsten Bögershausen wrote:
How about
alias
Hi,
Michael Haggerty wrote:
On 12/04/2014 09:29 AM, Stefan Beller wrote:
This is the whole refs-transactions-reflog series[1],
which was in discussion for a bit already. It applies to origin/master.
I am still unhappy with the approach of this series, for the reasons
that I explained
Junio C Hamano wrote:
We may want to see it done the other way around, though. That is,
to allow the pack-refs race fix, which was reviewed and has been
cooking, graduate without having to depend on this API rewrite, so
that we may be able to merge it down even to v2.2.x maintenance
track.
Jeff King p...@peff.net writes:
On Wed, Dec 03, 2014 at 01:21:03PM -0800, Brodie Rao wrote:
I think it is also not sufficient. This patch seems to cover only
objects. But we assume that we can atomically rename() new versions of
files into place whenever we like without disrupting
-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1
Hey Patrick,
On Thu, Dec 04, 2014 at 17:21:06 +, Patrick Schleizer wrote:
git log --pretty=format:%H$t%aN$t%s$t%G? --show-signature
[...]
But when I run that command, spaces are missing. (Using a user that does
not know my gpg public key for
Add completion for git-tag options including
all options that are currently shown in git tag -h.
Signed-off-by: Ralf Thielow ralf.thie...@gmail.com
---
contrib/completion/git-completion.bash | 10 ++
1 file changed, 10 insertions(+)
diff --git a/contrib/completion/git-completion.bash
Michael Haggerty wrote:
I am still unhappy with the approach of this series, for the reasons
that I explained earlier [1]. In short, I think that the abstraction
level is wrong. In my opinion, consumers of the refs API should barely
even have to *know* about reflogs, let alone implement
Jeff King p...@peff.net writes:
diff --git a/prompt.c b/prompt.c
index e5b4938..8181eeb 100644
--- a/prompt.c
+++ b/prompt.c
@@ -57,11 +57,19 @@ char *git_prompt(const char *prompt, int flags)
r = do_askpass(askpass, prompt);
}
- if (!r)
- r
On Thu, Dec 04, 2014 at 10:14:04AM -0800, Jonathan Nieder wrote:
Michael Haggerty wrote:
I am still unhappy with the approach of this series, for the reasons
that I explained earlier [1]. In short, I think that the abstraction
level is wrong. In my opinion, consumers of the refs API
Michael Haggerty mhag...@alum.mit.edu writes:
... an alternate proposal, to convert
expire_reflogs() to take callback functions that decide *what* to
expire, but which itself does the work of acquiring locks, iterating
through the reflog entries, rewriting the file, and overwriting the old
Stefan Beller sbel...@google.com writes:
This is the whole refs-transactions-reflog series[1],
which was in discussion for a bit already. It applies to origin/master.
The idea is to have the reflog being part of the transactions, which
the refs are already using, so the we're moving towards
On Thu, Dec 4, 2014 at 10:41 AM, Junio C Hamano gits...@pobox.com wrote:
Stefan Beller sbel...@google.com writes:
This is the whole refs-transactions-reflog series[1],
which was in discussion for a bit already. It applies to origin/master.
The idea is to have the reflog being part of the
Hi Ulrich,
2014-12-04 8:32 GMT+01:00 Ulrich Windl ulrich.wi...@rz.uni-regensburg.de:
Hi!
I'm native German, but German git messages confuse me (yopu'll have to
correlate them with the man pages). At the moment git uses the
What in particular makes the German git messages confusing you? What
Jeff King p...@peff.net writes:
On Tue, Dec 02, 2014 at 09:26:00AM -0800, Junio C Hamano wrote:
Jeff King p...@peff.net writes:
There is also git var, which is a catch-all for printing some deduced
environmental defaults. I'd be just as happy to see it go away, though.
Having:
Michael J Gruber g...@drmicha.warpmail.net writes:
-f/--force is the standard way to force an action, and is used by branch
for the recreation of existing branches, but not for deleting unmerged
branches nor for renaming to an existing branch.
Make -m -f equivalent to -M and -d -f equivalent
On Wed, Dec 03, 2014 at 08:56:45AM -0800, Junio C Hamano wrote:
Eric Wong normalper...@yhbt.net writes:
Luis Henriques hen...@camandro.org wrote:
On Mon, Mar 24, 2014 at 09:38:27PM +, Luis Henriques wrote:
Add --[no-]xmailer that allows a user to disable adding the 'X-Mailer:'
On Wed, Dec 3, 2014 at 9:24 PM, David Michael fedora@gmail.com wrote:
--- /dev/null
+++ b/compat/stat.c
@@ -0,0 +1,49 @@
+#define _POSIX_C_SOURCE 200112L
+#include stddef.h/* NULL */
+#include sys/stat.h /* *stat, S_IS* */
+#include sys/types.h /* mode_t */
Oops, the
Stefan Beller wrote:
Ok, let's see how Michaels series evolves and if I can base the
transactions series
on that
That sounds good to me, too, FWIW. That way we don't have to fuss
with conflicts in refs.c. :)
Thanks,
Jonathan
--
To unsubscribe from this list: send the line unsubscribe git in
Luis Henriques hen...@camandro.org writes:
On Wed, Dec 03, 2014 at 08:56:45AM -0800, Junio C Hamano wrote:
I actually do not think this is a good idea from debuggability.
Do you think this could be merged with yet another switch? I can't
think of a name for the switch, something like...
Add tests for the --[no-]xmailer option.
Signed-off-by: Luis Henriques hen...@camandro.org
---
t/t9001-send-email.sh | 32
1 file changed, 32 insertions(+)
diff --git a/t/t9001-send-email.sh b/t/t9001-send-email.sh
index e37efef..7a3f996 100755
---
David Michael fedora@gmail.com writes:
On Wed, Dec 3, 2014 at 9:24 PM, David Michael fedora@gmail.com wrote:
--- /dev/null
+++ b/compat/stat.c
@@ -0,0 +1,49 @@
+#define _POSIX_C_SOURCE 200112L
+#include stddef.h/* NULL */
+#include sys/stat.h /* *stat, S_IS* */
On Thu, Dec 04, 2014 at 11:33:24AM -0800, Junio C Hamano wrote:
Luis Henriques hen...@camandro.org writes:
On Wed, Dec 03, 2014 at 08:56:45AM -0800, Junio C Hamano wrote:
I actually do not think this is a good idea from debuggability.
Do you think this could be merged with yet another
Junio C Hamano gits...@pobox.com writes:
Jeff King p...@peff.net writes:
Christian raised the issue of cluttering the git --option
namespace,
and I do agree that's a potential issue.
I am not sure if that is an issue at all. You will need the same
number of options to cover all the
Am 02.12.2014 um 23:16 schrieb Max Kirillov:
On Tue, Dec 02, 2014 at 09:45:24PM +0100, Jens Lehmann wrote:
But, while hacking the submodule init I became more
convinced that the modules directory should be common and
submodules in checkout should be a checkouts of the
submodule. Because this is
Luis Henriques hen...@camandro.org writes:
Add tests for the --[no-]xmailer option.
Signed-off-by: Luis Henriques hen...@camandro.org
Thanks. Let's squash this in, too. We care about command line
options taking precedence over configured default.
t/t9001-send-email.sh | 26
Michael J Gruber g...@drmicha.warpmail.net writes:
By default, check-ignore does not list tracked files at all since
they are not subject to ignore patterns.
Make this clearer in the man page.
Reported-by: Guilherme guibuf...@gmail.com
Signed-off-by: Michael J Gruber
Jonathan Nieder jrnie...@gmail.com writes:
Christoph Mallon wrote:
% git rev-parse 'master@{52}'
warning: Log for ref refs/heads/master has gap after Thu, 1 Jan 1970
00:00:01 +.
0036
Can you say more? What output did you expect and how does this
Matthieu Moy matthieu@grenoble-inp.fr writes:
Junio C Hamano gits...@pobox.com writes:
Jeff King p...@peff.net writes:
Christian raised the issue of cluttering the git --option
namespace,
and I do agree that's a potential issue.
I am not sure if that is an issue at all. You will
Thanks Mike!
Mike Gerwitz wrote:
Mike, could you please put your various git commit verification helper
scripts into a publicly visible?
You can use this:
https://gitorious.org/easejs/easejs/source/ee85b058df783ffaa9f8d5ae58f9eb6d7586b0ca:tools/signchk
But note that the default value of
Am 04.12.14 21:18, schrieb Junio C Hamano:
Jonathan Nieder jrnie...@gmail.com writes:
Could you make a test script that illustrates and reproduces the
problem? I.e., a patch to a file like t/t1410-reflog.sh, such that
if I run
cd git
make
cd t
./t1410-reflog.sh
then
On Thu, Dec 04, 2014 at 10:24:09AM -0800, Junio C Hamano wrote:
Jeff King p...@peff.net writes:
diff --git a/prompt.c b/prompt.c
index e5b4938..8181eeb 100644
--- a/prompt.c
+++ b/prompt.c
@@ -57,11 +57,19 @@ char *git_prompt(const char *prompt, int flags)
r =
Mike Gerwitz mikegerw...@gnu.org writes:
It has since improved; I'm looking for the time to update the article,
or write a follow-up.
Thanks for an amusing read. We also let you merge a signed tag
these days, so that in a variant of your merge scenario #2, your
merge commit can carry your GPG
On Thu, Dec 04, 2014 at 11:02:37AM -0800, Junio C Hamano wrote:
Christian raised the issue of cluttering the git --option namespace,
and I do agree that's a potential issue.
I am not sure if that is an issue at all. You will need the same
number of options to cover all the necessary
On 12/04/2014 07:32 PM, Stefan Beller wrote:
On Thu, Dec 04, 2014 at 10:14:04AM -0800, Jonathan Nieder wrote:
Michael Haggerty wrote:
I am still unhappy with the approach of this series, for the reasons
that I explained earlier [1]. In short, I think that the abstraction
level is wrong. In
Jeff King p...@peff.net writes:
... I was thinking of
just creating a new namespace, like:
git var exec-path
git var author-ident
and deprecating the 4 existing GIT_* variables.
I'm fine with that. As I wrote in my response to MMoy, I forgot
about other kinds of options the git potty
Jeff King p...@peff.net writes:
On Thu, Dec 04, 2014 at 10:24:09AM -0800, Junio C Hamano wrote:
I wish this covered a lot more than just this part from an
end-user's point of view, but this is definitely one of the most
important code paths the mechanism should cover.
Which parts do you
-Original Message-
From: brian m. carlson
Sent: Wednesday, December 03, 2014 19:55
On Wed, Dec 03, 2014 at 06:31:18PM -0500, Jason Pyeron wrote:
I remember hitting this a while ago, but just gave up.
It seems to be a problem for others too.
Any ideas on how to debug this
On Thu, Dec 04, 2014 at 09:37:34PM +0100, Christoph Mallon wrote:
Am 04.12.14 21:18, schrieb Junio C Hamano:
Jonathan Nieder jrnie...@gmail.com writes:
Could you make a test script that illustrates and reproduces the
problem? I.e., a patch to a file like t/t1410-reflog.sh, such that
if
Christoph Mallon mal...@cs.uni-saarland.de writes:
Amen to that. I am getting the same thing.
I ran reproduce it reliably on multiple machines (OS X, FreeBSD, ia32,
Oh, I do not doubt you see a problem. I am just saying that I don't
have an easy entry to the issue without it reproducing for
Jeff King p...@peff.net writes:
I think the bug is in the reverse-reflog reader in
for_each_reflog_ent_reverse. It reads BUFSIZ chunks of the file in
reverse order, and then parses them individually. If the trailing
newline for a line falls directly on the block boundary, we may not have
it
From: Ronnie Sahlberg sahlb...@google.com
The ref_transaction_update function can already be used to create refs by
passing null_sha1 as the old_sha1 parameter. Simplify by replacing
transaction_create with a thin wrapper.
Signed-off-by: Ronnie Sahlberg sahlb...@google.com
Signed-off-by: Stefan
We don't actually need the locking functionality, because we already
hold the lock on the reference itself, which is how the reflog file is
locked. But the lock_file code still does some of the bookkeeping for
us and is more careful than the old code here was.
For example:
* Correctly handle the
The policy objects don't care about --updateref. So move it to
expire_reflog()'s flags parameter.
Signed-off-by: Michael Haggerty mhag...@alum.mit.edu
---
builtin/reflog.c | 12 ++--
1 file changed, 6 insertions(+), 6 deletions(-)
diff --git a/builtin/reflog.c b/builtin/reflog.c
index
Move expire_reflog() into refs.c and rename it to reflog_expire().
Turn the three policy functions into function pointers that are passed
into reflog_expire(). Add function prototypes and documentation to
refs.h.
Signed-off-by: Michael Haggerty mhag...@alum.mit.edu
---
builtin/reflog.c | 133
From: Ronnie Sahlberg sahlb...@google.com
Inline the function at its one remaining caller (which is within
refs.c) and remove it.
Signed-off-by: Michael Haggerty mhag...@alum.mit.edu
---
refs.c | 9 +
refs.h | 9 +
2 files changed, 2 insertions(+), 16 deletions(-)
diff --git
We want to separate the options relevant to the expiry machinery from
the options affecting the expiration policy. So add a flags argument
to expire_reflog() to hold the former.
The argument doesn't yet do anything.
Signed-off-by: Michael Haggerty mhag...@alum.mit.edu
---
builtin/reflog.c | 11
I propose this patch series as an alternative to Ronnie's reflog
transactions series.
Both alternatives have been discussed exhaustively on the list [1,2].
My opinion is that there is no need to allow arbitrary reflog changes
via the ref_transaction API, because just about the only things we
want
This is the first step towards separating the data needed by the
policy code from the data needed by the reflog expiration machinery.
Signed-off-by: Michael Haggerty mhag...@alum.mit.edu
---
builtin/reflog.c | 19 ++-
1 file changed, 10 insertions(+), 9 deletions(-)
diff --git
Extract two functions, reflog_expiry_prepare() and
reflog_expiry_cleanup(), from expire_reflog(). This is a further step
towards separating the code for deciding on expiration policy from the
code that manages the physical expiration.
This change requires a couple of local variables from
It was called unused, so at least it was self-consistent.
Signed-off-by: Michael Haggerty mhag...@alum.mit.edu
---
builtin/reflog.c | 8
1 file changed, 4 insertions(+), 4 deletions(-)
diff --git a/builtin/reflog.c b/builtin/reflog.c
index 2d85d26..3e11bee 100644
--- a/builtin/reflog.c
Now that expire_reflog() doesn't actually look in the
expire_reflog_policy_cb data structure, we can make it opaque:
* Change its callers to pass it a pointer to an entire struct
expire_reflog_policy_cb.
* Change it to pass the pointer through as a void *.
* Change the policy functions,
The policy objects don't care about --rewrite. So move it to
expire_reflog()'s flags parameter.
Signed-off-by: Michael Haggerty mhag...@alum.mit.edu
---
builtin/reflog.c | 10 +-
1 file changed, 5 insertions(+), 5 deletions(-)
diff --git a/builtin/reflog.c b/builtin/reflog.c
index
From: Ronnie Sahlberg sahlb...@google.com
Signed-off-by: Ronnie Sahlberg sahlb...@google.com
Signed-off-by: Stefan Beller sbel...@google.com
Reviewed-by: Michael Haggerty mhag...@alum.mit.edu
Reviewed-by: Jonathan Nieder jrnie...@gmail.com
Signed-off-by: Michael Haggerty mhag...@alum.mit.edu
---
Extracted from expire_reflog_ent() a function that is solely
responsible for deciding whether a reflog entry should be expired. By
separating this business logic from the mechanics of actually
expiring entries, we are working towards the goal of encapsulating
reflog expiry within the refs API,
From: Ronnie Sahlberg sahlb...@google.com
Break out the code to create the string and writing it to the file
descriptor from log_ref_write and add it into a dedicated function
log_ref_write_fd. For now this is only used from log_ref_write,
but later on we will call this function from reflog
The policy objects don't care about --verbose. So move it to
expire_reflog()'s flags parameter.
Signed-off-by: Michael Haggerty mhag...@alum.mit.edu
---
builtin/reflog.c | 24
1 file changed, 12 insertions(+), 12 deletions(-)
diff --git a/builtin/reflog.c
Add a new data type, struct expire_reflog_cb, for holding the data
that expire_reflog() passes to expire_reflog_ent() via
for_each_reflog_ent(). For now it only holds a pointer to struct
expire_reflog_policy_cb. In future commits we will move some data
from the latter to the former.
From: Stefan Beller sbel...@google.com
Now the struct ref_lock is used completely internally, so let's
remove it from the header file.
Signed-off-by: Stefan Beller sbel...@google.com
Signed-off-by: Michael Haggerty mhag...@alum.mit.edu
---
refs.c | 9 +
refs.h | 9 -
2 files
Add a flags field to struct expire_reflog_cb, and pass the flags
argument through to expire_reflog_ent(). In a moment we will start
using it to pass through flags that expire_reflog_ent() needs.
Signed-off-by: Michael Haggerty mhag...@alum.mit.edu
---
builtin/reflog.c | 2 ++
1 file changed, 2
There is very little cleanup needed if the reference has no reflog. If
we move the initialization of log_file down a bit, there's even less.
So instead of jumping to the cleanup code at the end of the function,
just do the cleanup and return inline.
Signed-off-by: Michael Haggerty
These members are not needed by the policy functions.
Signed-off-by: Michael Haggerty mhag...@alum.mit.edu
---
builtin/reflog.c | 20 ++--
1 file changed, 10 insertions(+), 10 deletions(-)
diff --git a/builtin/reflog.c b/builtin/reflog.c
index 6294406..01b76d0 100644
---
This is our usual convention.
Signed-off-by: Michael Haggerty mhag...@alum.mit.edu
---
builtin/reflog.c | 16
1 file changed, 8 insertions(+), 8 deletions(-)
diff --git a/builtin/reflog.c b/builtin/reflog.c
index 3e11bee..df302f4 100644
--- a/builtin/reflog.c
+++
1 - 100 of 128 matches
Mail list logo