[PATCHv3 00/13] the refs-transactions-reflog series

2014-12-04 Thread Stefan Beller
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

[PATCH 01/13] refs.c: make ref_transaction_create a wrapper for ref_transaction_update

2014-12-04 Thread Stefan Beller
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

[PATCH 12/13] refs.c: use a bit for ref_update have_old

2014-12-04 Thread Stefan Beller
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

[PATCH 10/13] refs.c: remove lock_any_ref_for_update

2014-12-04 Thread Stefan Beller
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

[PATCH 13/13] refs.c: allow deleting refs with a broken sha1

2014-12-04 Thread Stefan Beller
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

[PATCH 09/13] refs.c: remove unlock_ref/close_ref/commit_ref from the refs api

2014-12-04 Thread Stefan Beller
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

[PATCH 02/13] refs.c: make ref_transaction_delete a wrapper for ref_transaction_update

2014-12-04 Thread Stefan Beller
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

[PATCH 07/13] reflog.c: use a reflog transaction when writing during expire

2014-12-04 Thread Stefan Beller
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.

[PATCH 08/13] refs.c: rename log_ref_setup to create_reflog

2014-12-04 Thread Stefan Beller
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

[PATCH 04/13] refs.c: rename the transaction functions

2014-12-04 Thread Stefan Beller
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

[PATCH 05/13] refs.c: rename transaction.updates to transaction.ref_updates

2014-12-04 Thread Stefan Beller
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 +++---

[PATCH 11/13] refs.c: don't expose the internal struct ref_lock in the header file

2014-12-04 Thread Stefan Beller
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

[PATCH 06/13] refs.c: add a transaction function to truncate or append a reflog entry

2014-12-04 Thread Stefan Beller
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

[PATCH 03/13] refs.c: add a function to append a reflog entry to a fd

2014-12-04 Thread Stefan Beller
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

Re: Enhancement Request: locale git option

2014-12-04 Thread Torsten Bögershausen
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

Re: [PATCH 03/14] copy_fd: pass error message back through a strbuf

2014-12-04 Thread Stefan Beller
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

Re: [PATCH 03/14] copy_fd: pass error message back through a strbuf

2014-12-04 Thread Jeff King
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

git add single file and git add list of files behave differentely for ignored files

2014-12-04 Thread Guilherme
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

Re: [PATCH] gc: support temporarily preserving garbage

2014-12-04 Thread Jeff King
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

Re: [PATCH] introduce git root

2014-12-04 Thread Jeff King
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

Re: [PATCH v3] remote: add --fetch and --both options to set-url

2014-12-04 Thread Jeff King
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

Re: Enhancement Request: locale git option

2014-12-04 Thread Jeff King
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

Re: [PATCH] notes: accept any ref for merge

2014-12-04 Thread Jeff King
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

Re: git add single file and git add list of files behave differentely for ignored files

2014-12-04 Thread Konstantin Khomoutov
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

Re: git add single file and git add list of files behave differentely for ignored files

2014-12-04 Thread Guilherme
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

[RFC/PATCH 0/2] Make git branch -f forceful

2014-12-04 Thread Michael J Gruber
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

[RFC/PATCH 2/2] branch: allow -f with -m and -d

2014-12-04 Thread Michael J Gruber
-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

[RFC/PATCH 1/2] t3200-branch: test -M

2014-12-04 Thread Michael J Gruber
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

Re: git add single file and git add list of files behave differentely for ignored files

2014-12-04 Thread Michael J Gruber
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

[PATCH] check-ignore: clarify treatment of tracked files

2014-12-04 Thread Michael J Gruber
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?

Re: Enhancement Request: locale git option

2014-12-04 Thread Ævar Arnfjörð Bjarmason
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

Antw: Re: Enhancement Request: locale git option

2014-12-04 Thread Ulrich Windl
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

Re: [PATCH 12/13] refs.c: use a bit for ref_update have_old

2014-12-04 Thread Torsten Bögershausen
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.

Re: Enhancement Request: locale git option

2014-12-04 Thread Michael J Gruber
Æ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

Re: Enhancement Request: locale git option

