On Thu, Feb 25, 2016 at 02:00:36AM -0500, Jeff King wrote:
> I think something like this would work:
> [...]
> but it does not seem to pass with your patch (even after I fixed up the
> weird "local" thing). I think the problem is that we ask
> submodule--helper to do the clone, and it uses local_r
On Wed, Feb 24, 2016 at 10:23:28PM -0800, Jacob Keller wrote:
> >> +# Sanitize the local git environment for use within a submodule. We
> >> +# can't simply use clear_local_git_env since we want to preserve some
> >> +# of the settings from GIT_CONFIG_PARAMETERS.
> >> +sanitize_local_git_env()
> >
On Wed, Feb 24, 2016 at 10:23 PM, Jeff King wrote:
> On Wed, Feb 24, 2016 at 10:19:05PM -0800, Jacob Keller wrote:
>
>> >> + /* combined all the values before we quote them */
>> >
>> > Comment repeats what the code already says, thus not terribly useful.
>> >
>> > Also: s/combined/c
On Wed, Feb 24, 2016 at 5:41 PM, Jeff King wrote:
> On Wed, Feb 24, 2016 at 03:59:12PM -0800, Jacob Keller wrote:
>
>> +int sanitize_submodule_config(const char *var, const char *value, void
>> *data)
>> +{
>> + struct strbuf quoted = STRBUF_INIT;
>> + struct strbuf *out = data;
>> +
>> +
On Wed, Feb 24, 2016 at 10:19:05PM -0800, Jacob Keller wrote:
> >> + /* combined all the values before we quote them */
> >
> > Comment repeats what the code already says, thus not terribly useful.
> >
> > Also: s/combined/combine/
> >
> I tend to make comments like this when I chang
Jeff King writes:
>> > I do not overly care, but I wonder if it would be nice to keep README as
>> > a symlink.
>>
>> I can add it if people want to see it, but we already have so many files
>> at the root, I'd rather avoid adding duplicates through symlinks.
>
> That's reasonable. I thought it
On Wed, Feb 24, 2016 at 4:27 PM, Eric Sunshine wrote:
>> ---
>> diff --git a/builtin/submodule--helper.c b/builtin/submodule--helper.c
>> @@ -255,6 +255,61 @@ static int module_clone(int argc, const char **argv,
>> const char *prefix)
>> +/* Rules to sanitize configuration variables that are Ok t
On Wed, Feb 24, 2016 at 02:37:05PM +0100, Matthieu Moy wrote:
> Jeff King writes:
>
> > On Tue, Feb 23, 2016 at 06:40:24PM +0100, Matthieu Moy wrote:
> >
> >> README => README.md | 54
> >> -
> >> t/t7001-mv.sh | 2 +-
> >
> > I do not
Duy Nguyen writes:
> On Thu, Feb 25, 2016 at 5:09 AM, Christian Couder
> wrote:
>> Another possibility would be to libify the "git apply" functionality
>> and then to use the libified "git apply" in run_apply() instead of
>> launching a separate "git apply" process. One benefit from this is
>> t
On Thu, Feb 25, 2016 at 10:02 AM, Junio C Hamano wrote:
> Duy Nguyen writes:
>
>> On Thu, Feb 25, 2016 at 5:09 AM, Christian Couder
>> wrote:
>>> Another possibility would be to libify the "git apply" functionality
>>> and then to use the libified "git apply" in run_apply() instead of
>>> launch
As the strbufs passed around collect all output to the user, and there
is no post processing involved we need to care about the line ending
ourselves.
Reviewed-by: Jonathan Nieder
Signed-off-by: Stefan Beller
---
run-command.c | 2 ++
1 file changed, 2 insertions(+)
diff --git a/run-command.c
We want to reuse the error reporting facilities in a later patch.
Reviewed-by: Jonathan Nieder
Signed-off-by: Stefan Beller
---
run-command.c | 18 +-
run-command.h | 19 +++
2 files changed, 28 insertions(+), 9 deletions(-)
diff --git a/run-command.c b/run-comm
The refs code has a similar pattern of passing around 'struct strbuf *err',
which is strictly used for error reporting. This is not the case here,
as the strbuf is used to accumulate all the output (whether it is error
or not) for the user. Rename it to 'out'.
Suggested-by: Jonathan Nieder
Review
Reroute the error message for specified but initialized submodules
to stderr instead of stdout.
Reviewed-by: Jonathan Nieder
Signed-off-by: Stefan Beller
---
git-submodule.sh | 4 ++--
t/t7400-submodule-basic.sh | 4 ++--
2 files changed, 4 insertions(+), 4 deletions(-)
diff --git a/
This allows to configure fetching and updating in parallel
without having the command line option.
This moved the responsibility to determine how many parallel processes
to start from builtin/fetch to submodule.c as we need a way to communicate
"The user did not specify the number of parallel proc
Adhere to the common coding style of Git and not check explicitly
for NULL throughout the file. There are still other occurrences in the
code base but that is usually inside of conditions with side effects.
Reviewed-by: Jonathan Nieder
Signed-off-by: Stefan Beller
---
submodule-config.c | 6 +++
Just pass it along to "git submodule update", which may pick reasonable
defaults if you don't specify an explicit number.
Reviewed-by: Jonathan Nieder
Signed-off-by: Stefan Beller
---
Documentation/git-clone.txt | 6 +-
builtin/clone.c | 19 +--
t/t7406-submodul
We do not want the output to be interrupted by a NUL byte, so we
cannot use raw fputs. Introduce strbuf_write to avoid having long
arguments in run-command.c.
Reviewed-by: Jonathan Nieder
Signed-off-by: Stefan Beller
---
run-command.c | 8
strbuf.c | 6 ++
strbuf.h | 6 ++
This replaces origin/sb/submodule-parallel-update and applies on
origin/sb/submodule-parallel-fetch.
Thanks Jonathan for review!
* fixing all the small nits of v16 found by Jonathan!
Thanks,
Stefan
Interdiff to v15: (current origin/sb/submodule-parallel-update)
diff --git a/builtin/submodule--
Currently submodule..update is only handled by git-submodule.sh.
C code will start to need to make use of that value as more of the
functionality of git-submodule.sh moves into library code in C.
Add the update field to 'struct submodule' and populate it so it can
be read as sm->update or from sm-
Expose possible parallelism either via the "--jobs" CLI parameter or
the "submodule.fetchJobs" setting.
By having the variable initialized to -1, we make sure 0 can be passed
into the parallel processing machine, which will then pick as many parallel
workers as there are CPUs.
Reviewed-by: Jonath
This introduces a new helper function in git submodule--helper
which takes care of cloning all submodules, which we want to
parallelize eventually.
Some tests (such as empty URL, update_mode=none) are required in the
helper to make the decision for cloning. These checks have been
moved into the C
Jonathan Nieder writes:
> Stefan Beller wrote:
>> On Wed, Feb 24, 2016 at 1:19 PM, Jonathan Nieder wrote:
>> > Stefan Beller wrote:
>
When the callers of parallel processing machine are sloppy with their
messages, make sure the output is terminated with LF after one child
process
On Wed, Feb 24, 2016 at 6:38 PM, Duy Nguyen wrote:
> On Thu, Feb 25, 2016 at 5:21 AM, Jacob Keller wrote:
>> Hey,
>>
>> I know that running "git diff " when outside a git
>> project will result in a normal diff being run. I happen to prefer the
>> diff algorithm and diff output of "git diff" but
On Thu, Feb 25, 2016 at 5:21 AM, Jacob Keller wrote:
> Hey,
>
> I know that running "git diff " when outside a git
> project will result in a normal diff being run. I happen to prefer the
> diff algorithm and diff output of "git diff" but there does not seem
> to be a way to have this behavior fr
Signed-off-by: Ramsay Jones
---
Hi Duy,
If you need to re-roll your 'nd/shallow-deepen' branch, could
you please squash this into the relevant patch (ie "fetch: define
shallow boundary with --shallow-exclude", 23-02-2016).
Thanks!
ATB,
Ramsay Jones
builtin/fetch.c | 2 +-
1 file changed,
Stefan Beller wrote:
> This build on top of 163b9b1f919c762a4bfb693b3aa05ef1aa627fee
> (origin/sb/submodule-parallel-update~5) and replace the series from there on.
Except for the comments in patch 3,
Reviewed-by: Jonathan Nieder
Thanks for writing it and sorry it took so long.
--
To unsubscrib
Stefan Beller wrote:
> +++ b/run-command.h
> @@ -159,7 +159,7 @@ typedef int (*get_next_task_fn)(struct child_process *cp,
> * the negative signal number.
> */
> typedef int (*start_failure_fn)(struct child_process *cp,
> - struct strbuf *err,
> +
On Wed, Feb 24, 2016 at 07:27:23PM -0500, Eric Sunshine wrote:
> > diff --git a/git-submodule.sh b/git-submodule.sh
> > @@ -192,6 +192,16 @@ isnumber()
> > +# Sanitize the local git environment for use within a submodule. We
> > +# can't simply use clear_local_git_env since we want to preserve som
Just pass it along to "git submodule update", which may pick reasonable
defaults if you don't specify an explicit number.
Signed-off-by: Stefan Beller
Signed-off-by: Junio C Hamano
---
Documentation/git-clone.txt | 6 +-
builtin/clone.c | 19 +--
t/t7406-submodu
The refs code has a similar pattern of passing around 'struct strbuf *err',
which is strictly used for error reporting. This is not the case here,
as the strbuf is used to accumulate all the output (whether it is error
or not) for the user. Rename it to 'out'.
Suggested-by: Jonathan Nieder
Signed
This introduces a new helper function in git submodule--helper
which takes care of cloning all submodules, which we want to
parallelize eventually.
Some tests (such as empty URL, update_mode=none) are required in the
helper to make the decision for cloning. These checks have been
moved into the C
Expose possible parallelism either via the "--jobs" CLI parameter or
the "submodule.fetchJobs" setting.
By having the variable initialized to -1, we make sure 0 can be passed
into the parallel processing machine, which will then pick as many parallel
workers as there are CPUs.
Signed-off-by: Stef
This build on top of 163b9b1f919c762a4bfb693b3aa05ef1aa627fee
(origin/sb/submodule-parallel-update~5) and replace the series from there on.
Thanks Jonathan and Junio for discussion!
* instead of sophisticatedly adding \n's, require the callbacks to be sane.
* rename strbuf 'err' to 'out'.
* no ch
We do not want the output to be interrupted by a NUL byte, so we
cannot use raw fputs. Introduce strbuf_write to avoid having long
arguments in run-command.c.
Signed-off-by: Stefan Beller
---
run-command.c | 8
strbuf.c | 6 ++
strbuf.h | 6 ++
3 files changed, 16 inse
We want to reuse the error reporting facilities in a later patch.
Signed-off-by: Stefan Beller
---
run-command.c | 18 +-
run-command.h | 19 +++
2 files changed, 28 insertions(+), 9 deletions(-)
diff --git a/run-command.c b/run-command.c
index 1f86728..71abafb 1
As the strbufs passed around collect all output to the user, and there
is no post processing involved we need to care about the line ending
ourselves.
Signed-off-by: Stefan Beller
---
run-command.c | 2 ++
1 file changed, 2 insertions(+)
diff --git a/run-command.c b/run-command.c
index 20489c8.
On Wed, Feb 24, 2016 at 03:59:12PM -0800, Jacob Keller wrote:
> +int sanitize_submodule_config(const char *var, const char *value, void *data)
> +{
> + struct strbuf quoted = STRBUF_INIT;
> + struct strbuf *out = data;
> +
> + if (submodule_config_ok(var)) {
> + if (out->le
Stefan Beller wrote:
> On Wed, Feb 24, 2016 at 1:19 PM, Jonathan Nieder wrote:
> > Stefan Beller wrote:
>>> When the callers of parallel processing machine are sloppy with their
>>> messages, make sure the output is terminated with LF after one child
>>> process is handled.
>>
>> Why not always a
Junio C Hamano writes:
> ...
> You can of course standardize on signed int, but because this is a
> collection of flag bits, there is no reason not to choose unsigned.
>
> I _think_ I can fix everything up before pushing out, so please
> check what will appear on 'pu' before rerolling.
I managed
On Thu, Feb 25, 2016 at 5:09 AM, Christian Couder
wrote:
> Another possibility would be to libify the "git apply" functionality
> and then to use the libified "git apply" in run_apply() instead of
> launching a separate "git apply" process. One benefit from this is
> that we could probably get rid
David Turner writes:
> The manual for git reflog says it takes "[log-options]". And it does,
> sort-of. For instance, you can give a path, and it will only show you
> reflog entries that touch that path (I'm not sure why you would want to
> do that, but you can!). But you can also give --merge
Jacob Keller writes:
Add a git submodule--helper function which can be used to sanitize the
GIT_CONFIG_PARAMETERS value to only allow certain settings. For now,
restrict this to only credential.* settings.
>>>
>>> I guess for now that subset is fine and will be expanded over time?
On Wed, Feb 24, 2016 at 6:59 PM, Jacob Keller wrote:
> Due to the way that the git-submodule code works, it clears all local
> git environment variables before entering submodules. This is normally
> a good thing since we want to clear settings such as GIT_WORKTREE and
> other variables which woul
On Wed, Feb 24, 2016 at 4:15 PM, Jacob Keller wrote:
> On Wed, Feb 24, 2016 at 2:09 PM, Christian Couder
> wrote:
>> Hi,
>> Another possibility would be to libify the "git apply" functionality
>> and then to use the libified "git apply" in run_apply() instead of
>> launching a separate "git apply
David Turner writes:
> + for (symref_count = 0; symref_count < SYMREF_MAXDEPTH; symref_count++) {
> + int read_flags = 0;
Continuing from the previous one, this becomes "unsigned int".
--
To unsubscribe from this list: send the line "unsubscribe git" in
the body of a message to m
David Turner writes:
> Refactor resolve_ref_1 in terms of a new function read_raw_ref, which
> is responsible for reading ref data from the ref storage.
>
> Later, we will make read_raw_ref a pluggable backend function, and make
> resolve_ref_unsafe common.
>
> Testing done: Hacked in code to run
On Wed, Feb 24, 2016 at 2:09 PM, Christian Couder
wrote:
> Hi,
> Another possibility would be to libify the "git apply" functionality
> and then to use the libified "git apply" in run_apply() instead of
> launching a separate "git apply" process. One benefit from this is
> that we could probably g
On 24/02/16 22:58, David Turner wrote:
> This version incorporates fixes for function scope from Ramsay Jones.
>
> It breaks patches down a bit more, to make them easier to review and
> understand. Michael Haggerty had some suggestions here.
>
> As suggested by Duy Nguyen, it replaces the resol
following are the steps to help illustrate the issue. its actually
quite common to have projects include identical placeholder files
before update/refactoring...
// Create in master branch
> mkdir gittest
> cd gittest
> init
> mkdir -p gitmvtest/resources
> mkdir -p gitmvtest/resources/demo
> mkd
The manual for git reflog says it takes "[log-options]". And it does,
sort-of. For instance, you can give a path, and it will only show you
reflog entries that touch that path (I'm not sure why you would want to
do that, but you can!). But you can also give --merges, which will
silently give you
From: Jacob Keller
Due to the way that the git-submodule code works, it clears all local
git environment variables before entering submodules. This is normally
a good thing since we want to clear settings such as GIT_WORKTREE and
other variables which would affect the operation of submodule comma
it actually does matter in the following scenario:
1) master branch has identical content.txt files in the folder structure
2) do the git mv in a new branch
3) master branch updated the context.txt to contain new data (more
relevant to the containing folder)
4) new branch need to merge the updates
On Wed, Feb 24, 2016 at 3:36 PM, Junio C Hamano wrote:
> Stefan Beller writes:
>
>> On Wed, Feb 24, 2016 at 12:09 PM, Jacob Keller
>> wrote:
>>> From: Jacob Keller
>>>
>>> Due to the way that the git-submodule code works, it clears all local
>>> git environment variables before entering submod
Hi,
On Wed, Feb 24, 2016 at 3:27 PM, Stefan Beller wrote:
> On Wed, Feb 24, 2016 at 12:09 PM, Jacob Keller
> wrote:
>> From: Jacob Keller
>> Add a git submodule--helper function which can be used to sanitize the
>> GIT_CONFIG_PARAMETERS value to only allow certain settings. For now,
>> restric
Bill Okara writes:
> just want to see if this is a bug, user error (on my end), or??
Not a bug, not a user error, just "it does not matter", I think.
--
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
Hi,
I noticed the following 'git mv' issue with:
git version 2.6.4
If there are identical files in different subfolders, 'git mv' the
root folder (and/or each file individually) will mess up the file path
mapping. that is, if having identical 'content.txt' file under
gitmvtest
|--demo/conten
Stefan Beller writes:
> On Wed, Feb 24, 2016 at 12:09 PM, Jacob Keller
> wrote:
>> From: Jacob Keller
>>
>> Due to the way that the git-submodule code works, it clears all local
>> git environment variables before entering submodules. This is normally
>> a good thing since we want to clear set
On Wed, Feb 24, 2016 at 12:09 PM, Jacob Keller wrote:
> From: Jacob Keller
>
> Due to the way that the git-submodule code works, it clears all local
> git environment variables before entering submodules. This is normally
> a good thing since we want to clear settings such as GIT_WORKTREE and
> o
Junio C Hamano writes:
> Nguyễn Thái Ngọc Duy writes:
>
>> Intent-to-add entries are basically "I may want to commit these files
>> later, but for now they are untracked". As such, when the user does "git
>> reset --hard ", which removes i-t-a entries from the index, i-t-a
>> entries in worktre
From: Jacob Keller
Due to the way that the git-submodule code works, it clears all local
git environment variables before entering submodules. This is normally
a good thing since we want to clear settings such as GIT_WORKTREE and
other variables which would affect the operation of submodule comma
On February 24, 2016 5:43 PM, Olga Pshenichnikova wrote
> What can be cause for further confusing behavior?
>
> git@ip5server:~$ git status
> On branch master
> Untracked files:
>(use "git add ..." to include in what will be committed)
>
> app/addons/arliteks/
>
>
Alternate refs backends might not need the refs/heads directory and so
on, so we make ref db initialization part of the backend.
Signed-off-by: David Turner
---
builtin/init-db.c| 20 ++--
refs.c | 5 +
refs.h | 2 ++
refs/files-backend.c | 1
These don't use any backend-specific functions. These were previously
defined in terms of the do_head_ref helper function, but since they
are otherwise identical, we don't need that function.
Signed-off-by: David Turner
---
refs.c | 23 +++
refs/files-backend.c
The check for duplicate refnames in a transaction is needed for
all backends, so move it to the common code.
ref_transaction_commit_fn gains a new argument, the sorted
string_list of affected refnames.
Signed-off-by: David Turner
---
refs.c | 69 +++
Always handle non-normal (per-worktree or pseudo) refs in the files
backend instead of alternate backends.
Sometimes a ref transaction will update both a per-worktree ref and a
normal ref. For instance, an ordinary commit might update
refs/heads/master and HEAD (or at least HEAD's reflog).
Updat
This sets up the existing backend early, so that other code which
reads refs is reading from the right place.
Signed-off-by: David Turner
---
config.c | 24
1 file changed, 24 insertions(+)
diff --git a/config.c b/config.c
index b95ac3a..6cea884 100644
--- a/config.c
++
All submodules must have the same ref storage (for now). Confirm that
this is so before attempting to do anything with submodule refs.
Signed-off-by: David Turner
---
refs.c | 54
refs.h | 2 +-
refs/files-backend
Make do_for_each_ref take a submodule as an argument instead of a
ref_cache. Since all for_each_*ref* functions are defined in terms of
do_for_each_ref, we can then move them into the common code.
Later, we can simply make do_for_each_ref into a backend function.
Signed-off-by: David Turner
---
Add a ref backend method for do_for_each_ref.
Signed-off-by: David Turner
---
refs.c | 8
refs/files-backend.c | 7 +--
refs/refs-internal.h | 5 +
3 files changed, 18 insertions(+), 2 deletions(-)
diff --git a/refs.c b/refs.c
index 6fd5121..cd06f4b 100644
--- a/r
Instead of using a files-backend-specific struct ref_lock, the generic
ref_transaction struct should provide a void pointer that backends can use
for their own lock data.
Signed-off-by: David Turner
---
refs/files-backend.c | 29 -
refs/refs-internal.h | 2 +-
2 file
When locking a symbolic ref to expire a reflog, lock the symbolic
ref (using REF_NODEREF) instead of its referent.
Add a test for this.
Signed-off-by: David Turner
---
refs/files-backend.c | 3 ++-
t/t1410-reflog.sh| 10 ++
2 files changed, 12 insertions(+), 1 deletion(-)
diff --g
Forbid cross-backend ref renames. This would be pretty weird, but
since it will break, we should prevent it.
Also make the files backend deal with all non-normal ref renames.
Signed-off-by: David Turner
---
refs.c | 12 +++-
1 file changed, 11 insertions(+), 1 deletion(-)
diff --git a
git init learns a new argument --ref-storage. Presently, only
"files" is supported, but later we will add other storage backends.
When this argument is used, the repository's extensions.refStorage
configuration value is set (as well as core.repositoryformatversion),
and the ref storage backend's
Add new function register_ref_storage_backends(). This new function
registers all known ref storage backends... once there are any other
than the default. For now, it just registers the files backend.
Call the function before calling set_ref_storage_backend.
Signed-off-by: David Turner
---
bu
In the file-based backend, the reflog piggybacks on the ref lock.
Since other backends won't have the same sort of ref lock, ref backends
must also handle reflogs.
Signed-off-by: Ronnie Sahlberg
Signed-off-by: David Turner
---
refs.c | 46 ++
Add a --ref-storage argument to make it easy to test alternate ref
storage backends. This means that every test that calls git init or
git clone must use the new ref storage argument.
Modify many tests to work under alternate ref storage backends.
Introduce abstractions for raw ref/reflog readin
It will soon be useful for resolve_ref_unsafe to support submodules.
But since it is called from so many places, changing it would have
been painful. Fortunately, it's just a thin wrapper around (the
former) resolve_ref_1. So now resolve_ref_1 becomes
resolve_ref_unsafe_submodule, and it passes i
Alternate refs backends might still use files to store per-worktree
refs. So the files backend's ref-loading infrastructure should be
available to those backends, just for use on per-worktree refs. Add
do_for_each_per_worktree_ref, which iterates over per-worktree refs.
Signed-off-by: David Turn
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
while their reflogs are updated.
It is still possible to confuse git by concurrent updates,
In the file-based backend, delete_refs has some special optimization
to deal with packed refs. In other backends, we might be able to make
ref deletion faster by putting all deletions into a single
transaction. So we need a special backend function for this.
Signed-off-by: David Turner
---
ref
Add a new option, --ref-storage, to allow the ref storage backend to
be set on new clones.
Submodules must use the same ref storage as the parent repository, so
we also pass the --ref-storage option option when cloning
submodules.
Signed-off-by: David Turner
Signed-off-by: SZEDER Gábor
---
Doc
Signed-off-by: Ronnie Sahlberg
Signed-off-by: David Turner
---
refs.c | 6 ++
refs/files-backend.c | 5 +++--
refs/refs-internal.h | 1 +
3 files changed, 10 insertions(+), 2 deletions(-)
diff --git a/refs.c b/refs.c
index 9f06686..5ae1903 100644
--- a/refs.c
+++ b/refs.c
@@ -
Add a database backend for refs using LMDB. This backend runs git
for-each-ref about 30% faster than the files backend with fully-packed
refs on a repo with ~120k refs. It's also about 4x faster than using
fully-unpacked refs. In addition, and perhaps more importantly, it
avoids case-conflict is
Signed-off-by: David Turner
---
refs.c | 5 +
refs/files-backend.c | 4 +++-
refs/refs-internal.h | 8
3 files changed, 16 insertions(+), 1 deletion(-)
diff --git a/refs.c b/refs.c
index baf83ac..3a2ad5e 100644
--- a/refs.c
+++ b/refs.c
@@ -1412,3 +1412,8 @@ int delete
From: Ramsay Jones
Now that we have moved do_for_each_ref into refs.c, it no longer needs
to be public.
Signed-off-by: Ramsay Jones
---
refs.c | 19 +++
refs/refs-internal.h | 6 --
2 files changed, 11 insertions(+), 14 deletions(-)
diff --git a/refs.c b/ref
git svn learns to pass the ref-storage command-line argument (to init
and clone) through to git init.
Signed-off-by: David Turner
Signed-off-by: SZEDER Gábor
Signed-off-by: Eric Wong
---
contrib/completion/git-completion.bash | 2 +-
git-svn.perl | 6 +-
2 files c
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 symref would use the p
The refs infrastructure learns about log-only ref updates, which only
update the reflog. Later, we will use this to separate symbolic
reference resolution from ref updating.
Signed-off-by: David Turner
---
refs/files-backend.c | 15 ++-
refs/refs-internal.h | 7 +++
2 files cha
Add tests for the database backend.
Signed-off-by: David Turner
Helped-by: Dennis Kaarsemaker
---
t/t1460-refs-lmdb-backend.sh| 1109 +++
t/t1470-refs-lmdb-backend-reflog.sh | 359
t/t1480-refs-lmdb-submodule.sh | 85 +++
t/test-lib.s
Refactor resolve_ref_1 in terms of a new function read_raw_ref, which
is responsible for reading ref data from the ref storage.
Later, we will make read_raw_ref a pluggable backend function, and make
resolve_ref_unsafe common.
Testing done: Hacked in code to run both old and new version of
resolv
Now that resolve_ref_unsafe's only interaction with the backend is
through read_raw_ref, we can move it into the common code. Later,
we'll replace read_raw_ref with a backend function.
Signed-off-by: David Turner
---
refs.c | 104 ++
refs
From: Ronnie Sahlberg
Add a ref structure for storage backend methods. Start by adding a
method pointer for the transaction commit function.
Add a function set_refs_backend to switch between storage
backends. The files based storage backend is the default.
Signed-off-by: Ronnie Sahlberg
Signed
From: Ronnie Sahlberg
Add ref backend methods for:
read_raw_ref, verify_refname_available, pack_refs, peel_ref,
create_symref, resolve_gitlink_ref.
read_raw_ref becomes static because it's not used outside refs.c
Signed-off-by: Ronnie Sahlberg
Signed-off-by: David Turner
---
refs.c
This version incorporates fixes for function scope from Ramsay Jones.
It breaks patches down a bit more, to make them easier to review and
understand. Michael Haggerty had some suggestions here.
As suggested by Duy Nguyen, it replaces the resolve_ref_unsafe backend
method with read_raw_ref, movin
Nguyễn Thái Ngọc Duy writes:
> Intent-to-add entries are basically "I may want to commit these files
> later, but for now they are untracked". As such, when the user does "git
> reset --hard ", which removes i-t-a entries from the index, i-t-a
> entries in worktree should be kept as untracked.
On Wed, Feb 24, 2016 at 2:43 PM, Olga Pshenichnikova wrote:
> Hello,
> we use git in our project.
> What can be cause for further confusing behavior?
>
> git@ip5server:~$ git status
> On branch master
> Untracked files:
> (use "git add ..." to include in what will be committed)
>
Hello,
we use git in our project.
What can be cause for further confusing behavior?
git@ip5server:~$ git status
On branch master
Untracked files:
(use "git add ..." to include in what will be committed)
app/addons/arliteks/
nothing added to commit but untracked fil
Junio C Hamano writes:
> Johannes Schindelin writes:
>
>> diff --git a/t/t1308-config-set.sh b/t/t1308-config-set.sh
>> index 91235b7..f62409e 100755
>> --- a/t/t1308-config-set.sh
>> +++ b/t/t1308-config-set.sh
>> @@ -218,4 +218,13 @@ test_expect_success 'check line errors for malformed
>> val
Hey,
I know that running "git diff " when outside a git
project will result in a normal diff being run. I happen to prefer the
diff algorithm and diff output of "git diff" but there does not seem
to be a way to have this behavior from within a git tree.
Is there a way to pass an option to git-di
1 - 100 of 153 matches
Mail list logo