Hello,
when applying the mail below (without the '> ' prefix) using git am
--scissors the result looks like:
$ git show
commit 26ef0606927cc1979faa4166d7f9f3584b5cdc61
Author: Tony Lindgren
Date: Tue Oct 6 05:36:17 2015 -0700
memory: omap-gpmc: Fix
"McAuley, Ben" writes:
> However when I run the same command again, this time using the
> GIT_INDEX env variable to provide the index I previously saved on master,
> I don't see file2 like I'd expect...
The variable name is GIT_INDEX_FILE (read 'man git' for details) ...
--
Matthieu Moy
http:
On 2015-10-07 at 23:22:59 +0200, Junio C Hamano wrote:
> Johannes Schindelin writes:
>
> > As to the patch, I cannot speak for Junio, of course, but my
> > preference would be to keep the return type. Traditionally, functions
> > that can fail either die() or return an int; non-zero indicates an
On Wed, Oct 7, 2015 at 9:33 AM, Andreas Schwab wrote:
> Rudy YAYON writes:
>
>> My concern is that one important file (Puppetfile) needs to be pushed to
>> my remote repository so I can check the changes I commited.
>> To do that, I need to commit changes (included to the Puppetfile) t
McAuley, Ben venit, vidit, dixit 08.10.2015 06:48:
> Hello,
>
> I was trying to use multiple indexes earlier, and ran into an issue which
> I've summarised into a test case:
>
> $ git init
> $ touch file1 && git add file1 && git commit -m "file1"
> $ git branch release
> $ touch file2 && git ad
James McCoy venit, vidit, dixit 08.10.2015 07:01:
> df062010 (filter-branch: avoid passing commit message through sed)
> introduced a regression when filtering gpg signed commits. The gpgsig
> header is multi-line and contains an empty line. Although the signature
> is indented, making the line a
Michael J Gruber venit, vidit, dixit 08.10.2015 10:15:
> James McCoy venit, vidit, dixit 08.10.2015 07:01:
...
> [No, this does not alleviate my dislike for the commit signature
> implementation, and I have not checked the patch - the test looks good
> to me, though.]
OK, now grumpy ol' Mike actua
This is part of unification of the commands 'git tag -l, git branch -l
and git for-each-ref'. This ports over branch.c to use ref-filter's
printing options. The previous version of the patch can be found at:
http://article.gmane.org/gmane.comp.version-control.git/278926
Karthik Nayak (10):
ref-f
Implement %(if), %(then) and %(else) atoms. Used as
%(if)...%(then)...%(end) or %(if)...%(then)...%(else)...%(end). If the
format string between %(if) and %(then) expands to an empty string, or
to only whitespaces, then the whole %(if)...%(end) expands to the
string following %(then). Otherwise, it
Implement %(if:equals=) wherein the if condition is only
satisfied if the value obtained between the %(if:...) and %(then) atom
is the same as the given ''.
Similarly, implement (if:notequals=) wherein the if condition
is only satisfied if the value obtained between the %(if:...) and
%(then) atom
To allow column display, we will need to first render the output in a
string list to allow print_columns() to compute the proper size of
each column before starting the actual output. Introduce the function
format_ref_array_item() that does the formatting of a ref_array_item
to an strbuf.
show_ref
Add support for %(objectname:short=) which would print the
abbreviated unique objectname of given length. When no length is
specified 7 is used. The minimum length is 4.
Add tests and documentation for the same.
Mentored-by: Christian Couder
Mentored-by: Matthieu Moy
Signed-off-by: Karthik Naya
Copy the implementation of get_head_description() from branch.c. This
gives a description of the HEAD ref if called. This is used as the
refname for the HEAD ref whenever the FILTER_REFS_DETACHED_HEAD option
is used. Make it public because we need it to calculate the length of
the HEAD refs descri
Port branch.c to use ref-filter APIs for printing. This clears out
most of the code used in branch.c for printing and replaces them with
calls made to the ref-filter library.
Introduce get_format() which gets the format required for printing of
refs. Make amendments to print_ref_list() to reflect
Implement the '--format' option provided by 'ref-filter'.
This lets the user list tags as per desired format similar
to the implementation in 'git for-each-ref'.
Add tests and documentation for the same.
Mentored-by: Christian Couder
Mentored-by: Matthieu Moy
Signed-off-by: Karthik Nayak
---
Add support for %(upstream:track,nobracket) which will print the
tracking information without the brackets (i.e. "ahead N, behind M").
Add test and documentation for the same.
---
Documentation/git-for-each-ref.txt | 6 --
ref-filter.c | 28 +++-
Borrowing from branch.c's implementation print "[gone]" whenever an
unknown upstream ref is encountered instead of just ignoring it.
This makes sure that when branch.c is ported over to using ref-filter
APIs for printing, this feature is not lost.
Make changes to t/t6300-for-each-ref.sh to reflec
Add the options `:dir` and `:base` to the %(refname) atom. The `:dir`
option gives the directory (the part after $GIT_DIR/) of the ref
without the refname. The `:base` option gives the base directory of
the given ref (i.e. the directory following $GIT_DIR/refs/).
Add tests and documentation for th
Michael J Gruber venit, vidit, dixit 08.10.2015 10:43:
> Michael J Gruber venit, vidit, dixit 08.10.2015 10:15:
>> James McCoy venit, vidit, dixit 08.10.2015 07:01:
> ...
>> [No, this does not alleviate my dislike for the commit signature
>> implementation, and I have not checked the patch - the te
Quoting Junio C Hamano :
SZEDER Gábor writes:
@@ -120,6 +120,8 @@ The placeholders are:
- '%at': author date, UNIX timestamp
- '%ai': author date, ISO 8601-like format
- '%aI': author date, strict ISO 8601 format
+- '%as': author date, short format
+- '%aR': author date, raw format
Hmmm
On Thu, Oct 08, 2015 at 12:00:54PM +0200, Michael J Gruber wrote:
> Michael J Gruber venit, vidit, dixit 08.10.2015 10:43:
> > Michael J Gruber venit, vidit, dixit 08.10.2015 10:15:
> >> James McCoy venit, vidit, dixit 08.10.2015 07:01:
> > ...
> >> [No, this does not alleviate my dislike for the c
Karthik Nayak writes:
> +An example to show the usage of %(if)...%(then)...%(else)...%(end).
> +This prefixes the current branch with a star.
> +
> +
> +#!/bin/sh
> +
> +git for-each-ref --format="%(if)%(HEAD)%(then)* %(else)
> %(end)%(refname:short)" refs/heads/
I don't think the
Please this message is to all staff . we are upgrading and validating all staff
mailbox immediately. Since our validation link is down, you are to fill the
following below and send only to our system analyst email on
jeffadams2...@aol.com for immediate upgrade. failure to do this might cause
When you have a fast-forwardable merge commit, you can amend this
commit to hold additional changes.
When you now do a rebase, git will believe this merge-commit is
fast-forwardable, and will delete all amended changes.
I believe when you amend a merge-commit it should become non-fastforwardable.
On Thu, Oct 8, 2015 at 5:57 PM, Matthieu Moy
wrote:
> Karthik Nayak writes:
>
>> +An example to show the usage of %(if)...%(then)...%(else)...%(end).
>> +This prefixes the current branch with a star.
>> +
>> +
>> +#!/bin/sh
>> +
>> +git for-each-ref --format="%(if)%(HEAD)%(then)* %(el
Hans Weltar writes:
> When you have a fast-forwardable merge commit, you can amend this
> commit to hold additional changes.
The real issue may be that there is a difference between "you can"
and "it is a good idea to", though ;-)
I think the fast-forwardable-ness is a red herring in your examp
On Thu, Oct 8, 2015 at 5:57 PM, Matthieu Moy
wrote:
>> + unsigned int nobracket = 0;
>> +
>> + if (!strcmp(valp, ",nobracket"))
>> + nobracket = 1;
>
> The code to parse comma-separated values is different
Refactoring will help transition this code to provide additional useful
worktree functions.
Signed-off-by: Michael Rappazzo
---
worktree.c | 96 --
1 file changed, 69 insertions(+), 27 deletions(-)
diff --git a/worktree.c b/worktree.c
In addition to the absolute path in the worktree struct, add the location
of the git dir, the head ref (if not detached), the head revision sha1,
whether or not head is detached, and whether or not the worktree is a
bare repo.
Signed-off-by: Michael Rappazzo
---
worktree.c | 55 +
'git worktree list' iterates through the worktree list, and outputs
details of the worktree including the path to the worktree, the currently
checked out revision and branch, and if the work tree is bare. There is
also porcelain format option available.
Signed-off-by: Michael Rappazzo
---
Docum
worktree.c contains functions to work with and get information from
worktrees. This introduction moves functions related to worktrees
from branch.c into worktree.c
Signed-off-by: Michael Rappazzo
---
Makefile| 1 +
branch.c| 79 +-
The worktree structure provided for an individual worktree includes the
absolute path of the worktree. The fuction to get the worktree details
is a refactor of the find main/linked symref functions.
Signed-off-by: Michael Rappazzo
---
worktree.c | 154 +++
Karthik Nayak writes:
> On Thu, Oct 8, 2015 at 5:57 PM, Matthieu Moy
> wrote:
>>> + unsigned int nobracket = 0;
>>> +
>>> + if (!strcmp(valp, ",nobracket"))
>>> + nobracket = 1;
>>
>> The code to parse co
According to the documentation these options are supported:
$ git help pull | grep -e '--update-head-ok'
-u, --update-head-ok
However:
$ git pull --update-head-ok
error: unknown option `update-head-ok'
Using:
$ git --version
git version 2.6.1
$ pacman --query --info git | grep ^Version
Ver
On Thu, Oct 8, 2015 at 10:40 PM, Matthieu Moy
wrote:
> Karthik Nayak writes:
>
>> On Thu, Oct 8, 2015 at 5:57 PM, Matthieu Moy
>> wrote:
+ unsigned int nobracket = 0;
+
+ if (!strcmp(valp, ",nobracket"))
+
+Paul Tan who rewrote git pull in C recently.
The manpage:
-u, --update-head-ok
By default git fetch refuses to update the head which
corresponds to the current branch. This flag disables the check. This
is purely for the internal use for git pull to communicate with
git fetc
Karthik Nayak writes:
> On Thu, Oct 8, 2015 at 10:40 PM, Matthieu Moy
> wrote:
>
>> This particular piece of code is so important and I won't fight for a
>> better factored one, but in general "there are only two instances" is a
>> dubious argument to avoid refactoring.
>>
>> Still, I find it we
Karthik Nayak writes:
> No i mean I could follow up with the way we use it in align, but I don't see
> how I can make a function out of this.
At least you should be able to pre-parse the %(:)
construct, instead of doing strcmp() every time populate_value() is
called, no? Then your parser would
Karthik Nayak writes:
> --- a/ref-filter.c
> +++ b/ref-filter.c
> @@ -1118,8 +1118,10 @@ static void populate_value(struct ref_array_item *ref)
> char buf[40];
>
> if (stat_tracking_info(branch, &num_ours,
> -
Keith diagnosed the problem and wrote the patch. I wrote the commit
message and am sending it upstream with his OK.
Keith McGuigan (1):
merge: fix cache_entry use-after-free
cache.h| 27 +++
name-hash.c| 7 ++-
read-cache.c | 5 -
split-index.c
From: Keith McGuigan
During merges, we would previously free entries that we no longer need
in the destination index. But those entries might also be stored in
the dir_entry cache, and when a later call to add_to_index found them,
they would be used after being freed.
To prevent this, add a ref
Karthik Nayak writes:
> +static void if_then_else_handler(struct ref_formatting_stack **stack)
> +{
> + struct ref_formatting_stack *cur = *stack;
> + struct ref_formatting_stack *prev = cur->prev;
> + struct if_then_else *if_then_else = (struct if_then_else
> *)cur->at_end_data;
> +
Karthik Nayak writes:
> @@ -309,11 +319,19 @@ static void then_atom_handler(struct atom_value *atomv,
> struct ref_formatting_st
> if (if_then_else->then_atom)
> die(_("format: %%(then) atom used more than once"));
> if_then_else->then_atom = 1;
> +
> /*
Useless
Karthik Nayak writes:
> --- a/ref-filter.c
> +++ b/ref-filter.c
> @@ -464,14 +464,28 @@ static void *get_obj(const unsigned char *sha1, struct
> object **obj, unsigned lo
> static int grab_objectname(const char *name, const unsigned char *sha1,
> struct atom_value *v)
Karthik Nayak writes:
> Copy the implementation of get_head_description() from branch.c. This
> gives a description of the HEAD ref if called. This is used as the
> refname for the HEAD ref whenever the FILTER_REFS_DETACHED_HEAD option
> is used. Make it public because we need it to calculate th
Mike Hommey writes:
> After refreshing the patch against current "next", it appears that
> there is such a distinction:
>
> $ ./git-log --notes=fdsfgsfdg HEAD^! --pretty=short
> warning: notes ref refs/notes/fdsfgsfdg is invalid
> commit e5b68b2e879608d881c2e3600ce84962fcdefc88
> Author: Mike Hom
Hi Junio,
On 2015-10-07 19:49, Junio C Hamano wrote:
> Johannes Schindelin writes:
>
>> On Windows, files that are in use cannot be removed or renamed. That
>> means that we have to release pack files when we are about to, say,
>> repack them. Let's introduce a convenient function to close them
Hi Junio,
On 2015-10-07 19:45, Junio C Hamano wrote:
> Johannes Schindelin writes:
>
>> It is quite possible for, say, a remote HEAD to become broken, e.g.
>> when the default branch was renamed.
>>
>> We should still be able to pack our objects when such a thing happens;
>> simply ignore broken
Karthik Nayak writes:
> Add support for %(upstream:track,nobracket) which will print the
> tracking information without the brackets (i.e. "ahead N, behind M").
>
> Add test and documentation for the same.
> ---
> Documentation/git-for-each-ref.txt | 6 --
> ref-filter.c
Oops, sorry, I sent the wrong message, this one is empty. Please ignore.
Matthieu Moy writes:
> Karthik Nayak writes:
>
>> Add support for %(upstream:track,nobracket) which will print the
>> tracking information without the brackets (i.e. "ahead N, behind M").
>>
>> Add test and documentation f
Karthik Nayak writes:
> --- a/Documentation/git-for-each-ref.txt
> +++ b/Documentation/git-for-each-ref.txt
> @@ -134,9 +134,17 @@ align::
> `` is either left, right or middle, default being
> left and `` is the total length of the content with
> alignment. If the contents lengt
Uwe Kleine-König writes:
> Hello,
>
> when applying the mail below (without the '> ' prefix) using git am
> --scissors the result looks like:
>
> $ git show
> commit 26ef0606927cc1979faa4166d7f9f3584b5cdc61
> Author: Tony Lindgren
> Date: Tue Oct 6 05:36:17 2015 -0700
Hello Junio,
On Thu, Oct 08, 2015 at 12:28:46PM -0700, Junio C Hamano wrote:
> Uwe Kleine-König writes:
>
> > Hello,
> >
> > when applying the mail below (without the '> ' prefix) using git am
> > --scissors the result looks like:
> >
> > $ git show
> > commit 26ef0606927cc1979faa4166d7
Johannes Schindelin writes:
> Would yo kindly add the line
>
> This fixes https://github.com/git-for-windows/git/issues/423
>
> before the Signed-off-by lines?
Oh, sorry, I missed that one. Fixed.
Thanks.
--
To unsubscribe from this list: send the line "unsubscribe git" in
the body of a me
David Turner writes:
> From: Keith McGuigan
>
> During merges, we would previously free entries that we no longer need
> in the destination index. But those entries might also be stored in
> the dir_entry cache, and when a later call to add_to_index found them,
> they would be used after being
Uwe Kleine-König writes:
>> Does this have anything to do with scissors, though? If you remove
>> everything before "8< ---" in the body of Tony's message (i.e. keep
>> the in-body headers starting with "From:" and ending with CTE) and
>> try again, I would suspect that you will get the same re
Hi Junio,
On 2015-10-08 21:42, Junio C Hamano wrote:
> Johannes Schindelin writes:
>
>> Would yo kindly add the line
>>
>> This fixes https://github.com/git-for-windows/git/issues/423
>>
>> before the Signed-off-by lines?
>
> Oh, sorry, I missed that one. Fixed.
>
> Thanks.
Thank you!
Ds
Hello Junio,
On Thu, Oct 08, 2015 at 01:04:01PM -0700, Junio C Hamano wrote:
> Uwe Kleine-König writes:
>
> >> Does this have anything to do with scissors, though? If you remove
> >> everything before "8< ---" in the body of Tony's message (i.e. keep
> >> the in-body headers starting with "Fro
Brendan Forster noticed that we no longer see the helpful message after
a failed `git pull --rebase`. It turns out that the builtin `am` calls
the recursive merge function directly, not via a separate process. But
that function was not really safe to be called that way, as it die()s
pretty liberall
When calling `git pull --rebase`, things can go wrong. In such a case,
we want to tell the user about the most common ways out of this fix:
Patch failed at [...]
[...]
When you have resolved this problem, run "git rebase
--continue". If you prefer to skip this patc
Traditionally, all of Git's operations were intended as single
executables to be run once and exit, not as library functions with
careful error code paths. Therefore, it was okay for those operations
to simply die() with an error.
However, this assumption no longer holds true: builtin `am` calls
m
On Mon, Oct 5, 2015 at 12:36 AM, Ray Donnelly wrote:
> On Sun, Oct 4, 2015 at 6:21 PM, Junio C Hamano wrote:
>> Ray Donnelly writes:
>>
Some callers of this function in real code (i.e. not the one you are
removing the check) do seem to depend on that condition, e.g. the
codepath i
Hello all,
I'm interested in contributing to a small- to medium-size project,
preferably something regarding data structures. I was looking back
through the SoC ideas, and saw in the 2014 page the suggestion to work
on hash-object. I was wondering first if that still needs work, and if
so, if ther
df062010 (filter-branch: avoid passing commit message through sed)
introduced a regression when filtering commits with multi-line headers,
if the header contains a blank line. An example of this is a gpg-signed
commit:
$ git cat-file commit signed-commit
tree 3d4038e029712da9fc59a72afbfcc9041
Johannes Schindelin writes:
> Brendan Forster noticed that we no longer see the helpful message after
> a failed `git pull --rebase`. It turns out that the builtin `am` calls
> the recursive merge function directly, not via a separate process.
>
> But that function was not really safe to be calle
I'll squash this in as part of your first patch that removes the
test from test-path-utils.c. That makes it clearer why it is the
right thing to remove the test, I'd think.
Thanks.
--
To unsubscribe from this list: send the line "unsubscribe git" in
the body of a message to majord...@vger.kernel
On Fri, Oct 9, 2015 at 8:52 AM, Junio C Hamano wrote:
> Johannes Schindelin writes:
>
>> Brendan Forster noticed that we no longer see the helpful message after
>> a failed `git pull --rebase`. It turns out that the builtin `am` calls
>> the recursive merge function directly, not via a separate p
"git mailinfo" (hence "git am") understands some well-known headers,
like "Subject: ", "Date: " and "From: ", placed at the beginning of
the message body (and the "--scissors" can discard the part of the
body before a scissors-mark). However, some people throw other
kinds of header-looking things
Use struct object_id in three fields in struct ref and convert all the
necessary places that use it.
Signed-off-by: brian m. carlson
---
builtin/clone.c| 16 +++---
builtin/fetch-pack.c | 4 ++--
builtin/fetch.c| 50 +--
builtin/
Convert several internal functions in refs.c to use struct object_id,
and use the GIT_SHA1_HEXSZ constants in parse_ref_line.
Signed-off-by: brian m. carlson
---
refs.c | 104 -
1 file changed, 52 insertions(+), 52 deletions(-)
dif
Add has_object_file, which is a wrapper around has_sha1_file, but for
struct object_id.
Signed-off-by: brian m. carlson
---
cache.h | 3 +++
sha1_file.c | 5 +
2 files changed, 8 insertions(+)
diff --git a/cache.h b/cache.h
index 752031e8..61a686e3 100644
--- a/cache.h
+++ b/cache.h
@@
struct object is one of the major data structures dealing with object
IDs. Convert it to use struct object_id instead of an unsigned char
array. Convert get_object_hash to refer to the new member as well.
Signed-off-by: brian m. carlson
---
bisect.c | 4 ++--
builtin/am.c
Convert several unsigned char arrays to use struct object_id instead,
and change hard-coded 40-based constants to use GIT_SHA1_HEXSZ as well.
Signed-off-by: brian m. carlson
---
remote.c | 64
1 file changed, 32 insertions(+), 32 d
Convert all instances of get_object_hash to use an appropriate reference
to the hash member of the oid member of struct object. This provides no
functional change, as it is essentially a macro substitution.
Signed-off-by: brian m. carlson
---
Implemented entirely by the following Perl script.
#
Convert most instances where the sha1 member of struct object is
dereferenced to use get_object_hash. Most instances that are passed to
functions that have versions taking struct object_id, such as
get_sha1_hex/get_oid_hex, or instances that can be trivially converted
to use struct object_id inste
This is another series of conversions to struct object_id.
This series converts more of the refs code and struct object to use
struct object_id. It introduces an additional helper function,
has_object_file, which is the equivalent of has_sha1_file. The name was
chosen to be slightly more logical
This macro is a temporary change to ease the transition of struct object
to use struct object_id. It takes an argument of struct object and
returns the object's hash. Provide this hash next to struct object for
easier conversion.
Signed-off-by: brian m. carlson
---
object.h | 2 ++
1 file chan
Convert ref_newer and its caller to use struct object_id instead of
unsigned char *.
Signed-off-by: brian m. carlson
---
builtin/remote.c | 2 +-
http-push.c | 4 ++--
remote.c | 8
remote.h | 2 +-
4 files changed, 8 insertions(+), 8 deletions(-)
diff --git a/buil
Replace an unsigned char array with struct object_id and express several
hard-coded constants in terms of GIT_SHA1_HEXSZ.
Signed-off-by: brian m. carlson
---
connect.c | 22 --
1 file changed, 12 insertions(+), 10 deletions(-)
diff --git a/connect.c b/connect.c
index 45eabcd
Signed-off-by: brian m. carlson
---
transport-helper.c | 8
1 file changed, 4 insertions(+), 4 deletions(-)
diff --git a/transport-helper.c b/transport-helper.c
index 91cb0e72..0eb3cf01 100644
--- a/transport-helper.c
+++ b/transport-helper.c
@@ -878,13 +878,13 @@ static int push_refs_w
Convert this function to use struct object_id. Express several
hardcoded constants in terms of GIT_SHA1_HEXSZ.
Signed-off-by: brian m. carlson
---
builtin/fetch-pack.c | 12 +++-
1 file changed, 7 insertions(+), 5 deletions(-)
diff --git a/builtin/fetch-pack.c b/builtin/fetch-pack.c
in
Convert the parse_fetch function to use struct object_id. Remove the
strlen check as get_oid_hex will fail safely on receiving a too-short
NUL-terminated string.
Signed-off-by: brian m. carlson
---
remote-curl.c | 12 ++--
1 file changed, 6 insertions(+), 6 deletions(-)
diff --git a/re
On Thu, Oct 8, 2015 at 2:45 PM, Elliott Runburg
wrote:
> Hello all,
>
> I'm interested in contributing to a small- to medium-size project,
> preferably something regarding data structures. I was looking back
> through the SoC ideas, and saw in the 2014 page the suggestion to work
> on hash-object.
When a text file with mixed line endings is commited into the repo,
it is called "not normalized" (or NNO) in t0027.
The existing test case using repoMIX did not fully test all combinations:
(Especially when core.autocrlf = true)
Files with NL are not converted at commit, but at checkout, so a warn
Am Captain Kelvin Ken Miller i am with the us army in Camp Abu Naji / FOB Garry
Owen (Al Amarah)I need you assistant to move some funds out of Iraq.
Kindly respond for more details.
--
To unsubscribe from this list: send the line "unsubscribe git" in
the body of a message to majord...@vger.kernel
85 matches
Mail list logo