Re: [PATCH v3 2/5] commit test: Change $PWD to $(pwd)

2014-05-27 Thread Eric Sunshine
On Tue, May 27, 2014 at 1:46 AM, Johannes Sixt j.s...@viscovery.net wrote: Am 5/26/2014 20:56, schrieb Caleb Thompson: Signed-off-by: Caleb Thompson ca...@calebthompson.io --- t/t7507-commit-verbose.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git

Re: [PATCH v3 2/5] commit test: Change $PWD to $(pwd)

2014-05-27 Thread Jeremiah Mahler
On Tue, May 27, 2014 at 07:46:59AM +0200, Johannes Sixt wrote: Am 5/26/2014 20:56, schrieb Caleb Thompson: Signed-off-by: Caleb Thompson ca...@calebthompson.io --- t/t7507-commit-verbose.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/t/t7507-commit-verbose.sh

Re: [PATCH v3 2/5] commit test: Change $PWD to $(pwd)

2014-05-27 Thread Johannes Sixt
Please do not cull the Cc list. Am 5/27/2014 8:14, schrieb Jeremiah Mahler: On Tue, May 27, 2014 at 07:46:59AM +0200, Johannes Sixt wrote: Am 5/26/2014 20:56, schrieb Caleb Thompson: Signed-off-by: Caleb Thompson ca...@calebthompson.io --- t/t7507-commit-verbose.sh | 2 +- 1 file changed,

Re: [PATCH v3 2/5] commit test: Change $PWD to $(pwd)

2014-05-27 Thread David Kastrup
Johannes Sixt j.s...@viscovery.net writes: That said, it is not wrong to use $(pwd) with test_set_editor, it's just unnecessarily slow. Any shell that knows $(...) is pretty sure to have pwd as a built-in. I don't think Git will run on those kind of ancient shells reverting to /bin/pwd here.

[PATCH 00/10] Zsh prompt tests

2014-05-27 Thread Richard Hansen
This series adds test cases for running __git_ps1 (see contrib/completion/git-prompt.sh) from Zsh. This series also adds more Bash test cases to test how __git_ps1 reacts to disabling Bash's PS1 parameter expansion. (This is related to adding Zsh test cases: Zsh doesn't perform parameter

[PATCH 01/10] t9903: remove Zsh test from the suite of Bash prompt tests

2014-05-27 Thread Richard Hansen
This test is about to become redundant: All of the Bash prompt tests will be moved into a separate library file that will also be used by a new Zsh-specific test script. Signed-off-by: Richard Hansen rhan...@bbn.com --- t/t9903-bash-prompt.sh | 11 --- 1 file changed, 11 deletions(-)

[PATCH 04/10] t9903: run pc mode tests again with PS1 expansion disabled

2014-05-27 Thread Richard Hansen
Bash has a shell option that makes it possible to disable parameter expansion in PS1. Test __git_ps1's ability to detect and react to disabled PS1 expansion by running the pc mode tests twice: once with PS1 parameter expansion enabled and once with it disabled. Signed-off-by: Richard Hansen

[PATCH 06/10] t9903: move PS1 color code variable definitions to lib-bash.sh

2014-05-27 Thread Richard Hansen
Define a new 'set_ps1_format_vars' function in lib-bash.sh that sets the c_red, c_green, c_lblue, and c_clear variables. Call this function from run_pcmode_tests(). This is a step toward moving the shell prompt tests to a separate library file so that they can be reused to test prompting in Zsh.

[PATCH 10/10] t9904: new __git_ps1 tests for Zsh

2014-05-27 Thread Richard Hansen
These are the same tests as in t9903, but run in zsh instead of bash. Signed-off-by: Richard Hansen rhan...@bbn.com --- t/lib-zsh.sh | 30 ++ t/t9904-zsh-prompt.sh | 10 ++ 2 files changed, 40 insertions(+) create mode 100644 t/lib-zsh.sh create

[PATCH 09/10] lib-prompt-tests.sh: add variable for string that encodes percent in PS1

2014-05-27 Thread Richard Hansen
To add a literal percent character to a Zsh prompt, the string %% is used in PS1. Bash and POSIX shells simply use %. To accommodate this difference, use ${percent} where a percent character is expected and define the percent variable in the set_ps1_format_vars function. Signed-off-by: Richard

[PATCH 07/10] t9903: move prompt tests to a new lib-prompt-tests.sh file

2014-05-27 Thread Richard Hansen
This is a step toward creating a new test script that runs the same prompt tests as t9903 but with Zsh instead of Bash. Signed-off-by: Richard Hansen rhan...@bbn.com --- t/lib-prompt-tests.sh | 632 + t/t9903-bash-prompt.sh | 605

[PATCH 08/10] lib-prompt-tests.sh: put all tests inside a function

2014-05-27 Thread Richard Hansen
Modify lib-prompt-tests.sh so that it does nothing when sourced except define a function for running the prompt tests (plus some private helper functions). Signed-off-by: Richard Hansen rhan...@bbn.com --- t/lib-prompt-tests.sh | 802 -

[PATCH 05/10] t9903: include Bash in test names via new $shellname var