2014-12-04 Thread Andreas Schwab
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

Re: [PATCH 12/13] refs.c: use a bit for ref_update have_old

2014-12-04 Thread Andreas Schwab
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

Re: [PATCHv3 00/13] the refs-transactions-reflog series

2014-12-04 Thread Michael Haggerty
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

git log --pretty=format:%H$t%aN$t%s$t%G? --show-signature

2014-12-04 Thread Patrick Schleizer
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

Re: Enhancement Request: locale git option

2014-12-04 Thread Ævar Arnfjörð Bjarmason
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

Re: [PATCHv3 00/13] the refs-transactions-reflog series

2014-12-04 Thread Jonathan Nieder
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

Re: [PATCH 06/14] lockfile: introduce flag for locks outside .git

2014-12-04 Thread Jonathan Nieder
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.

Re: [PATCH] gc: support temporarily preserving garbage

2014-12-04 Thread Junio C Hamano
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

Re: git log --pretty=format:%H$t%aN$t%s$t%G? --show-signature

2014-12-04 Thread Mike Gerwitz
-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

[PATCH] completion: add git-tag options

2014-12-04 Thread Ralf Thielow
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

Re: [PATCHv3 00/13] the refs-transactions-reflog series

2014-12-04 Thread Jonathan Nieder
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

Re: [PATCH 2/2] prompt: respect GIT_TERMINAL_PROMPT to disable terminal prompts

2014-12-04 Thread Junio C Hamano
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

Re: [PATCHv3 00/13] the refs-transactions-reflog series

2014-12-04 Thread Stefan Beller
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

Re: [PATCHv3 00/13] the refs-transactions-reflog series

2014-12-04 Thread Junio C Hamano
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

Re: [PATCHv3 00/13] the refs-transactions-reflog series

2014-12-04 Thread Junio C Hamano
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

Re: [PATCHv3 00/13] the refs-transactions-reflog series

2014-12-04 Thread Stefan Beller
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

Re: Enhancement Request: locale git option

2014-12-04 Thread Ralf Thielow
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

Re: [PATCH] introduce git root

2014-12-04 Thread Junio C Hamano
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:

Re: [RFC/PATCH 2/2] branch: allow -f with -m and -d

2014-12-04 Thread Junio C Hamano
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

Re: [RFC][PATCH] send-email: add --[no-]xmailer option

2014-12-04 Thread Luis Henriques
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:'

Re: [PATCH v2] compat: convert modes to use portable file type values

2014-12-04 Thread David Michael
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

Re: [PATCHv3 00/13] the refs-transactions-reflog series

2014-12-04 Thread Jonathan Nieder
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

Re: [RFC][PATCH] send-email: add --[no-]xmailer option

2014-12-04 Thread Junio C Hamano
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...

[PATCH] test/send-email: --[no-]xmailer tests

2014-12-04 Thread Luis Henriques
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 ---

Re: [PATCH v2] compat: convert modes to use portable file type values

2014-12-04 Thread Junio C Hamano
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* */

Re: [RFC][PATCH] send-email: add --[no-]xmailer option

2014-12-04 Thread Luis Henriques
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

Re: [PATCH] introduce git root

2014-12-04 Thread Matthieu Moy
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

Re: [PATCH/RFC v2] Squashed changes for multiple worktrees vs. submodules

2014-12-04 Thread Jens Lehmann
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

Re: [PATCH] test/send-email: --[no-]xmailer tests

2014-12-04 Thread Junio C Hamano
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

Re: [PATCH] check-ignore: clarify treatment of tracked files

2014-12-04 Thread Junio C Hamano
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

Re: Bug in reflog of length 0x2BFF

2014-12-04 Thread Junio C Hamano
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

Re: [PATCH] introduce git root

2014-12-04 Thread Junio C Hamano
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

Re: [Whonix-devel] git log --pretty=format:%H$t%aN$t%s$t%G? --show-signature

2014-12-04 Thread Patrick Schleizer
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

Re: Bug in reflog of length 0x2BFF

2014-12-04 Thread Christoph Mallon
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

