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
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
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,
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.
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
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(-)
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
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.
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
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
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
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 -
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
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
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
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
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;
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
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
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
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:
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
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
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
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:
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
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
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.
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,
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
---
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
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.
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
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 $$
$
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,
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
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
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
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
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
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
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
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
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
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
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
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
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()
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
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
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
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
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
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
---
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
+++
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
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
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
---
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
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.
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
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
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
+++
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
+++
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 +-
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
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
---
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
+++
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
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
---
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
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:
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
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
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
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
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
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 - 100 of 119 matches
Mail list logo