2014-05-27 Thread Richard Hansen
Define a new 'shellname' variable in lib-bash.sh and use it in the prompt test names. This is a step toward moving the shell prompt tests to a separate library file so that they can be reused to test prompting in Zsh. Signed-off-by: Richard Hansen rhan...@bbn.com --- t/lib-bash.sh | 2

[PATCH 02/10] t9903: put the Bash pc mode prompt test cases in a function

2014-05-27 Thread Richard Hansen
This is a step toward invoking the same pc mode test cases twice: once with PS1 parameter expansion enabled and once with it disabled. Signed-off-by: Richard Hansen rhan...@bbn.com --- t/t9903-bash-prompt.sh | 236 + 1 file changed, 120

[PATCH 03/10] t9903: move test name prefix to a separate variable

2014-05-27 Thread Richard Hansen
This is a step toward reusing the same test cases after disabling PS1 parameter expansion. Signed-off-by: Richard Hansen rhan...@bbn.com --- t/t9903-bash-prompt.sh | 20 +++- 1 file changed, 11 insertions(+), 9 deletions(-) diff --git a/t/t9903-bash-prompt.sh

Re: [PATCH v10 11/12] Documentation: add documentation for 'git interpret-trailers'

2014-05-27 Thread Michael Haggerty
tl;dr: This patch series wants to introduce a permanent new Git data format. The current version can write trailers in formats that it is incapable of reading, which I consider broken. I advocate a stricter specification of the format of trailers, at least until we get feedback from users that

[PATCH] config: respect '~' and '~user' in mailmap.file

2014-05-27 Thread Øystein Walle
git_config_string() does not handle '~' and '~user' as part of the value. Using git_config_pathname() fixes this. Signed-off-by: Øystein Walle oys...@gmail.com --- config.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/config.c b/config.c index 314d8ee..ec7af5f 100644 ---

Kedves felhasználók e-mailben;

2014-05-27 Thread (webmail update 2014)
-- Kedves felhasználók e-mailben; Túllépte 23432 box set Web Service / Admin, és akkor nem lesz probléma a küldő és fogadhat e-maileket, amíg újra ellenőrizni. Kérjük, frissítse kattintva linkre, és töltse ki az adatokat, hogy ellenőrizze a számla Kérjük, kövesse az alábbi linkre, és majd

Re: [PATCH v10 11/12] Documentation: add documentation for 'git interpret-trailers'

2014-05-27 Thread Johan Herland
On Tue, May 27, 2014 at 10:21 AM, Michael Haggerty mhag...@alum.mit.edu wrote: tl;dr: This patch series wants to introduce a permanent new Git data format. The current version can write trailers in formats that it is incapable of reading, which I consider broken. I advocate a stricter

Re: [PATCH 01/15] builtin/add.c: rearrange xcalloc arguments

2014-05-27 Thread Brian Gesiak
Oomph, how embarrassing. Thanks for pointing that out! Would it be better if I rerolled the patches? - Brian Gesiak On Tue, May 27, 2014 at 12:25 PM, Eric Sunshine sunsh...@sunshineco.com wrote: On Mon, May 26, 2014 at 11:33 AM, Brian Gesiak modoca...@gmail.com wrote: xcalloc takes two

Best practices/conventions for tags and references in commit message

2014-05-27 Thread Thomas Koch
Hi, different projects or tools have conventions to include machine parsable information in commit messages, e.g.: Closes: #42 Thanks: my mother, my wife Git-Dch: Ignore Commit-Id: 50M3R34LLYR4ND0MB1TSANDNUMB3R5 (see thread: RFE: support change-id generation natively for Commit-Id) (Git-Dch:

Re: [RFC 2/3] rebase -i: Reschedule tasks that failed before the index was touched