Re: [PATCH 2/2] prompt: respect GIT_TERMINAL_PROMPT to disable terminal prompts

2014-12-04 Thread Jeff King
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 =

Re: git log --pretty=format:%H$t%aN$t%s$t%G? --show-signature

2014-12-04 Thread Junio C Hamano
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

Re: [PATCH] introduce git root

2014-12-04 Thread Jeff King
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

Re: [PATCHv3 00/13] the refs-transactions-reflog series

2014-12-04 Thread Michael Haggerty
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

Re: [PATCH] introduce git root

2014-12-04 Thread Junio C Hamano
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

Re: [PATCH 2/2] prompt: respect GIT_TERMINAL_PROMPT to disable terminal prompts

2014-12-04 Thread Junio C Hamano
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

RE: FW: [cygwin] Cygwin's git says error: failed to read delta-pack base object

2014-12-04 Thread Jason Pyeron
-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

Re: Bug in reflog of length 0x2BFF

2014-12-04 Thread Jeff King
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

Re: Bug in reflog of length 0x2BFF

2014-12-04 Thread Junio C Hamano
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

Re: Bug in reflog of length 0x2BFF

2014-12-04 Thread Junio C Hamano
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

[PATCH 01/23] refs.c: make ref_transaction_create a wrapper for ref_transaction_update

2014-12-04 Thread Michael Haggerty
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

[PATCH 07/23] expire_reflog(): use a lock_file for rewriting the reflog file

2014-12-04 Thread Michael Haggerty
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

[PATCH 12/23] expire_reflog(): move updateref to flags argument

2014-12-04 Thread Michael Haggerty
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

[PATCH 20/23] reflog_expire(): new function in the reference API

2014-12-04 Thread Michael Haggerty
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

[PATCH 22/23] lock_any_ref_for_update(): inline function

2014-12-04 Thread Michael Haggerty
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

[PATCH 10/23] expire_reflog(): add a flags argument

2014-12-04 Thread Michael Haggerty
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

[PATCH 00/23] Add reflog_expire() to the references API

2014-12-04 Thread Michael Haggerty
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

[PATCH 13/23] Rename expire_reflog_cb to expire_reflog_policy_cb

2014-12-04 Thread Michael Haggerty
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

[PATCH 09/23] expire_reflog(): extract two policy-related functions

2014-12-04 Thread Michael Haggerty
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

[PATCH 04/23] expire_reflog(): remove unused parameter

2014-12-04 Thread Michael Haggerty
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

[PATCH 19/23] expire_reflog(): treat the policy callback data as opaque

2014-12-04 Thread Michael Haggerty
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,

[PATCH 17/23] expire_reflog(): move rewrite to flags argument

2014-12-04 Thread Michael Haggerty
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

[PATCH 02/23] refs.c: make ref_transaction_delete a wrapper for ref_transaction_update

2014-12-04 Thread Michael Haggerty
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 ---

[PATCH 08/23] Extract function should_expire_reflog_ent()

2014-12-04 Thread Michael Haggerty
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,

[PATCH 03/23] refs.c: add a function to append a reflog entry to a fd

2014-12-04 Thread Michael Haggerty
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

[PATCH 16/23] expire_reflog(): move verbose to flags argument

2014-12-04 Thread Michael Haggerty
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

[PATCH 14/23] struct expire_reflog_cb: a new callback data type

2014-12-04 Thread Michael Haggerty
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.

[PATCH 23/23] refs.c: don't expose the internal struct ref_lock in the header file

2014-12-04 Thread Michael Haggerty
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

[PATCH 15/23] expire_reflog(): pass flags through to expire_reflog_ent()

2014-12-04 Thread Michael Haggerty
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

[PATCH 06/23] expire_reflog(): exit early if the reference has no reflog

2014-12-04 Thread Michael Haggerty
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

[PATCH 18/23] Move newlog and last_kept_sha1 to struct expire_reflog_cb

2014-12-04 Thread 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 ---

[PATCH 05/23] expire_reflog(): rename ref parameter to refname

2014-12-04 Thread Michael Haggerty
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   2   >