On Wed, Apr 27, 2016 at 11:19 PM, Hagen Paul Pfeifer wrote:
> * Johannes Sixt | 2016-04-27 23:33:53 [+0200]:
>
> Hey Junio, hey Hannes,
>
>> git bisect start
>> git rev-list --first-parent --boundary origin..origin/pu |
>> sed -ne s/-//p | xargs git bisect good
>> git bisect bad origin/pu
>>
>>a
On Thu, Apr 28, 2016 at 8:26 AM, wrote:
> diff to v3:
> * fix missing assignment of pointerFile variable
> ($gmane/292454, thanks Sebastian for making me aware)
> * fix s/brake/break/ in commit message
> ($gmane/292451, thanks Eric)
The series looks good to me now.
Regards,
Sebastian
--
To
From: Lars Schneider
The Git Travis CI OSX build always installs the latest versions of Git LFS and
Perforce via brew and the Linux build installs fixed versions. Consequently new
LFS/Perforce versions can break the OS X build even if there is no change in
Git.
Signed-off-by: Lars Schneider
---
From: Lars Schneider
Git LFS 1.2.0 removed a preamble from the output of the 'git lfs pointer'
command [1] which broke the parsing of this output. Adjust the parser
to support the old and the new format.
Please note that this patch slightly changes the second return parameter
from a list of LF t
From: Lars Schneider
Signed-off-by: Lars Schneider
---
.travis.yml | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/.travis.yml b/.travis.yml
index 78e433b..4acf617 100644
--- a/.travis.yml
+++ b/.travis.yml
@@ -22,8 +22,8 @@ addons:
env:
global:
- DEVELOPER=1
-
From: Lars Schneider
v1: $gmane/291917
v2: $gmane/291991
v3: $gmane/292425
diff to v3:
* fix missing assignment of pointerFile variable
($gmane/292454, thanks Sebastian for making me aware)
* fix s/brake/break/ in commit message
($gmane/292451, thanks Eric)
Thanks,
Lars
Lars Schneider (3):
* Johannes Sixt | 2016-04-27 23:33:53 [+0200]:
Hey Junio, hey Hannes,
> git bisect start
> git rev-list --first-parent --boundary origin..origin/pu |
> sed -ne s/-//p | xargs git bisect good
> git bisect bad origin/pu
>
>and it starts bisecting among the 50-something first-parent commits betwee
Hi Stefan,
On Wed, Apr 27, 2016 at 9:08 AM, Stefan Beller wrote:
> I think (pure speculation), that it the error is in the context
> (repository) switching logic.
> What happens if you alter the order, i.e. give testfile first and then
> the files in the nested
> repos?
Interestingly, reversing
On 26 Apr 2016, at 01:10, SZEDER Gábor wrote:
>
> Quoting Junio C Hamano :
>
>> SZEDER Gábor writes:
>>
>>> You can have a look at these patches at
>>>
>>> https://github.com/szeder/git completion-test-multiple-bash-versions
>>>
>>> and perhaps you could even adapt it to LFS and/or p4 som
On Wed, Apr 27, 2016 at 09:53:24PM +, Eric Wong wrote:
> It can be tempting for a server admin to want a stable set of
> long-lived packs for dumb clients; but also want to enable
> bitmaps to serve smart clients more quickly.
>
> Unfortunately, such a configuration is impossible;
> so at lea
On Wed, Apr 27, 2016 at 03:56:46PM -0700, Junio C Hamano wrote:
> Eric Wong writes:
>
> > It can be tempting for a server admin to want a stable set of
> > long-lived packs for dumb clients; but also want to enable
> > bitmaps to serve smart clients more quickly.
> >
> > Unfortunately, such a co
On Wed, Apr 27, 2016 at 4:17 PM, Junio C Hamano wrote:
> Stefan Beller writes:
>
>> Another way to corrupt it is to change the configuration (e.g. add
>> things to the config hashmap such that it reallocates and grows).
>
> You're right. But doesn't it hint that there is a deeper problem?
>
> By
Stefan Beller writes:
> Another way to corrupt it is to change the configuration (e.g. add
> things to the config hashmap such that it reallocates and grows).
You're right. But doesn't it hint that there is a deeper problem?
By making a copy and keeping it, you would hold onto a stale value
an
On Tue, Apr 26, 2016 at 4:17 PM, Junio C Hamano wrote:
> Junio C Hamano writes:
>
>> I see room for bikeshedding here, but the material to bikeshed
>> around is not even documented yet ;-)
>>
>> * a token prefixed with '*' is a label.
>> * a token prefixed with './' is a path.
>> * a token pre
Eric Wong writes:
> It can be tempting for a server admin to want a stable set of
> long-lived packs for dumb clients; but also want to enable
> bitmaps to serve smart clients more quickly.
>
> Unfortunately, such a configuration is impossible;
> so at least warn users of this incompatibility sin
Git-cinnabar is a git remote helper to interact with mercurial
repositories. It allows to clone, pull and push from/to mercurial remote
repositories, using git.
Code on https://github.com/glandium/git-cinnabar
[ Previous announcements:
http://marc.info/?l=git&m=145294370431454
http://marc.inf
On Wed, Apr 27, 2016 at 3:05 PM, Junio C Hamano wrote:
> Isn't what the test expects bogus in the first place? I'd suggest
> removing the test as "pointless waste of resource".
>
> Comments?
>
> -- >8 --
Yes, toss it; I find your arguments below compelling.
> Manual merge resolution by users fu
Johannes Sixt writes:
> Am 27.04.2016 um 22:56 schrieb Junio C Hamano:
>> So being able to stop at only commits on the first-parent chain is a
>> valid and useful tool. "git bisect --first-parent" is one of the
>> things that are sometimes asked for.
>
> With origin pointing to git.git, I attemp
On Wed, Apr 27, 2016 at 04:37:28PM -0400, Jeff King wrote:
> > > But anything writing a _new_ refname (whether the actual ref, or
> > > referencing it via a symref) should be using check_refname_format()
> > > before writing.
> >
> > Unfortunately, neither check is lesser -- refname_is_safe allow
Elijah Newren writes:
> Yeah, the t6036 testcase 'git detects conflict w/
> criss-cross+contrived resolution' could be made to pass by tweaking
> the conflict markers. In fact, any tweak would make it appear to
> pass, but the test could be updated to still fail by updating the
> contrived resol
It can be tempting for a server admin to want a stable set of
long-lived packs for dumb clients; but also want to enable
bitmaps to serve smart clients more quickly.
Unfortunately, such a configuration is impossible;
so at least warn users of this incompatibility since
commit 21134714787a02a37da15
Am 27.04.2016 um 22:56 schrieb Junio C Hamano:
So being able to stop at only commits on the first-parent chain is a
valid and useful tool. "git bisect --first-parent" is one of the
things that are sometimes asked for.
With origin pointing to git.git, I attempted this:
git bisect start
git r
As `ret` is not used for anything except determining an early return,
we don't need a variable for that. Drop it.
Signed-off-by: Stefan Beller
---
While reading config code, I found 2 nits. Both improve readability,
no bugfix or feature.
As it is generally discouraged to have cleanup patch chur
Lots of internal functions in submodule-confic.c have a first parameter
`struct submodule_cache *cache`, which currently always refers to the
global variable `cache` in the file. To avoid confusion rename the
global `cache` variable.
Signed-off-by: Stefan Beller
---
submodule-config.c | 12 +
On Wed, Apr 27, 2016 at 2:11 PM, Junio C Hamano wrote:
> Stefan Beller writes:
>
>> When not duplicating git_config_get_value_multi("submodule.defaultGroup");
>> I run into
>>
>> Program received signal SIGSEGV, Segmentation fault.
>> ...
>> So the string list seems to be corrupted here.
>> Someo
Junio C Hamano writes:
> If a casual reader sees this code:
>
> ref_transaction_delete(transaction, r->name, r->sha1,
> REF_ISPRUNING | REF_NODEREF, NULL, &err)
>
> it gives an incorrect impression that there may also be a valid case
> to make a "delete" call with ISP
Stefan Beller writes:
> When not duplicating git_config_get_value_multi("submodule.defaultGroup");
> I run into
>
> Program received signal SIGSEGV, Segmentation fault.
> ...
> So the string list seems to be corrupted here.
> Someone stomping over our memory? How long is the result
> of git_confi
Jeff King writes:
> On Wed, Apr 27, 2016 at 02:20:37PM +0200, Johannes Schindelin wrote:
>
>> The only change vs v3 is that I replaced my flimsical test by Peff's (with
>> *one* change: I realized that we need to group the Require statements in a
>> block when I tried to verify that the test fai
Hagen Paul Pfeifer writes:
> Imagine a "rebase feature branch" style of development. All features are
> developed on separate features branch which are rebased on master and
> immediately merged into the upstream master.
I do not want to imagine such ;-) The only semi-sensible reason why
peopl
On Wed, Apr 27, 2016 at 11:06 AM, Jacob Smith wrote:
> I debugged the issue using the script here:
> https://github.com/git/git/blob/master/git-p4.py
> I'm not sure how close to the main repo that is.
>
> On Wed, Apr 27, 2016 at 11:28 AM, Stefan Beller wrote:
>> On Wed, Apr 27, 2016 at 9:15 A
Hey,
are there any plans to add an option to skip all non-merge commits via
bisecting?
git bisect start --merges-only
Imagine a "rebase feature branch" style of development. All features are
developed on separate features branch which are rebased on master and
immediately merged into the upstrea
Junio C Hamano writes:
> I expect that somewhere in this series transaction->nr will not stay
s/series/& it is documented that/
> constant even if the client code of ref-transaction API makes no
> direct call that adds a new update[] element, though, even if it is
> not done in this patch.
>
>
David Turner writes:
> On Wed, 2016-04-27 at 11:47 -0700, Junio C Hamano wrote:
>> Michael Haggerty writes:
>>
>> > It is nonsensical (and a little bit dangerous) to use REF_ISPRUNING
>> > without REF_NODEREF. Forbid it explicitly. Change the one
>> > REF_ISPRUNING
>> > caller to pass REF_NODER
On Wed, Apr 27, 2016 at 04:34:53PM -0400, David Turner wrote:
> > I thought the point is that one is a lesser check than the other, and
> > we
> > need different rules for different situations. So we might allow
> > deletion on a refname that does not pass check_refname_format(), but
> > we
> > mu
On Wed, 2016-04-27 at 16:15 -0400, Jeff King wrote:
> On Wed, Apr 27, 2016 at 04:10:32PM -0400, David Turner wrote:
>
> > On Wed, 2016-04-27 at 10:59 -0700, Junio C Hamano wrote:
> >
> > > There is another call to refname_is_safe() in
> > > resolve_ref_unsafe(),
> > > which applies the sanity che
On Wed, Apr 27, 2016 at 4:31 PM, Junio C Hamano wrote:
>> On Wed, Apr 27, 2016 at 9:24 PM, Rafal Klys wrote:
>>> Add call to git_config(git_default_config, NULL) to update the
>>> comment_char_line from default '#' to possible different value set in
>>> core.commentChar.
>>
>>> Signed-off-by: Raf
Christian Couder writes:
> On Wed, Apr 27, 2016 at 9:24 PM, Rafal Klys wrote:
>> Add call to git_config(git_default_config, NULL) to update the
>> comment_char_line from default '#' to possible different value set in
>> core.commentChar.
>
> It is "comment_line_char" not "comment_char_line", but
Dennis Kaarsemaker writes:
> ab21433 dropped support for rpmbuild using our own specfile by removing
> git.spec.in, but forgot to remove the dependency of dist on git.spec.
>
> Signed-off-by: Dennis Kaarsemaker
> ---
Thanks.
> Makefile | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
On Wed, 2016-04-27 at 11:47 -0700, Junio C Hamano wrote:
> Michael Haggerty writes:
>
> > It is nonsensical (and a little bit dangerous) to use REF_ISPRUNING
> > without REF_NODEREF. Forbid it explicitly. Change the one
> > REF_ISPRUNING
> > caller to pass REF_NODEREF too.
> >
> > Signed-off-by:
On Wed, Apr 27, 2016 at 04:10:32PM -0400, David Turner wrote:
> On Wed, 2016-04-27 at 10:59 -0700, Junio C Hamano wrote:
>
> > There is another call to refname_is_safe() in resolve_ref_unsafe(),
> > which applies the sanity check to the string from a symref. We seem
> > to allow
> >
> > $ g
Michael Haggerty writes:
> If the user has asked that a new value be set for a reference, we use
> check_refname_format() to verify that the reference name satisfies all
> of the rules. But in other cases, at least check that refname_is_safe().
It isn't clear to me what "in other cases" exactly
On Wed, Apr 27, 2016 at 9:24 PM, Rafal Klys wrote:
> Add call to git_config(git_default_config, NULL) to update the
> comment_char_line from default '#' to possible different value set in
> core.commentChar.
It is "comment_line_char" not "comment_char_line", but otherwise you
can add "Reviewed-by
On Wed, 2016-04-27 at 10:59 -0700, Junio C Hamano wrote:
> There is another call to refname_is_safe() in resolve_ref_unsafe(),
> which applies the sanity check to the string from a symref. We seem
> to allow
>
> $ git symbolic-ref refs/heads/SSS refs/heads//master
>
> and we end up storing
What's new:
1. configs for automatically populating the untracked-cache and
watchman extensions.
2. index-helper errors go to index-helper.log (index-helper redirects stdout,
stderr)
3. Duy's "Add tracing to measure where most of the time is spent"
4. index-helper sends/receives watchman status
Instead of writing warnings to stderr, write them to a log. Later, we'll
probably be daemonized, so writing to stderr will be pointless.
Signed-off-by: David Turner
---
Documentation/git-index-helper.txt | 3 +++
index-helper.c | 29 ++---
2 files ch
From: Nguyễn Thái Ngọc Duy
The extension contains a bitmap, one bit for each entry in the
index. If the n-th bit is zero, the n-th entry is considered
unchanged, we can ce_mark_uptodate() it without refreshing. If the bit
is non-zero and we found out the corresponding file is clean after
refresh,
From: Nguyễn Thái Ngọc Duy
This allows signal handlers and atexit functions to realize this
situation and not clean up.
Signed-off-by: Nguyễn Thái Ngọc Duy
Signed-off-by: David Turner
---
builtin/gc.c | 2 +-
cache.h | 2 +-
daemon.c | 2 +-
setup.c | 4 +++-
4 files changed, 6
For installations that have centrally-managed configuration, it's
easier to set a config once than to run update-index on every
repository.
Signed-off-by: David Turner
---
.gitignore| 1 +
Documentation/config.txt | 4
Makefile | 1 +
read-ca
Introduce a new config option, indexhelper.autorun, to automatically
run git index-helper before starting up a builtin git command. This
enables users to keep index-helper running without manual
intervention.
Signed-off-by: David Turner
---
Documentation/config.txt | 4
read-cache.c
From: Nguyễn Thái Ngọc Duy
Later, we will introduce git index-helper to share this memory with
other git processes.
We only unmap it when we discard the index (although the kernel may of
course choose to page it out).
Signed-off-by: Nguyễn Thái Ngọc Duy
Signed-off-by: David Turner
---
cache.
From: Nguyễn Thái Ngọc Duy
Signed-off-by: Nguyễn Thái Ngọc Duy
Signed-off-by: David Turner
---
Documentation/git-index-helper.txt | 3 +++
Documentation/git-update-index.txt | 6 ++
builtin/update-index.c | 16
3 files changed, 25 insertions(+)
diff --git a/
From: Nguyễn Thái Ngọc Duy
All the known heavy code blocks are measured (except object database
access). This should help identify if an optimization is effective or
not. An unoptimized git-status would give something like below (92% of
time is accounted). To sum up the effort of making git scale
Add a config option to populate the untracked cache.
For installations that have centrally-managed configuration, it's
easier to set a config once than to run update-index on every
repository.
Signed-off-by: David Turner
---
Documentation/config.txt | 4
read-cache.c | 7 ++
From: Nguyễn Thái Ngọc Duy
There are "holes" in the index-helper approach because the shared
memory is not verified again by git. If $USER is compromised, shared
memory could be modified. But anyone who could do this could already
modify $GIT_DIR/index. A more realistic risk is some bugs in
index
Make git checkout (and other unpack_tree operations) preserve the
untracked cache and watchman status. This is valuable for two reasons:
1. Often, an unpack_tree operation will not touch large parts of the
working tree, and thus most of the untracked cache will continue to be
valid.
2. Even if th
Signed-off-by: David Turner
---
index-helper.c | 7 +++
t/t7900-index-helper.sh | 9 +
2 files changed, 16 insertions(+)
diff --git a/index-helper.c b/index-helper.c
index 60a71f2..092c814 100644
--- a/index-helper.c
+++ b/index-helper.c
@@ -463,6 +463,13 @@ int main(int arg
Soon, we'll want to automatically start index-helper, so we need
a mode that silently exits if it can't start up (either because
it's not in a git dir, or because another one is already running).
Signed-off-by: David Turner
---
Documentation/git-index-helper.txt | 4
index-helper.c
From: Nguyễn Thái Ngọc Duy
Watchman is hidden behind index-helper. Before git tries to read the
index from shm, it notifies index-helper through the socket and waits
for index-helper to prepare a file for sharing memory (with
MAP_SHARED). index-helper then contacts watchman, updates 'WAMA'
extens
From: Nguyễn Thái Ngọc Duy
The previous patch has the logic to clear bits in 'WAMA' bitmap. This
patch has logic to set bits as told by watchman. The missing bit,
_using_ these bits, are not here yet.
A lot of this code is written by David Turner originally, mostly from
[1]. I'm just copying and
From: Nguyễn Thái Ngọc Duy
Signed-off-by: Nguyễn Thái Ngọc Duy
Signed-off-by: David Turner
---
read-cache.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/read-cache.c b/read-cache.c
index d9fb78b..16cc487 100644
--- a/read-cache.c
+++ b/read-cache.c
@@ -1345,7 +1345,7 @@
From: Nguyễn Thái Ngọc Duy
We detach after creating and opening the socket, because otherwise
we might return control to the shell before index-helper is ready to
accept commands. This might lead to flaky tests.
Signed-off-by: Nguyễn Thái Ngọc Duy
Signed-off-by: David Turner
---
Documentatio
From: Nguyễn Thái Ngọc Duy
Instead of reading the index from disk and worrying about disk
corruption, the index is cached in memory (memory bit-flips happen
too, but hopefully less often). The result is faster read. Read time
is reduced by 70%.
The biggest gain is not having to verify the traili
Add a new command (and command-line arg) to allow index-helpers to
exit cleanly.
This is mainly useful for tests.
Signed-off-by: David Turner
---
Documentation/git-index-helper.txt | 3 +++
index-helper.c | 31 ++-
t/t7900-index-helper.sh
Add call to git_config(git_default_config, NULL) to update the
comment_char_line from default '#' to possible different value set in
core.commentChar.
Signed-off-by: Rafal Klys
---
trailer.c | 3 +++
1 file changed, 3 insertions(+)
diff --git a/trailer.c b/trailer.c
index 8e48a5c..a3700b4 10064
On Wed, Apr 27, 2016 at 02:20:37PM +0200, Johannes Schindelin wrote:
> The only change vs v3 is that I replaced my flimsical test by Peff's (with
> *one* change: I realized that we need to group the Require statements in a
> block when I tried to verify that the test fails when I
> modify the fir
Michael Haggerty writes:
> @@ -2380,8 +2381,8 @@ int rename_ref(const char *oldrefname, const char
> *newrefname, const char *logms
> goto rollback;
> }
>
> - if (!read_ref_full(newrefname, RESOLVE_REF_READING, sha1, NULL) &&
> - delete_ref(newrefname, sha1, REF
Am 27.04.2016 um 08:43 schrieb Johannes Schindelin:
On Tue, 26 Apr 2016, Johannes Sixt wrote:
Should we insert a check for MAP_PRIVATE to catch
unexpected use-cases (think of the index-helper daemon effort)?
I agree, we should have such a check. The line above the `die("Invalid
usage ...")` th
Michael Haggerty writes:
> It is nonsensical (and a little bit dangerous) to use REF_ISPRUNING
> without REF_NODEREF. Forbid it explicitly. Change the one REF_ISPRUNING
> caller to pass REF_NODEREF too.
>
> Signed-off-by: Michael Haggerty
> ---
> This also makes later patches a bit clearer.
I w
Michael Haggerty writes:
> * Backend-specific flags might be set in type as well, regardless of
> * outcome.
> *
> - * sb_path is workspace: the caller should allocate and free it.
All made sense.
A welcome bonus is the removal of this stale comment that 42a38cf7
(read_raw_ref(): manage o
On Wed, Apr 27, 2016 at 11:25 PM, Eric Sunshine wrote:
> On Mon, Apr 25, 2016 at 2:40 PM, Pranit Bauva wrote:
>> On Wed, Apr 13, 2016 at 10:57 PM, Eric Sunshine
>> wrote:
>>> Each of these patches should have a single conceptual purpose. It
>>> seems, from the above explanation, that you're mix
Michael Haggerty writes:
> This microoptimization doesn't make a significant difference in speed.
> And it causes problems if somebody ever wants to modify the function to
> add updates to a transaction as part of processing it, as will happen
> shortly.
>
> Make the same change in initial_ref_tr
On Mon, Apr 25, 2016 at 9:18 AM, Duy Nguyen wrote:
> On Sun, Apr 24, 2016 at 8:33 PM, Christian Couder
> wrote:
>> To be compatible with the rest of the error handling in builtin/apply.c,
>> find_header() should return -1 instead of calling die().
>>
>> Unfortunately find_header() already returns
On Sun, Apr 24, 2016 at 9:33 AM, Christian Couder
wrote:
> To be compatible with the rest of the error handling in builtin/apply.c,
> find_header() should return -1 instead of calling die().
>
> Unfortunately find_header() already returns -1 when no header is found,
> so let's make it return -2 in
I debugged the issue using the script here:
https://github.com/git/git/blob/master/git-p4.py
I'm not sure how close to the main repo that is.
On Wed, Apr 27, 2016 at 11:28 AM, Stefan Beller wrote:
> On Wed, Apr 27, 2016 at 9:15 AM, Jacob Smith wrote:
>> On OS X,
>
> Do you use the Git as pro
On Tue, Apr 26, 2016 at 3:37 PM, Junio C Hamano wrote:
> Stefan Beller writes:
>
>> The result of git_config_get_value_multi do not seem to be stable and
>> may get overwritten. Have an easy way to preserve the results of that
>> query.
>>
>> Signed-off-by: Stefan Beller
>> ---
>
> This morning
Michael Haggerty writes:
> Does anybody have a use case for allowing un-normalized reference
> names like "refs/foo/../bar///baz"? I'm pretty certain they would not
> be handled correctly anyway, especially if they are not stored as
> loose references.
I wondered what codepath this follows:
On Mon, Apr 25, 2016 at 2:40 PM, Pranit Bauva wrote:
> On Wed, Apr 13, 2016 at 10:57 PM, Eric Sunshine
> wrote:
>> Each of these patches should have a single conceptual purpose. It
>> seems, from the above explanation, that you're mixing and mismatching
>> bits of such changes between patches.
>
ab21433 dropped support for rpmbuild using our own specfile by removing
git.spec.in, but forgot to remove the dependency of dist on git.spec.
Signed-off-by: Dennis Kaarsemaker
---
Makefile | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/Makefile b/Makefile
index 23182bc..8083
On Wed, Apr 27, 2016 at 6:27 PM, Junio C Hamano wrote:
>
> I think 02/83 that renamed the global-to-be-moved-to-state to
> state_p_value was brilliant, and this should follow suit; you would
> be moving linenr into the state eventually in later steps, right?
Yeah, ok, I will do the same thing to
This is more convenient and less error-prone for callers.
Signed-off-by: Michael Haggerty
---
refs/files-backend.c | 1 +
1 file changed, 1 insertion(+)
diff --git a/refs/files-backend.c b/refs/files-backend.c
index 303c43b..f10c80f 100644
--- a/refs/files-backend.c
+++ b/refs/files-backend.c
@
This will hopefully reduce confusion with the "flags" arguments that are
used in many functions in this module as an input parameter to choose
how the function should operate.
Signed-off-by: Michael Haggerty
---
refs/files-backend.c | 16
refs/refs-internal.h | 2 +-
2 files ch
Extract a new function, lock_ref_for_update(), from
ref_transaction_commit().
Signed-off-by: Michael Haggerty
---
refs/files-backend.c | 152 ---
1 file changed, 85 insertions(+), 67 deletions(-)
diff --git a/refs/files-backend.c b/refs/files-back
This started as a modest attempt to move the last couple of patches
mentioned here [1] to before the vtable patches. I wanted to do that
because having real changes mixed with the vtable refactoring was
making rebasing and stuff awkward.
But then it snowballed. A lot of what's new is pretty trivia
Signed-off-by: Michael Haggerty
---
refs/files-backend.c | 9 +++--
1 file changed, 3 insertions(+), 6 deletions(-)
diff --git a/refs/files-backend.c b/refs/files-backend.c
index de38517..0ade681 100644
--- a/refs/files-backend.c
+++ b/refs/files-backend.c
@@ -2351,20 +2351,17 @@ int rename_
If the user has asked that a new value be set for a reference, we use
check_refname_format() to verify that the reference name satisfies all
of the rules. But in other cases, at least check that refname_is_safe().
Signed-off-by: Michael Haggerty
---
There are remaining problems in this area of th
The return value of resolve_ref_unsafe() is not guaranteed to stay
around as long as we need it, so use resolve_refdup() instead.
Signed-off-by: Michael Haggerty
---
builtin/branch.c | 19 +++
1 file changed, 11 insertions(+), 8 deletions(-)
diff --git a/builtin/branch.c b/built
commit_ref_update() is now only called with flags=0. So remove the flags
parameter entirely.
Signed-off-by: Michael Haggerty
---
refs/files-backend.c | 14 +++---
1 file changed, 7 insertions(+), 7 deletions(-)
diff --git a/refs/files-backend.c b/refs/files-backend.c
index 40ed157..9388
Before committing ref updates, split symbolic ref updates into two
parts: an update to the underlying ref, and a log-only update to the
symbolic ref. This ensures that both references are locked correctly
during the transaction, including while their reflogs are updated.
Similarly, if the referenc
From: David Turner
When renaming refs, don't dereference either the origin or the destination
before renaming.
The origin does not need to be dereferenced because it is presently
forbidden to rename symbolic refs.
Not dereferencing the destination fixes a bug where renaming on top of
a broken s
If a transaction includes a non-NODEREF update to a symbolic reference,
we don't have to look it up in lock_ref_for_update(). The reference will
be dereferenced anyway when the split-off update is processed.
This change requires that we store a backpointer from the split-off
update to its parent u
Document the difference between this function and
safe_create_leading_directories_const(), and that the former restores
path before returning.
Signed-off-by: Michael Haggerty
---
cache.h | 5 +
1 file changed, 5 insertions(+)
diff --git a/cache.h b/cache.h
index 2711048..4134f64 100644
---
* Always start error messages with a lower-case letter.
* Always enclose reference names in single quotes.
Signed-off-by: Michael Haggerty
---
This change is not strictly needed, but I wanted to fix the old error
messages before I started adding new ones (otherwise, should the new
error messages
Add a docstring for the remove_dir_recursively() function and the
REMOVE_DIR_* flags that can be passed to it.
Signed-off-by: Michael Haggerty
---
dir.h | 23 +++
1 file changed, 23 insertions(+)
diff --git a/dir.h b/dir.h
index 301b737..5f19acc 100644
--- a/dir.h
+++ b/dir.
It is nonsensical (and a little bit dangerous) to use REF_ISPRUNING
without REF_NODEREF. Forbid it explicitly. Change the one REF_ISPRUNING
caller to pass REF_NODEREF too.
Signed-off-by: Michael Haggerty
---
This also makes later patches a bit clearer.
refs.c | 3 +++
refs/files-b
Now lock_ref_sha1_basic() is only called with flags==REF_NODEREF. So we
don't have to handle other cases anymore.
This enables several simplifications, the most interesting of which come
from the fact that ref_lock::orig_ref_name is now always the same as
ref_lock::ref_name:
* Remove ref_lock::or
Signed-off-by: Michael Haggerty
---
This fixes a coding error from the original implementation.
refs.c | 5 +++--
1 file changed, 3 insertions(+), 2 deletions(-)
diff --git a/refs.c b/refs.c
index 5789152..ca0280f 100644
--- a/refs.c
+++ b/refs.c
@@ -136,11 +136,12 @@ int refname_is_safe(const
This microoptimization doesn't make a significant difference in speed.
And it causes problems if somebody ever wants to modify the function to
add updates to a transaction as part of processing it, as will happen
shortly.
Make the same change in initial_ref_transaction_commit().
Signed-off-by: Mi
Signed-off-by: Michael Haggerty
---
refs.c | 8 +---
1 file changed, 5 insertions(+), 3 deletions(-)
diff --git a/refs.c b/refs.c
index 87dc82f..5789152 100644
--- a/refs.c
+++ b/refs.c
@@ -120,17 +120,19 @@ int check_refname_format(const char *refname, int flags)
int refname_is_safe(cons
This avoids the need for a forward declaration in the next patch.
Signed-off-by: Michael Haggerty
---
refs/files-backend.c | 20 ++--
1 file changed, 10 insertions(+), 10 deletions(-)
diff --git a/refs/files-backend.c b/refs/files-backend.c
index 546656a..8f2a795 100644
--- a/re
After all, it doesn't hold the symbolic reference, but rather the
reference referred to.
Signed-off-by: Michael Haggerty
---
refs/files-backend.c | 21 +++--
refs/refs-internal.h | 2 +-
2 files changed, 12 insertions(+), 11 deletions(-)
diff --git a/refs/files-backend.c b/refs
1 - 100 of 140 matches
Mail list logo