Re: git add and git add 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 > ` behaves differently then `git add `. > > I my git/info/excludes file i have > > /COM

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

2014-12-04 Thread Michael J Gruber
Signed-off-by: Michael J Gruber --- 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 'git branch -m o/o o should

[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 f

[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/

Re: git add and git add 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 wrote: > On Thu, 4 Dec 2014 10:06:23 +0100 > Guilherme wrote: > >> I reported this issue on the git-user mailing list and they >> redirected me here. >> >> The problem I have observ

Re: git add and git add behave differentely for ignored files

2014-12-04 Thread Konstantin Khomoutov
On Thu, 4 Dec 2014 10:06:23 +0100 Guilherme 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 > ` behaves differently then `git add `. [...] To those who's interested the original threa

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

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 lang

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'

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 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] 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 ca

git add and git add 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 ` behaves differently then `git add `. I my git/info/excludes file i have /COM/config !COM/config/Project.gny The file COM/config/Project.gny

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

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 readabi

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 (

[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 canno

[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 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 transactions too, which m

[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 Reviewed-by: Jonathan Nieder --- Notes: remotes/origin/sb/ref-transaction-reflog no changes since last review refs.c | 14 +++--- 1 file changed, 7 insertions(+), 7 de

[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 --- 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 insertions(+), 9 d

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

2014-12-04 Thread Stefan Beller
From: Ronnie Sahlberg Signed-off-by: Ronnie Sahlberg Signed-off-by: Stefan Beller Reviewed-by: Michael Haggerty Reviewed-by: Jonathan Nieder --- Notes: origin/sb/ref-transaction-unify-to-update as well as origin/sb/ref-transaction-reflog no changes since sending last tim

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

2014-12-04 Thread Stefan Beller
From: Ronnie Sahlberg Use a transaction for all updates during expire_reflog. Signed-off-by: Ronnie Sahlberg Signed-off-by: Stefan Beller --- Notes: Jonathan writes: > This doesn't match the signature of each_reflog_ent_fn. Would putting > err in the cb_data struct work?

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

2014-12-04 Thread Stefan Beller
From: Ronnie Sahlberg 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 reflog. * Uncondition

[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 unlock|close|commit_ref can be made static since there are no more external callers. Signed-off-by: Ronnie Sahlberg Signed-off-by: Stefan Beller --- refs.c | 24 refs.h | 9 - 2 files changed, 12 insertions(+), 21 deletions(-) diff --gi

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

2014-12-04 Thread Stefan Beller
Signed-off-by: Stefan Beller --- 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 @@ struct ref_upda

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

2014-12-04 Thread Stefan Beller
From: Ronnie Sahlberg No one is using this function so we can delete it. Signed-off-by: Ronnie Sahlberg Signed-off-by: Stefan Beller --- refs.c | 7 --- refs.h | 9 + 2 files changed, 1 insertion(+), 15 deletions(-) diff --git a/refs.c b/refs.c index 1468c00..796b7cc 100644 --- a

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

2014-12-04 Thread Stefan Beller
From: Ronnie Sahlberg 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 allow broken refs. Sin

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

2014-12-04 Thread Stefan Beller
From: Ronnie Sahlberg 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 Signed-off-by: Stefan Beller Reviewed-by: Jonathan Nieder --- Notes: remotes/orig

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

2014-12-04 Thread Stefan Beller
From: Ronnie Sahlberg 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 Signed-off-by: Stefan Beller Reviewed-by: Michael Haggerty

[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 makes

<    1   2