Hello. I´m postgraduate student in distributed computing and I'm searching on
git.
I would like to know is there any website where I can find the main components
and connectors of the architecture of GIT. Is there any website where I can
find components-connector view point.
I appreciate any h
In order to make sure the cloned repository is good, we run "rev-list
--objects --not --all $new_refs" on the repository. This is expensive
on large repositories. This patch attempts to mitigate the impact in
this special case.
In the "good" clone case, we only have one pack. If all of the
followi
index-pack --strict looks up and follows parent commits. If shallow
information is not ready by the time index-pack is run, index-pack may
be led to non-existent objects. Make fetch-pack save shallow file to
disk before invoking index-pack.
git learns new global option --shallow-file to pass on th
Signed-off-by: Nguyễn Thái Ngọc Duy
Signed-off-by: Junio C Hamano
---
builtin/index-pack.c | 3 +--
1 file changed, 1 insertion(+), 2 deletions(-)
diff --git a/builtin/index-pack.c b/builtin/index-pack.c
index 79dfe47..f52a04f 100644
--- a/builtin/index-pack.c
+++ b/builtin/index-pack.c
@@ -747
This addresses the comments from Junio and Eric in v3 [1].
[1] http://thread.gmane.org/gmane.comp.version-control.git/219611/focus=223584
Nguyễn Thái Ngọc Duy (4):
clone: let the user know when check_everything_connected is run
fetch-pack: prepare updated shallow file before fetching the pack
check_everything_connected could take a long time, especially in the
clone case where the whole DAG is traversed. The user deserves to know
what's going on.
Signed-off-by: Nguyễn Thái Ngọc Duy
Signed-off-by: Junio C Hamano
---
builtin/clone.c | 4
1 file changed, 4 insertions(+)
diff --gi
On Tue, May 7, 2013 at 10:59 PM, Junio C Hamano wrote:
>> if (args->depth > 0) {
>> + struct stat st;
>> + if (!fstat(shallow_lock.fd, &st) &&
>> + st.st_size == 0) {
>> + unlink_or_warn(git_path("shallow"));
>
> Are we unlinking th
2013/5/22 Michael Haggerty :
> Sorry for coming late to the party.
I am on a business travel, and respond late also. ;-)
>
> On 05/22/2013 03:40 AM, Jiang Xin wrote:
>> Different results for relative_path() before and after this refactor:
>>
>> abs path base path relative (original) relati
If an empty message is specified with the option -m of git commit then
the editor is started. That's unexpected and unnecessary. Instead of
using the length of the message string for checking if the user
specified one, directly remember if the option -m was given.
Reported-by: Mislav Marohnić
S
Hello,
it seems that `git clone` does not understand keywords used `insteadOf`
longer URLs.
$ git clone remote-repo/ProjectA.git
fatal repository 'remote-repo/ProjectA.git' does not exist
I suppose that git interprets the argument as a local directory. Git
should see if the argument
---
Documentation/diff-options.txt | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/Documentation/diff-options.txt b/Documentation/diff-options.txt
index 104579d..b8a9b86 100644
--- a/Documentation/diff-options.txt
+++ b/Documentation/diff-options.txt
@@ -480,7 +480,7 @@ endif::
On 05/24/2013 08:12 PM, Junio C Hamano wrote:
> Michael Haggerty writes:
>
>> Now assume a slightly more complicated situation, in which master has
>> been merged to feature branch at some point:
>>
>> o - 0 - 1 - 2 - 3 - 4← master
>> \ \
>> A - B - C - D ← branch
>>
Commit a24a41ea9a928ccde2db074ab0835c4817223c9d introduces a bug which is still
present in latest master.
This command
git commit -m "" --allow-empty --allow-empty-message
should create an empty commit with an empty message and never open a text
editor for the commit message. Since the ch
[Junio, sorry for the dup; somehow I failed to CC the first version to
the mailing list.]
On 05/23/2013 07:20 PM, Junio C Hamano wrote:
> Michael Haggerty writes:
>
>> It seems to me that
>>
>> git rev-list --first-parent --ancestry-path A..B
>>
>> is well-defined and should list the commit
John Keeping wrote:
> Section 6.7.9 of the C11 standard says:
>
> If an object that has automatic storage duration is not initialized
> explicitly, its value is indeterminate.
Ah, thanks. I'll initialize it to an empty string.
>> More importantly, aren't there numerous instances of this
On Sat, May 25, 2013 at 1:50 PM, Ramkumar Ramachandra
wrote:
> Antoine Pelisse wrote:
>> Is it not possible for "color" to be used uninitialized here ?
>
> My compiler didn't complain; what am I missing? Doesn't the
> declaration char color[COLOR_MAXLEN]; initialize an empty string?
As John said
On Sat, May 25, 2013 at 05:20:29PM +0530, Ramkumar Ramachandra wrote:
> Antoine Pelisse wrote:
> > Is it not possible for "color" to be used uninitialized here ?
>
> My compiler didn't complain; what am I missing? Doesn't the
> declaration char color[COLOR_MAXLEN]; initialize an empty string?
Wh
On Fri, May 24, 2013 at 02:15:55PM -0700, Junio C Hamano wrote:
> * jk/submodule-subdirectory-ok (2013-04-24) 3 commits
> (merged to 'next' on 2013-04-24 at 6306b29)
> + submodule: fix quoting in relative_path()
> (merged to 'next' on 2013-04-22 at f211e25)
> + submodule: drop the top-level r
David Aguilar wrote:
> Can you please also update Documentation/?
Yeah, will do in the re-roll. Duy is bringing in pretty-formats.
We'll probably need a separate document called pretty-ref-formats or
some such thing.
--
To unsubscribe from this list: send the line "unsubscribe git" in
the body of
Antoine Pelisse wrote:
> Is it not possible for "color" to be used uninitialized here ?
My compiler didn't complain; what am I missing? Doesn't the
declaration char color[COLOR_MAXLEN]; initialize an empty string?
More importantly, aren't there numerous instances of this in the
codebase?
--
To un
Duy Nguyen wrote:
> Ram, fetch the url above again. Its tip now is 5b4aa27 (for-each-ref:
> introduce format specifier %>(*) and %<(*) - 2013-05-25). Those
> changes make for-each-ref --format a superset of pretty. You can add
> new %(xxx) on top and resend the whole thing to the list for review.
>
Jonathan's patch would indeed be nice. In cgit, we are forced to do
ugly things like this:
/* Do not look in /etc/ for gitconfig and gitattributes. */
setenv("GIT_CONFIG_NOSYSTEM", "1", 1);
setenv("GIT_ATTR_NOSYSTEM", "1", 1);
/* We unset HOME and XDG_CONFIG_HOME b
On Sat, May 25, 2013 at 1:26 PM, Duy Nguyen wrote:
> On Sat, May 25, 2013 at 5:51 AM, Duy Nguyen wrote:
>> I just had an idea that might bring pretty stuff to for-each-ref with
>> probably reasonable effort, making for-each-ref format a superset of
>> pretty. But I need to clean up my backlog fir
At first glance the OBJ_COMMIT, OBJ_TREE, and OBJ_BLOB cases look like
they might be mutually exclusive. But the OBJ_COMMIT case doesn't end
the loop iteration with "continue" like the other two cases, but
rather falls through. So use if...else if...else construct to make it
more obvious that onl
Signed-off-by: Michael Haggerty
---
revision.c | 20 ++--
revision.h | 32 +---
2 files changed, 35 insertions(+), 17 deletions(-)
diff --git a/revision.c b/revision.c
index 25e424c..8ac88d6 100644
--- a/revision.c
+++ b/revision.c
@@ -70,7 +70,8 @@ s
Add a function that allows unwanted entries in an object_array to be
removed. This encapsulation is a step towards giving object_array
ownership of its entries' name memory.
Signed-off-by: Michael Haggerty
---
object.c | 16
object.h | 11 +++
2 files changed, 27 insert
No names are ever set for the object_array_entries in merges, so there
is no need to pretend to copy them to the result array.
Signed-off-by: Michael Haggerty
---
submodule.c | 3 +--
1 file changed, 1 insertion(+), 2 deletions(-)
diff --git a/submodule.c b/submodule.c
index b837c04..ad476ce 10
Since string_list_add_one_ref() adds refname to the string list, but
the lifetime of refname is limited, it is important that the
string_list passed to string_list_add_one_ref() has strdup_strings
set. Document this fact.
All current callers do the right thing.
Signed-off-by: Michael Haggerty
-
This is the usual convention.
Signed-off-by: Michael Haggerty
---
notes.c | 6 +++---
1 file changed, 3 insertions(+), 3 deletions(-)
diff --git a/notes.c b/notes.c
index f63fd57..fa7cdf7 100644
--- a/notes.c
+++ b/notes.c
@@ -918,12 +918,12 @@ out:
return ret;
}
-static int string_l
This is the usual convention.
Signed-off-by: Michael Haggerty
---
http-backend.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/http-backend.c b/http-backend.c
index 3135835..0324417 100644
--- a/http-backend.c
+++ b/http-backend.c
@@ -410,14 +410,14 @@ static void get_i
The source of this nonsense was
04d3975937 fsck: reduce stack footprint
, which wedged a pointer to parent into the object_array_entry's name
field. The parent pointer was passed to traverse_one_object(), even
though that function *didn't use it*.
The useless code has been deleted over time
Previously, the memory management of the object_array_entry::name
field was inconsistent and undocumented. object_array_entries are
ultimately created by a single function, add_object_array_with_mode(),
which has an argument "const char *name". This function used to
simply set the name field to r
Signed-off-by: Michael Haggerty
---
submodule.c | 3 +--
1 file changed, 1 insertion(+), 2 deletions(-)
diff --git a/submodule.c b/submodule.c
index e728025..b837c04 100644
--- a/submodule.c
+++ b/submodule.c
@@ -846,7 +846,7 @@ static int find_first_merges(struct object_array *result,
const c
Instead of accepting an array and using exactly two elements from the
array, take two single (struct object_array_entry *) arguments.
Signed-off-by: Michael Haggerty
---
builtin/diff.c | 19 ++-
1 file changed, 10 insertions(+), 9 deletions(-)
diff --git a/builtin/diff.c b/built
Change cmd_diff() to use a (struct object_array) for holding the trees
that it accumulates, rather than rolling its own equivalent.
Incidentally, this change removes a hard-coded limit of 100 trees in
combined diff, not that it matters in practice.
Signed-off-by: Michael Haggerty
---
builtin/di
Instead of assuming that the memory pointed to by the name argument
will live forever, make a local copy of it before storing it in the
ref_cmdline_info.
Signed-off-by: Michael Haggerty
---
revision.c | 6 +-
1 file changed, 5 insertions(+), 1 deletion(-)
diff --git a/revision.c b/revision.
Do not retain references to refnames passed to the each_ref_fn
callback add_existing(), because their lifetime is not guaranteed.
Signed-off-by: Michael Haggerty
---
builtin/fetch.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/builtin/fetch.c b/builtin/fetch.c
index 4b
The lifetime of the memory pointed to by the refname and sha1
arguments to each_ref_fn was never documented, but some callers used
to assume that it was essentially permanent. In fact the API does
*not* guarantee that these objects live beyond a single callback
invocation.
In the current code, th
The each_ref_fn add_existing() adds refnames to the existing_refs
list. But the lifetimes of these refnames is not guaranteed by the
refs API, so configure the string_list to make copies as it adds them.
Signed-off-by: Michael Haggerty
---
builtin/show-ref.c | 2 +-
1 file changed, 1 insertion(
The lifetime of the sha1 parameter passed to an each_ref_fn callback
is not guaranteed, so make a copy for later use.
Signed-off-by: Michael Haggerty
---
bisect.c | 5 +++--
1 file changed, 3 insertions(+), 2 deletions(-)
diff --git a/bisect.c b/bisect.c
index 374d9e2..71c1958 100644
--- a/bise
Its lifetime is not guaranteed, so make a copy. Free the memory when
the string_list is cleared.
Signed-off-by: Michael Haggerty
---
builtin/fetch.c | 7 ---
1 file changed, 4 insertions(+), 3 deletions(-)
diff --git a/builtin/fetch.c b/builtin/fetch.c
index 48df5fa..fa6fe44 100644
--- a/b
Signed-off-by: Michael Haggerty
---
http-backend.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/http-backend.c b/http-backend.c
index 6b85ffa..3135835 100644
--- a/http-backend.c
+++ b/http-backend.c
@@ -416,8 +416,8 @@ static int show_head_ref(const char *name, const
Signed-off-by: Michael Haggerty
---
builtin/fetch.c | 14 +-
1 file changed, 9 insertions(+), 5 deletions(-)
diff --git a/builtin/fetch.c b/builtin/fetch.c
index 80c6e37..48df5fa 100644
--- a/builtin/fetch.c
+++ b/builtin/fetch.c
@@ -697,6 +697,7 @@ static int do_fetch(struct transp
Signed-off-by: Michael Haggerty
---
builtin/fetch.c | 6 +++---
1 file changed, 3 insertions(+), 3 deletions(-)
diff --git a/builtin/fetch.c b/builtin/fetch.c
index f949115..80c6e37 100644
--- a/builtin/fetch.c
+++ b/builtin/fetch.c
@@ -694,7 +694,6 @@ static int do_fetch(struct transport *tran
Use object_array_filter(), which will soon be made smarter about
cleaning up discarded entries properly. Also add a function comment.
Signed-off-by: Michael Haggerty
---
This version changes the test to "nr == alloc" for clarity, but
doesn't move the test to the caller as did v1 of the patch se
The old version copied one entry to its destination position, then
deleted any matching entries from the tail of the array. This
required the tail of the array to be copied multiple times. It didn't
affect the complexity of the algorithm because the whole tail has to
be searched through anyway.
Do not retain a reference to the refname passed to the each_ref_fn
callback get_name(), because there is no guarantee of the lifetimes of
these names. Instead, make a local copy when needed.
Signed-off-by: Michael Haggerty
---
builtin/describe.c | 6 --
1 file changed, 4 insertions(+), 2 de
It's not a list, it's an array entry.
Signed-off-by: Michael Haggerty
---
builtin/diff.c | 8
1 file changed, 4 insertions(+), 4 deletions(-)
diff --git a/builtin/diff.c b/builtin/diff.c
index 661fdde..84243d9 100644
--- a/builtin/diff.c
+++ b/builtin/diff.c
@@ -339,9 +339,9 @@ int cmd
This is version two of the patch series. Aside from addressing
Junio's comments about the first version, it goes significantly
further than v1:
I did a manual audit of the 50 (!) functions that are used as an
each_ref_fn callback to the for_each_ref()-style functions. (I hope I
haven't missed an
49 matches
Mail list logo