Stephen & Linda Smith writes:
> I will rework the patch using the above analysis in the commit message. Of
> course I will rewrite for readability.
Thanks. Will apply.
--
To unsubscribe from this list: send the line "unsubscribe git" in
the body of a message to
Hi,
My name is Jeffrey Skoll, a philanthropist and the founder of one of the
largest private foundations in the world. I believe strongly in ‘giving while
living.’ I had one idea that never changed in my mind — that you should use
your wealth to help people and I have decided to secretly give
I am having an issue where the default commit message is not changed
when adding staged files in a pre-commit hook.
Please see
http://stackoverflow.com/questions/34492779/git-update-git-status-part-of-commit-message-after-pre-commit-hook
for details.
Is there a workaround / proper way to achieve
git describe currently only supports glob matching with the --matches flag.
It would be useful to support regular expressions.
For consistency, this uses the same regex flags as those used by git-grep.
Some old discussion of this as a candidate feature is here, though nobody put
together a patch
Signed-off-by: Mostyn Bramley-Moore
---
Documentation/git-describe.txt | 6 ++
builtin/describe.c | 41 +
t/t6120-describe.sh| 14 ++
3 files changed, 61 insertions(+)
diff --git
This allows more flexible pattern matching than the default globs.
Signed-off-by: Mostyn Bramley-Moore
---
Documentation/git-describe.txt | 15 +--
builtin/describe.c | 90 +-
t/README | 3 +-
On 12/20/2015 08:29 AM, Jeff King wrote:
> Once upon a time, create_symref() was used only to point
> HEAD at a branch name, and the variable names reflect that
> (e.g., calling the path git_HEAD). However, it is much more
> generic these days (and has been for some time). Let's
> update the
On 12/20/2015 08:34 AM, Jeff King wrote:
> The create_symref() function predates the existence of
> "struct lock_file", let alone the more recent "struct
> ref_lock". Instead, it just does its own manual dot-locking.
> Besides being more code, this has a few downsides:
>
> - if git is
Stephen & Linda Smith writes:
> I think that this is a stale todo.
>
> The only place there is a mention of temporary branches (which is
> then parenthetically called a topic branch) is in relation to how
> Tony Luck organizes his work. Additionally there is already a
>
Nguyễn Thái Ngọc Duy writes:
> That "someday" in the comment happened two years later in
> b65982b (Optimize "diff-index --cached" using cache-tree - 2009-05-20)
>
> Signed-off-by: Nguyễn Thái Ngọc Duy
> ---
Thanks.
> builtin/blame.c | 5 -
> 1 file
From: Jacob Keller
Create a new expansion function, expand_loose_notes_ref which will first
check whether the ref can be found using get_sha1. If it can't be found
then it will fallback to using expand_notes_ref. The content of the
strbuf will not be changed if the notes
Hi Junio,
The following changes since commit 1d88dab47aaa32d134b9bfe1cda09f1b55528b24:
Update release notes to 2.7 (2015-12-21 11:08:20 -0800)
are available in the git repository at:
git://github.com/git-l10n/git-po tags/l10n-2.7.0-rnd2
for you to fetch changes up to
Looks good; thanks.
--
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 http://vger.kernel.org/majordomo-info.html
Eric Wong writes:
> - # commas delimit multiple addresses
> - $aliases{$alias} = [ split_addrs($addr) ];
> + # commas delimit multiple addresses
> + my @addr = split_addrs($addr);
> +
> +
"Stephen P. Smith" writes:
> Rather than merely pointing readers at the 1.5 release notes to
> learn about shallow clones, document them formally.
>
> Signed-off-by: Stephen P. Smith
> ---
>
> I replaced the paragraphs that I wrote with Eric Shunshine's since
Nguyễn Thái Ngọc Duy writes:
> diff --git a/t/t2203-add-intent.sh b/t/t2203-add-intent.sh
> index bb5ef2b..96c8755 100755
> --- a/t/t2203-add-intent.sh
> +++ b/t/t2203-add-intent.sh
> @@ -95,5 +95,21 @@ test_expect_success 'apply adds new file on i-t-a entry' '
> )
> '
This one looks correct.
I'll pick the obviously correct pieces (1, 2, and 6) from this
series, as they are pretty-much independent, and discard the rest
for now.
Thanks.
--
To unsubscribe from this list: send the line "unsubscribe git" in
the body of a message to majord...@vger.kernel.org
More
Nguyễn Thái Ngọc Duy writes:
> Make sure "el" can be reuseable again. The problem was el->alloc is
> not cleared and may cause segfaults next time because add_exclude()
> thinks el->excludes (being NULL) has enough space. Just clear the
> entire struct to be safe.
OK.
If
Mostyn Bramley-Moore writes:
> git describe currently only supports glob matching with the --matches flag.
> It would be useful to support regular expressions.
>
> For consistency, this uses the same regex flags as those used by git-grep.
>
> Some old discussion of this as a
In the section on "How to check out a differnet version of a project"
the "new" branch is used as a temporary branch.
A detached HEAD was not used since it was a new feature introduced
just a couple weeks prior.
The section could be changed to use and explain a detached HEAD,
except that would
On Monday, December 28, 2015 09:29:13 AM Junio C Hamano wrote:
> Stephen & Linda Smith writes:
>
> > I think that this is a stale todo.
> >
> > The only place there is a mention of temporary branches (which is
> > then parenthetically called a topic branch) is in relation
Hi Ralf,
#: builtin/submodule--helper.c:273
msgid "fatal: submodule--helper subcommand must be called with a subcommand"
-msgstr ""
+msgstr "fatal: submodule-helper muss mit einem Unterkommando aufgerufen werden"
#: builtin/submodule--helper.c:280
#, c-format
msgid "fatal: '%s' is
Nguyễn Thái Ngọc Duy writes:
> diff --git a/builtin/checkout-index.c b/builtin/checkout-index.c
> index 9ca2da1..d9fe8f4 100644
> --- a/builtin/checkout-index.c
> +++ b/builtin/checkout-index.c
> @@ -48,6 +48,7 @@ static int checkout_file(const char *name, const char
>
Junio C Hamano wrote:
> Eric Wong writes:
>
> > -# commas delimit multiple addresses
> > - $aliases{$alias} = [ split_addrs($addr) ];
> > + # commas delimit multiple addresses
> > +
On Mon, Dec 28, 2015 at 09:20:42AM +0100, Michael Haggerty wrote:
> On 12/20/2015 08:29 AM, Jeff King wrote:
> > Once upon a time, create_symref() was used only to point
> > HEAD at a branch name, and the variable names reflect that
> > (e.g., calling the path git_HEAD). However, it is much more
On Tue, Dec 29, 2015 at 01:00:55AM -0500, Jeff King wrote:
> --- a/refs/files-backend.c
> +++ b/refs/files-backend.c
> @@ -2811,21 +2811,6 @@ static int commit_ref_update(struct ref_lock *lock,
> return 0;
> }
>
> -static int create_ref_symlink(struct ref_lock *lock, const char *target)
On Mon, Dec 28, 2015 at 3:42 PM, Junio C Hamano wrote:
> Jacob Keller writes:
>
>> From: Jacob Keller
>>
>> Create a new expansion function, expand_loose_notes_ref which will first
>> check whether the ref can be found using
On Mon, Dec 28, 2015 at 10:45:19AM +0100, Michael Haggerty wrote:
> > +static int create_ref_symlink(struct ref_lock *lock, const char *target)
> [...]
> > + char *ref_path = get_locked_file_path(lock->lk);
> > + unlink(ref_path);
> > + ret = symlink(target, ref_path);
> [...]
>
> This
I'm iffy on this one, just because it drops a user-visible feature with
no deprecation. For the reasons given below, I doubt anybody is using it
for the original intended purpose, but maybe there is some crazy person
whose workflow revolves around core.preferSymlinkRefs.
A conservative choice
The create_symref() function predates the existence of
"struct lock_file", let alone the more recent "struct
ref_lock". Instead, it just does its own manual dot-locking.
Besides being more code, this has a few downsides:
- if git is interrupted while holding the lock, we don't
clean up the
We generally hold a lock on the matching ref while writing
to its reflog; this prevents two simultaneous writers from
clobbering each other's reflog lines (it does not even have
to be two symref updates; because we don't hold the lock, we
could race with somebody writing to the pointed-to ref via
On Tue, Dec 29, 2015 at 12:02:30AM -0500, Jeff King wrote:
> Given that using symlinks is only
> triggered by an undocumented (!) option that presumably very few people
> use, I'm inclined to leave it as-is.
Sorry, I am wrong here. We do document core.preferSymlinkRefs. I missed
it because my
On Sun, Dec 20, 2015 at 02:26:37AM -0500, Jeff King wrote:
> I noticed that an interrupt "git symbolic-ref" will not clean up
> "HEAD.lock". So I started this series as an attempt to convert
> create_symref() to "struct lock_file" to get the usual tempfile cleanup.
Here's version 2, based on
Once upon a time, create_symref() was used only to point
HEAD at a branch name, and the variable names reflect that
(e.g., calling the path git_HEAD). However, it is much more
generic these days (and has been for some time). Let's
update the variable names to make it easier to follow:
-
Jacob Keller writes:
> From: Jacob Keller
>
> Create a new expansion function, expand_loose_notes_ref which will first
> check whether the ref can be found using get_sha1. If it can't be found
> then it will fallback to using expand_notes_ref.
A release candidate Git v2.7.0-rc3 is now available for testing at
the usual places; the changes relative to -rc2 is mostly the
translation updates. Big thanks to the i18n/l10n teams.
The tarballs are found at:
https://www.kernel.org/pub/software/scm/git/testing/
The following public
On 12/28/2015 09:30 PM, Junio C Hamano wrote:
Mostyn Bramley-Moore writes:
git describe currently only supports glob matching with the --matches flag.
It would be useful to support regular expressions.
For consistency, this uses the same regex flags as those used by
Here are the topics that have been cooking. Commits prefixed with
'-' are only in 'pu' (proposed updates) while commits prefixed with
'+' are in 'next'. The ones marked with '.' do not appear in any of
the integration branches, but I am still holding onto them.
v2.7.0-rc3, hopefully the last
On Monday, December 28, 2015 02:57:47 PM Junio C Hamano wrote:
> "Stephen P. Smith" writes:
>
> > Rather than merely pointing readers at the 1.5 release notes to
> > learn about shallow clones, document them formally.
> >
> > Signed-off-by: Stephen P. Smith
> >
On Tue, Dec 29, 2015 at 1:36 AM, Jeff King wrote:
> The byte-swapping code automatically decides, based on the
> platform, whether it is sensible to cast an do a potentially
s/an/and/ or something?
> unaligned ntohl(), or to pick individual bytes out of an
> array.
>
> It can be
Signed-off-by: Christian Couder
---
builtin/update-index.c | 1 +
1 file changed, 1 insertion(+)
diff --git a/builtin/update-index.c b/builtin/update-index.c
index 7431938..a6fff87 100644
--- a/builtin/update-index.c
+++ b/builtin/update-index.c
@@ -1123,6 +1123,7 @@
Signed-off-by: Christian Couder
---
t/t7063-status-untracked-cache.sh | 75 ---
1 file changed, 71 insertions(+), 4 deletions(-)
diff --git a/t/t7063-status-untracked-cache.sh
b/t/t7063-status-untracked-cache.sh
index
When we know that mtime is fully supported by the environment, we
might want the untracked cache to be always used by default without
any mtime test or kernel version check being performed.
Also when we know that mtime is not supported by the environment,
for example because the repo is shared
It is not a good idea to compare kernel versions and disable
the untracked cache if it changes as people may upgrade and
still want the untracked cache to work. So let's just
compare work tree locations to decide if we should disable
it.
Also it's not useful to store many locations in the ident
Here is a new version of a patch series to improve the untracked cache
feature.
This v4 implements core.untrackedCache as a tristate config
variable. When it's `true`, Git commands, especially `git status`,
should always add the untracked cache and use it, and when `false`,
Git commands should
It is nice to just be able to test if untracked cache is
supported without enabling it.
Signed-off-by: Christian Couder
---
Documentation/git-update-index.txt | 12 +++-
builtin/update-index.c | 5 +
2 files changed, 16 insertions(+), 1
Some sites that otherwise would use skip_prefix cannot do
so, because it has no way to do case-insensitive
comparisons. Such sites usually get around this by using
strncasecmp, at the cost of having to use magic numbers.
We can help them by providing a case-insensitive version of
skip_prefix.
Because we must match both "Author" and "author" here, we
could not use skip_prefix, and had to hand-code a partial
case-insensitive match. Now that we have skip_prefix_case,
we can use it. This is technically more liberal in what it
matches (e.g., it will match AUTHOR), but in this particular
We currently use fixed-size buffers with fgets(), which
could lead to incorrect results in the unlikely event that a
line had something like "Author:" at exactly its 1024th
character.
But it's easy to convert this to a strbuf, and because we
can reuse the same buffer through the loop, we don't
This is in preparation for shortlog counting more things
than just authors. Breaking it out into a separate patch
keeps the noise down when the real changes come.
Signed-off-by: Jeff King
---
builtin/shortlog.c | 22 +++---
1 file changed, 11 insertions(+), 11
If we are in "--summary" mode, then we do not care about the
actual list of subject onelines associated with each author.
We care only about the number. So rather than store a
string-list for each author full of "", let's just
keep a count.
This drops my best-of-five for "git shortlog -ns HEAD"
Shortlog always groups commits by the author field. It can
be interesting to group by other fields, as well. The
obvious other identity in each commit is the committer
field. This might be interesting if your project follows a
workflow where committers and authors are not the same and
where there
The only entry point into the trailer.c code is
process_trailers, which initializes itself by reading the
trailer config. Let's pull that out into a separate function
and protect it with a lazy-initialization flag. That will
let us easily add new entry points in future patches.
Signed-off-by:
A few comments on my own patch...
On Tue, Dec 29, 2015 at 02:38:32AM -0500, Jeff King wrote:
> If a project uses commit trailers, this patch lets you use
> shortlog to see who is performing each action. For example,
> running:
>
> git shortlog -ns --ident=reviewed-by
So obviously you can do
I was playing around with the new-ish "-fsanitize=undefined" compiler
flag, and it detected a few problems:
1. We sometimes bit-shift signed constants too far (fixed by the first
patch).
2. We have some unaligned memory accesses that presumably work OK on
x86, but would blow up on
The byte-swapping code automatically decides, based on the
platform, whether it is sensible to cast an do a potentially
unaligned ntohl(), or to pick individual bytes out of an
array.
It can be handy to override this decision, though, when
turning on compiler flags that will complain about
We sometimes use 32-bit unsigned integers as bit-fields.
It's fine to access the MSB, because it's unsigned. However,
doing so as "1 << 31" is wrong, because the constant "1" is
a signed int, and we shift into the sign bit, causing
undefined behavior.
We can fix this by using "1U" as the
On Tue, Dec 29, 2015 at 01:34:49AM -0500, Jeff King wrote:
> 2. We have some unaligned memory accesses that presumably work OK on
> x86, but would blow up on ARM or other platforms (I didn't test).
>
> The latter looks like it's in the untracked cache code (Duy and
> Christian cc'd).
On Tue, Dec 29, 2015 at 01:42:45AM -0500, Eric Sunshine wrote:
> On Tue, Dec 29, 2015 at 1:36 AM, Jeff King wrote:
> > The byte-swapping code automatically decides, based on the
> > platform, whether it is sensible to cast an do a potentially
>
> s/an/and/ or something?
Yes, it
Factor out code into remove_untracked_cache(), which will be used
in a later commit.
Signed-off-by: Christian Couder
---
builtin/update-index.c | 6 +-
dir.c | 9 +
dir.h | 1 +
3 files changed, 11 insertions(+), 5
Signed-off-by: Christian Couder
---
builtin/update-index.c | 18 +-
1 file changed, 13 insertions(+), 5 deletions(-)
diff --git a/builtin/update-index.c b/builtin/update-index.c
index a6fff87..1e546a3 100644
--- a/builtin/update-index.c
+++
Factor out code into new_untracked_cache() and
add_untracked_cache(), which will be used
in later commits.
Signed-off-by: Christian Couder
---
builtin/update-index.c | 11 +--
dir.c | 18 ++
dir.h | 1 +
3 files
Attempting to flip the untracked-cache feature on for a random index
file with
cd /random/unrelated/place
git --git-dir=/somewhere/else/.git update-index --untracked-cache
would not work as you might expect. Because flipping the feature on
in the index also records the location of the
Signed-off-by: Christian Couder
---
builtin/update-index.c | 4 +---
1 file changed, 1 insertion(+), 3 deletions(-)
diff --git a/builtin/update-index.c b/builtin/update-index.c
index 369c207..fe7aaa3 100644
--- a/builtin/update-index.c
+++ b/builtin/update-index.c
@@
We have several inline string helpers (skip_prefix, etc)
defined in git-compat-util.h. This is convenient, as it
makes them available everywhere, but this is probably not
the best place for them. Besides cluttering a file which is
otherwise mostly about compatibility issues, defining inline
I happened to be reading an old discussion on trailers a few weeks ago,
and the idea was mentioned of providing access to commit trailers in a
more structured way from traversal commands. E.g., we could presumably
have a log pretty-format for showing "Signed-off-by", like
We want to chomp newlines off the end of the "value" string.
But because it's const, we must track its length rather than
writing a NUL. This leads to us having to tweak that length
later, to account for moving the pointer forward.
Since we are about to create a copy of it anyway, let's just
wait
If the user asked us only to show counts for each author,
rather than the individual summary lines, then there is no
point in us generating the summaries only to throw them
away. With this patch, I measured the following speedup for
"git shortlog -ns HEAD" on linux.git (best-of-five):
[before]
If we are in --summary mode, we will always pass to
insert_one_record, which will then do some normalization
(e.g., cutting out "[PATCH]"). There's no point in doing so
if we aren't going to use the result anyway.
This drops my best-of-five for "git shortlog -ns HEAD" on
linux.git from:
real
When gathering the author and oneline subject for each
commit, we hand-parse the commit headers to find the
"author" line, and then continue past to the blank line at
the end of the header.
We can replace this tricky hand-parsing by simply asking the
pretty-printer for the relevant items. This
The git-trailer command and its subfunctions work in only
one way: they take a set of trailer operations, and pass
through a file while performing those operations on it.
However, other parts of the system may want to simply parse
trailers, and we should be able to reuse the code here. This
patch
If a project uses commit trailers, this patch lets you use
shortlog to see who is performing each action. For example,
running:
git shortlog -ns --ident=reviewed-by
in git.git shows who has reviewed. You can even use a custom
format to see things like who has helped whom:
git shortlog
On Thu, Dec 24, 2015 at 09:20:38AM +, Alan Mackenzie wrote:
> > It seems to be a side effect of merge-recursive to stage the results,
> > and in the no-conflict path we explicitly reset the index. For the
> > conflicting case, it's trickier, because we would want to retain the
> > unmerged
73 matches
Mail list logo