2014-05-27 Thread Michael Haggerty
Hi, Overall, this approach seems reasonable. Please see the inline comments below. On 05/27/2014 12:19 AM, Fabian Ruch wrote: When `rebase--interactive` processes a task, it removes the item from the todo list and appends it to another list of executed tasks. If a `pick` (this includes

gitk's truncated tags

2014-05-27 Thread Ondrej Oprala
Hi, is there any way to display full tag names in gitk, for tag names longer than 16 characters? The way 1.8.x did things? Thanks, Ondrej -- To unsubscribe from this list: send the line unsubscribe git in the body of a message to majord...@vger.kernel.org More majordomo info at

Re: [RFC 3/3] tests: Add 'rebase -i commits that overwrite untracked files'

2014-05-27 Thread Michael Haggerty
On 05/27/2014 12:19 AM, Fabian Ruch wrote: If a todo list will cherry-pick a commit that adds some file and the working tree already contains a file with the same name, the rebase sequence for that todo list will be interrupted and the cherry-picked commit will be lost after the rebasing

Re: Best practices/conventions for tags and references in commit message

2014-05-27 Thread Johan Herland
Search the mailing list archives for git-interpret-trailers. It's coming. :) ...Johan On Tue, May 27, 2014 at 1:26 PM, Thomas Koch tho...@koch.ro wrote: Hi, different projects or tools have conventions to include machine parsable information in commit messages, e.g.: Closes: #42 Thanks:

Re: [RFC/PATCH 1/2] config: Add cache for config value querying

2014-05-27 Thread Tanay Abhra
Hi, On 05/26/2014 01:02 PM, Torsten Bögershausen wrote: Add an internal cache with the all variable value pairs read from the usual cache: The word cache is in Git often used for index Okay, point noted. I thought about choosing between hashmap and cache and chose the later. variable value

Help with subtree pull / push

2014-05-27 Thread nicofari64
Hi I am new to git, trying to see if I can use it at my work place to replace Starteam. There is only one Starteam feature that I miss, comparing it to git: shared files. Most projects, here, use lot of shared files, and Starteam handle these pretty easily. You just check in (commit + push in git

[PATCH/RFC] clean: add a flag to back up cleaned files

2014-05-27 Thread Erik Faye-Lund
The combination of git clean and fat fingers can some times cause data-loss, which can be frustrating. So let's add a flag that imports the files to be deleted into the object-database, in a way similar to what git-stash does. Maintain a reflog of the previously backed up clean-runs.

Re: [PATCH/RFC] Gitweb: Convert UTF-8 encoded file names

2014-05-27 Thread Jakub Narębski
W dniu 2014-05-16 19:05, Junio C Hamano pisze: Jakub Narębski jna...@gmail.com writes: Correct, but is where does it appear the question we are primarily interested in, wrt this breakage and its fix? That of course depends on how we want to test gitweb output. The simplest solution,

[PATCH] gitweb: Harden UTF-8 handling in generated links

2014-05-27 Thread Jakub Narębski
W dniu 2014-05-15 21:28, Jakub Narębski pisze: On Thu, May 15, 2014 at 8:48 PM, Michael Wagner accou...@mwagner.org wrote: On Thu, May 15, 2014 at 10:04:24AM +0100, Peter Krefting wrote: Michael Wagner: diff --git a/gitweb/gitweb.perl b/gitweb/gitweb.perl index a9f57d6..f1414e1 100755 ---

Re: [PATCH] config: respect '~' and '~user' in mailmap.file

2014-05-27 Thread Jeff King
On Tue, May 27, 2014 at 10:45:58AM +0200, Øystein Walle wrote: git_config_string() does not handle '~' and '~user' as part of the value. Using git_config_pathname() fixes this. Makes sense. Curious if there was a reason we did not use it in the first place, I looked at the history. The reason

Re: [PATCH/RFC] clean: add a flag to back up cleaned files

2014-05-27 Thread Jeff King
On Tue, May 27, 2014 at 04:17:34PM +0200, Erik Faye-Lund wrote: The combination of git clean and fat fingers can some times cause data-loss, which can be frustrating. So let's add a flag that imports the files to be deleted into the object-database, in a way similar to what git-stash does.

Re: [PATCH] sideband.c: Get rid of ANSI sequence for non-terminal shell

2014-05-27 Thread Jeff King
On Tue, May 27, 2014 at 01:27:12PM +1000, Michael Naumov wrote: From ae8d04fdbd71cf322e67903826544d5431f2866d Mon Sep 17 00:00:00 2001 From: Michael Naumov mnaou...@gmail.com Date: Tue, 27 May 2014 12:45:06 +1000 Subject: [PATCH] sideband.c: Get rid of ANSI sequence for non-terminal shell

Git chokes on large file

2014-05-27 Thread Dale R. Worley
I've discovered a problem using Git. It's not clear to me what the correct behavior should be, but it seems to me that Git is failing in an undesirable way. The problem arises when trying to handle a very large file. For example: $ git --version git version 1.8.3.1 $ mkdir $$ $

Re: [PATCH 1/2] remote: defer repacking packed-refs when deleting refs

2014-05-27 Thread Junio C Hamano
Jens Lindström j...@opera.com writes: Puzzled There is one reason why one would want to call delete_ref() even if the ref itself was already fully deleted by repack_without_refs() (because it was only packed) and that is that delete_ref() also removes the ref log, if there is one. Ahh,

Re: [PATCH v3] Add an explicit GIT_DIR to the list of excludes

2014-05-27 Thread Pasha Bolokhov
Add GIT_DIR to the list of excludes in setup_standard_excludes(), while checking that GIT_DIR is not just '.git', in which case it would be ignored by default, and that GIT_DIR is inside GIT_WORK_TREE gives git-grep.txt and git-ls-files.txt. I don't know if we need to add something about

Re: [PATCH v3] Add an explicit GIT_DIR to the list of excludes

2014-05-27 Thread Junio C Hamano
Duy Nguyen pclo...@gmail.com writes: On Sat, May 24, 2014 at 12:33 AM, Pasha Bolokhov pasha.bolok...@gmail.com wrote: When an explicit '--git-dir' option points to a directory inside the work tree, git treats it as if it were any other directory. In particular, 'git status' lists it as

Re: [PATCH] gc --auto: do not lock refs in the background

2014-05-27 Thread Junio C Hamano
Nguyễn Thái Ngọc Duy pclo...@gmail.com writes: 9f673f9 (gc: config option for running --auto in background - 2014-02-08) puts gc --auto in background to reduce user's wait time. Part of the garbage collecting is pack-refs and pruning reflogs. These require locking some refs and may abort

Re: commit: support commit.verbose and --no-verbose

2014-05-27 Thread Junio C Hamano
Jeremiah Mahler jmmah...@gmail.com writes: On Fri, May 23, 2014 at 04:22:22PM -0500, Caleb Thompson wrote: This patch allows people to set `commit.verbose` to implicitly send `--verbose` ... +cat check-for-no-diff EOF +#!$SHELL_PATH +exec grep -v '^diff --git' \$1 +EOF +chmod +x

Re: [PATCH/RFC] clean: add a flag to back up cleaned files

2014-05-27 Thread Erik Faye-Lund
On Tue, May 27, 2014 at 6:37 PM, Jeff King p...@peff.net wrote: On Tue, May 27, 2014 at 04:17:34PM +0200, Erik Faye-Lund wrote: The combination of git clean and fat fingers can some times cause data-loss, which can be frustrating. So let's add a flag that imports the files to be deleted into

Re: [PATCH v8 41/44] refs.c: add a new flag for transaction delete for refs we know are packed only

2014-05-27 Thread Junio C Hamano
Michael Haggerty mhag...@alum.mit.edu writes: This suggests to me that our current structure is best modeled as two independent reference back ends, with a third implementation of the same reference API whose job it is to compose the first two. In pseudocode, ... That is an interesting

Re: [RFC 2/3] rebase -i: Reschedule tasks that failed before the index was touched

2014-05-27 Thread Phil Hord
Hi Fabian, Thanks for looking into this. On 05/27/2014 07:56 AM, Michael Haggerty wrote: +reschedule_last_action () { +tail -n 1 $done | cat - $todo $todo.new +sed -e \$d $done $done.new +mv -f $todo.new $todo +mv -f $done.new $done +} + append_todo_help () { git

Re: [PATCH v8 42/44] refs.c: pass a skip list to name_conflict_fn

2014-05-27 Thread Ronnie Sahlberg
On Thu, May 22, 2014 at 12:27 PM, Jonathan Nieder jrnie...@gmail.com wrote: Ronnie Sahlberg wrote: --- a/refs.c +++ b/refs.c @@ -798,11 +798,19 @@ struct name_conflict_cb { const char *refname; const char *oldrefname; const char *conflicting_refname; + const char

Re: [RFC 1/3] sequencer: Signal failed ff as an aborted, not a conflicted merge

2014-05-27 Thread Junio C Hamano
Fabian Ruch baf...@gmail.com writes: `do_pick_commit` handles three situations if it is not fast-forwarding. In order for `do_pick_commit` to identify the situation, it examines the return value of the selected merge command. 1. return value 0 stands for a clean merge 2. 1 is passed in case

Re: [RFC 3/3] tests: Add 'rebase -i commits that overwrite untracked files'

2014-05-27 Thread Junio C Hamano
Fabian Ruch baf...@gmail.com writes: If a todo list will cherry-pick a commit that adds some file and the working tree already contains a file with the same name, the rebase sequence for that todo list will be interrupted and the cherry-picked commit will be lost after the rebasing process is

Re: [PATCH/RFC] clean: add a flag to back up cleaned files

2014-05-27 Thread Jeff King
On Tue, May 27, 2014 at 08:12:52PM +0200, Erik Faye-Lund wrote: I've definitely considered doing something like this before (and for git reset --hard). My biggest concern would be poor performance in some cases. But since it's optional, and one can presumably override it with --no-backup

Re: [PATCH v1 0/3] Add --graft option to git replace

2014-05-27 Thread Christian Couder
From: Junio C Hamano gits...@pobox.com Subject: Re: [PATCH v1 0/3] Add --graft option to git replace Date: Fri, 23 May 2014 09:59:05 -0700 Christian Couder chrisc...@tuxfamily.org writes: Here is a small patch series to implement: git replace [-f] --graft commit [parent...] The

Re: [PATCH v8 00/44] Use ref transactions for all ref updates

2014-05-27 Thread Ronnie Sahlberg
On Thu, May 22, 2014 at 4:08 PM, Jonathan Nieder jrnie...@gmail.com wrote: Ronnie Sahlberg wrote: This patch series can also be found at https://github.com/rsahlberg/git/tree/ref-transactions Continuing with the review of 65a1cb7b (2014-05-22 12:08): 11/40 change ref_transaction_update()

Re: [PATCH v10 22/44] fetch.c: clear errno before calling functions that might set it

2014-05-27 Thread Ronnie Sahlberg
On Sat, May 17, 2014 at 7:56 AM, Michael Haggerty mhag...@alum.mit.edu wrote: On 05/16/2014 07:37 PM, Ronnie Sahlberg wrote: In s_update_ref there are two calls that when they fail we return an error based on the errno value. In particular we want to return a specific error if ENOTDIR

Re: [PATCH v10 11/12] Documentation: add documentation for 'git interpret-trailers'

2014-05-27 Thread Junio C Hamano
Christian Couder chrisc...@tuxfamily.org writes: From: Michael Haggerty mhag...@alum.mit.edu ... An option like --input-separator might be enough to support this. For me this means: * Enumerating a list of allowed separators (e.g., [:=#]) Junio suggested in a message that users might

Re: [PATCH v10 04/44] refs.c: add an err argument to repack_without_refs

2014-05-27 Thread Ronnie Sahlberg
On Sat, May 17, 2014 at 5:40 AM, Michael Haggerty mhag...@alum.mit.edu wrote: On 05/16/2014 07:36 PM, Ronnie Sahlberg wrote: Update repack_without_refs to take an err argument and update it if there is a failure. Pass the err variable from ref_transaction_commit to this function so that

Re: [PATCH v10 25/44] receive-pack.c: use a reference transaction for updating the refs

2014-05-27 Thread Ronnie Sahlberg
On Fri, May 23, 2014 at 2:02 PM, Michael Haggerty mhag...@alum.mit.edu wrote: On 05/23/2014 06:14 PM, Ronnie Sahlberg wrote: On Fri, May 23, 2014 at 6:49 AM, Michael Haggerty mhag...@alum.mit.edu wrote: [...] When I combine these two lines of thought, it suggests to me that we could do a

Re: [PATCH] t9138-git-svn-authors-prog.sh fixups

2014-05-27 Thread Junio C Hamano
Jeremiah Mahler jmmah...@gmail.com writes: Several fixups of the t9138-git-svn-authors-prog.sh test script to follow current recommendations in t/README. - Fixed a Perl script with a full #!/usr/bin/perl shebang to use write_script() and $PERL_PATH as per t/README. - Placed

Re: [PATCH v2] wording fixes in the user manual and glossary

2014-05-27 Thread Junio C Hamano
Jeremiah Mahler jmmah...@gmail.com writes: Various minor wording fixes throughout the user manual and glossary. The section on Updating a repository with git fetch was substantially re-worded to try and better explain `git fetch`. Signed-off-by: Jeremiah Mahler jmmah...@gmail.com ---

Re: [PATCH] t9138-git-svn-authors-prog.sh fixups

2014-05-27 Thread Jeremiah Mahler
Junio, On Tue, May 27, 2014 at 12:43:06PM -0700, Junio C Hamano wrote: Jeremiah Mahler jmmah...@gmail.com writes: ... diff --git a/t/t9138-git-svn-authors-prog.sh b/t/t9138-git-svn-authors-prog.sh index 83cc5fc..d54c37a 100755 --- a/t/t9138-git-svn-authors-prog.sh +++

[PATCH v11 00/41] Use ref transactions

2014-05-27 Thread Ronnie Sahlberg
This patch series can also be found at https://github.com/rsahlberg/git/tree/ref-transactions This patch series is based on next and expands on the transaction API. It converts all ref updates, inside refs.c as well as external, to use the transaction API for updates. This makes most of the ref

[PATCH v11 34/41] refs.c: pass NULL as *flags to read_ref_full

2014-05-27 Thread Ronnie Sahlberg
We call read_ref_full with a pointer to flags from rename_ref but since we never actually use the returned flags we can just pass NULL here instead. Reviewed-by: Jonathan Nieder jrnie...@gmail.com Signed-off-by: Ronnie Sahlberg sahlb...@google.com --- refs.c | 2 +- 1 file changed, 1

[PATCH v11 02/41] refs.c: ref_transaction_commit should not free the transaction

2014-05-27 Thread Ronnie Sahlberg
Signed-off-by: Ronnie Sahlberg sahlb...@google.com --- builtin/update-ref.c | 1 + refs.c | 1 - refs.h | 5 ++--- 3 files changed, 3 insertions(+), 4 deletions(-) diff --git a/builtin/update-ref.c b/builtin/update-ref.c index 405267f..1fd7a89 100644 ---

[PATCH v11 29/41] refs.c: remove the update_ref_write function

2014-05-27 Thread Ronnie Sahlberg
Since we only call update_ref_write from a single place and we only call it with onerr==QUIET_ON_ERR we can just as well get rid of it and just call write_ref_sha1 directly. This changes the return status for _commit from 1 to -1 on failures when writing to the ref. Eventually we will want _commit

[PATCH v11 04/41] refs.c: allow passing NULL to ref_transaction_free

2014-05-27 Thread Ronnie Sahlberg
Allow ref_transaction_free(NULL) as a no-op. This makes ref_transaction_free easier to use and more similar to plain 'free'. In particular, it lets us rollback unconditionally as part of cleanup code after setting 'transaction = NULL' if a transaction has been committed or rolled back already.

[PATCH v11 08/41] refs.c: add an err argument to delete_ref_loose

2014-05-27 Thread Ronnie Sahlberg
Add an err argument to delete_loose_ref so that we can pass a descriptive error string back to the caller. Pass the err argument from transaction commit to this function so that transaction users will have a nice error string if the transaction failed due to delete_loose_ref. Add a new function

[PATCH v11 37/41] refs.c: call lock_ref_sha1_basic directly from commit

2014-05-27 Thread Ronnie Sahlberg
Skip using the lock_any_ref_for_update wrapper and call lock_ref_sha1_basic directly from the commit function. Reviewed-by: Jonathan Nieder jrnie...@gmail.com Signed-off-by: Ronnie Sahlberg sahlb...@google.com --- refs.c | 12 ++-- 1 file changed, 6 insertions(+), 6 deletions(-) diff

[PATCH v11 23/41] refs.c: change update_ref to use a transaction

2014-05-27 Thread Ronnie Sahlberg
Change the update_ref helper function to use a ref transaction internally. Signed-off-by: Ronnie Sahlberg sahlb...@google.com --- refs.c | 25 + 1 file changed, 21 insertions(+), 4 deletions(-) diff --git a/refs.c b/refs.c index 9992da4..fd8f3cf 100644 --- a/refs.c +++

[PATCH v11 20/41] sequencer.c: use ref transactions for all ref updates

2014-05-27 Thread Ronnie Sahlberg
Change to use ref transactions for all updates to refs. Signed-off-by: Ronnie Sahlberg sahlb...@google.com --- sequencer.c | 24 1 file changed, 16 insertions(+), 8 deletions(-) diff --git a/sequencer.c b/sequencer.c index 0a80c58..fd8acaf 100644 --- a/sequencer.c +++

[PATCH v11 16/41] refs.c: add transaction.status and track OPEN/CLOSED/ERROR

2014-05-27 Thread Ronnie Sahlberg
Track the status of a transaction in a new status field. Check the field for sanity, i.e. that status must be OPEN when _commit/_create/_delete or _update is called or else die(BUG:...) Signed-off-by: Ronnie Sahlberg sahlb...@google.com --- refs.c | 42 +-

[PATCH v11 25/41] fast-import.c: use a ref transaction when dumping tags

2014-05-27 Thread Ronnie Sahlberg
Signed-off-by: Ronnie Sahlberg sahlb...@google.com --- fast-import.c | 17 - 1 file changed, 12 insertions(+), 5 deletions(-) diff --git a/fast-import.c b/fast-import.c index 4a7b196..3db5b3d 100644 --- a/fast-import.c +++ b/fast-import.c @@ -1735,15 +1735,22 @@ static void

[PATCH v11 40/41] fetch.c: change s_update_ref to use a ref transaction

2014-05-27 Thread Ronnie Sahlberg
Change s_update_ref to use a ref transaction for the ref update. Signed-off-by: Ronnie Sahlberg sahlb...@google.com --- builtin/fetch.c | 22 ++ 1 file changed, 14 insertions(+), 8 deletions(-) diff --git a/builtin/fetch.c b/builtin/fetch.c index faa1233..c46ccd9 100644 ---

[PATCH v11 14/41] refs.c: update ref_transaction_delete to check for error and return status

2014-05-27 Thread Ronnie Sahlberg
Change ref_transaction_delete() to do basic error checking and return non-zero of error. Update all callers to check the return for ref_transaction_delete(). There are currently no conditions in _delete that will return error but there will be in the future. Add an err argument that will be

[PATCH v11 09/41] refs.c: make update_ref_write update a strbuf on failure

2014-05-27 Thread Ronnie Sahlberg
Change update_ref_write to also update an error strbuf on failure. This makes the error available to ref_transaction_commit callers if the transaction failed due to update_ref_sha1/write_ref_sha1 failures. Reviewed-by: Jonathan Nieder jrnie...@gmail.com Signed-off-by: Ronnie Sahlberg

[PATCH v11 01/41] refs.c: remove ref_transaction_rollback

2014-05-27 Thread Ronnie Sahlberg
We do not yet need both a rollback and a free function for transactions. Remove ref_transaction_rollback and use ref_transaction_free instead. At a later stage we may reintroduce a rollback function if we want to start adding reusable transactions and similar. Reviewed-by: Jonathan Nieder

[PATCH v11 11/41] refs.c: remove the onerr argument to ref_transaction_commit

2014-05-27 Thread Ronnie Sahlberg
Since all callers now use QUIET_ON_ERR we no longer need to provide an onerr argument any more. Remove the onerr argument from the ref_transaction_commit signature. Reviewed-by: Jonathan Nieder jrnie...@gmail.com Signed-off-by: Ronnie Sahlberg sahlb...@google.com --- builtin/update-ref.c | 3

[PATCH v11 24/41] receive-pack.c: use a reference transaction for updating the refs

2014-05-27 Thread Ronnie Sahlberg
Wrap all the ref updates inside a transaction. Signed-off-by: Ronnie Sahlberg sahlb...@google.com --- builtin/receive-pack.c | 43 ++- 1 file changed, 34 insertions(+), 9 deletions(-) diff --git a/builtin/receive-pack.c b/builtin/receive-pack.c index

[PATCH v11 28/41] refs.c: remove the update_ref_lock function

2014-05-27 Thread Ronnie Sahlberg
Since we now only call update_ref_lock with onerr==QUIET_ON_ERR we no longer need this function and can replace it with just calling lock_any_ref_for_update directly. Reviewed-by: Jonathan Nieder jrnie...@gmail.com Signed-off-by: Ronnie Sahlberg sahlb...@google.com --- refs.c | 30

[PATCH v11 27/41] refs.c: make lock_ref_sha1 static

2014-05-27 Thread Ronnie Sahlberg
No external callers reference lock_ref_sha1 any more so lets declare it static. Reviewed-by: Jonathan Nieder jrnie...@gmail.com Signed-off-by: Ronnie Sahlberg sahlb...@google.com --- refs.c | 2 +- refs.h | 3 --- 2 files changed, 1 insertion(+), 4 deletions(-) diff --git a/refs.c b/refs.c

[PATCH v11 36/41] refs.c: move the check for valid refname to lock_ref_sha1_basic

2014-05-27 Thread Ronnie Sahlberg
Move the check for check_refname_format from lock_any_ref_for_update to lock_ref_sha1_basic. At some later stage we will get rid of lock_any_ref_for_update completely. This leaves lock_any_ref_for_updates as a no-op wrapper which could be removed. But this wrapper is also called from an external

[PATCH v11 39/41] refs.c: propagate any errno==ENOTDIR from _commit back to the callers

2014-05-27 Thread Ronnie Sahlberg
In _commit, ENOTDIR can happen in the call to lock_ref_sha1_basic, either when we lstat the new refname and it returns ENOTDIR or if the name checking function reports that the same type of conflict happened. In both cases it means that we can not create the new ref due to a name conflict. For

[PATCH v11 17/41] tag.c: use ref transactions when doing updates

2014-05-27 Thread Ronnie Sahlberg
Change tag.c to use ref transactions for all ref updates. Reviewed-by: Jonathan Nieder jrnie...@gmail.com Signed-off-by: Ronnie Sahlberg sahlb...@google.com --- builtin/tag.c | 15 +-- 1 file changed, 9 insertions(+), 6 deletions(-) diff --git a/builtin/tag.c b/builtin/tag.c index

[PATCH v11 18/41] replace.c: use the ref transaction functions for updates

2014-05-27 Thread Ronnie Sahlberg
Update replace.c to use ref transactions for updates. Reviewed-by: Jonathan Nieder jrnie...@gmail.com Signed-off-by: Ronnie Sahlberg sahlb...@google.com --- builtin/replace.c | 15 +-- 1 file changed, 9 insertions(+), 6 deletions(-) diff --git a/builtin/replace.c b/builtin/replace.c

[PATCH v11 32/41] refs.c: make delete_ref use a transaction

2014-05-27 Thread Ronnie Sahlberg
Change delete_ref to use a ref transaction for the deletion. At the same time since we no longer have any callers of repack_without_ref we can now delete this function. Signed-off-by: Ronnie Sahlberg sahlb...@google.com --- refs.c | 34 +- 1 file changed, 13

[PATCH v11 12/41] refs.c: change ref_transaction_update() to do error checking and return status

2014-05-27 Thread Ronnie Sahlberg
Update ref_transaction_update() do some basic error checking and return non-zero on error. Update all callers to check ref_transaction_update() for error. There are currently no conditions in _update that will return error but there will be in the future. Add an err argument that will be updated

[PATCH v11 38/41] refs.c: pass a skip list to name_conflict_fn

2014-05-27 Thread Ronnie Sahlberg
Allow passing a list of refs to skip checking to name_conflict_fn. There are some conditions where we want to allow a temporary conflict and skip checking those refs. For example if we have a transaction that 1, guarantees that m is a packed refs and there is no loose ref for m 2, the transaction

[PATCH v11 35/41] refs.c: pack all refs before we start to rename a ref

2014-05-27 Thread Ronnie Sahlberg
This means that most loose refs will no longer be present after the rename which triggered a test failure since it assumes the file for an unrelated ref would still be present after the rename. We want to do this to make it easier to handle atomic renames in rename_ref for the case 'git branch -m

[PATCH v11 19/41] commit.c: use ref transactions for updates

2014-05-27 Thread Ronnie Sahlberg
Change commit.c to use ref transactions for all ref updates. Make sure we pass a NULL pointer to ref_transaction_update if have_old is false. Reviewed-by: Jonathan Nieder jrnie...@gmail.com Signed-off-by: Ronnie Sahlberg sahlb...@google.com --- builtin/commit.c | 24 +++- 1

[PATCH v11 30/41] refs.c: remove lock_ref_sha1

2014-05-27 Thread Ronnie Sahlberg
lock_ref_sha1 was only called from one place in refc.c and only provided a check that the refname was sane before adding back the initial refs/ part of the ref path name, the initial refs/ that this caller had already stripped off before calling lock_ref_sha1. Reviewed-by: Jonathan Nieder

[PATCH v11 26/41] walker.c: use ref transaction for ref updates

2014-05-27 Thread Ronnie Sahlberg
Switch to using ref transactions in walker_fetch(). As part of the refactoring to use ref transactions we also fix a potential memory leak where in the original code if write_ref_sha1() would fail we would end up returning from the function without free()ing the msg string. This changes the

[PATCH v11 31/41] refs.c: make prune_ref use a transaction to delete the ref

2014-05-27 Thread Ronnie Sahlberg
Change prune_ref to delete the ref using a ref transaction. To do this we also need to add a new flag REF_ISPRUNING that will tell the transaction that we do not want to delete this ref from the packed refs. This flag is private to refs.c and not exposed to external callers. Signed-off-by: Ronnie

[PATCH v11 33/41] refs.c: pass the ref log message to _create/delete/update instead of _commit

2014-05-27 Thread Ronnie Sahlberg
Change the reference transactions so that we pass the reflog message through to the create/delete/update function instead of the commit message. This allows for individual messages for each change in a multi ref transaction. Signed-off-by: Ronnie Sahlberg sahlb...@google.com --- branch.c

[PATCH v11 15/41] refs.c: make ref_transaction_begin take an err argument

2014-05-27 Thread Ronnie Sahlberg
Add an err argument to _begin so that on non-fatal failures in future ref backends we can report a nice error back to the caller. While _begin can currently never fail for other reasons than OOM, in which case we die() anyway, we may add other types of backends in the future. For example, a

[PATCH v11 13/41] refs.c: change ref_transaction_create to do error checking and return status

2014-05-27 Thread Ronnie Sahlberg
Do basic error checking in ref_transaction_create() and make it return non-zero on error. Update all callers to check the result of ref_transaction_create(). There are currently no conditions in _create that will return error but there will be in the future. Add an err argument that will be

[PATCH v11 41/41] refs.c: make write_ref_sha1 static

2014-05-27 Thread Ronnie Sahlberg
No external users call write_ref_sha1 any more so lets declare it static. Signed-off-by: Ronnie Sahlberg sahlb...@google.com --- refs.c | 6 +- refs.h | 3 --- 2 files changed, 5 insertions(+), 4 deletions(-) diff --git a/refs.c b/refs.c index c108007..2b51547 100644 --- a/refs.c +++

[PATCH v11 22/41] branch.c: use ref transaction for all ref updates

2014-05-27 Thread Ronnie Sahlberg
Change create_branch to use a ref transaction when creating the new branch. This also fixes a race condition in the old code where two concurrent create_branch could race since the lock_any_ref_for_update/write_ref_sha1 did not protect against the ref already existing. I.e. one thread could end

[PATCH v11 21/41] fast-import.c: change update_branch to use ref transactions

2014-05-27 Thread Ronnie Sahlberg
Change update_branch() to use ref transactions for updates. Signed-off-by: Ronnie Sahlberg sahlb...@google.com --- fast-import.c | 25 +++-- 1 file changed, 15 insertions(+), 10 deletions(-) diff --git a/fast-import.c b/fast-import.c index 6707a66..4a7b196 100644 ---

[PATCH v11 03/41] refs.c: constify the sha arguments for ref_transaction_create|delete|update

2014-05-27 Thread Ronnie Sahlberg
ref_transaction_create|delete|update has no need to modify the sha1 arguments passed to it so it should use const unsigned char* instead of unsigned char*. Some functions, such as fast_forward_to(), already have its old/new sha1 arguments as consts. This function will at some point need to use

[PATCH v11 07/41] refs.c: make ref_update_reject_duplicates take a strbuf argument for errors

2014-05-27 Thread Ronnie Sahlberg
Make ref_update_reject_duplicates return any error that occurs through a new strbuf argument. This means that when a transaction commit fails in this function we will now be able to pass a helpful error message back to the caller. Reviewed-by: Jonathan Nieder jrnie...@gmail.com Signed-off-by:

[PATCH v11 10/41] update-ref.c: log transaction error from the update_ref

2014-05-27 Thread Ronnie Sahlberg
Call ref_transaction_commit with QUIET_ON_ERR and use the strbuf that is returned to print a log message if/after the transaction fails. Reviewed-by: Jonathan Nieder jrnie...@gmail.com Signed-off-by: Ronnie Sahlberg sahlb...@google.com --- builtin/update-ref.c | 10 +- 1 file changed, 5

[PATCH v11 06/41] refs.c: add an err argument to repack_without_refs

2014-05-27 Thread Ronnie Sahlberg
Update repack_without_refs to take an err argument and update it if there is a failure. Pass the err variable from ref_transaction_commit to this function so that callers can print a meaningful error message if _commit fails due to a problem in repack_without_refs. Add a new function

[PATCH v11 05/41] refs.c: add a strbuf argument to ref_transaction_commit for error logging

2014-05-27 Thread Ronnie Sahlberg
Add a strbuf argument to _commit so that we can pass an error string back to the caller. So that we can do error logging from the caller instead of from _commit. Longer term plan is to first convert all callers to use onerr==QUIET_ON_ERR and craft any log messages from the callers themselves and

Re: [PATCH] contrib: add convert-grafts-to-replace-refs.sh

2014-05-27 Thread Eric Sunshine
On Tuesday, May 27, 2014, Christian Couder chrisc...@tuxfamily.org wrote: This script adds into contrib/ an example script to convert grafts from an existing grafts file into replace refs using the new --graft option of git replace. While at it let's mention this new script in the git

Re: [PATCH 01/15] builtin/add.c: rearrange xcalloc arguments

2014-05-27 Thread Eric Sunshine
On Tue, May 27, 2014 at 7:32 AM, Brian Gesiak modoca...@gmail.com wrote: Oomph, how embarrassing. Thanks for pointing that out! Etiquette on this list is to avoid top-posting [1]. [1]: https://lkml.org/lkml/2005/1/11/111 Would it be better if I rerolled the patches? Junio may or may not make

Re: [PATCH v3] Add an explicit GIT_DIR to the list of excludes

2014-05-27 Thread Pasha Bolokhov
I've sent out version [PATCH v4] with most of the things addressed. That one hasn't been reviewed by anyone yet On Tue, May 27, 2014 at 11:04 AM, Junio C Hamano gits...@pobox.com wrote: Duy Nguyen pclo...@gmail.com writes: On Sat, May 24, 2014 at 12:33 AM, Pasha Bolokhov

  1   2   >