Re: Setting Up A Charity Foundation.

2017-06-19 Thread Sarah Edward.
SETTING UP CHARITABLE ORGANIZATION Seasonal Greetings, I belief that you can help in setting up a charity foundation for the benefit of mankind, I wish to seek for your sincere help in setting up a charitable organization to help the less privileged, elderly and also

Restoring detached HEADs after Git operations

2017-06-19 Thread Patrick Lehmann
Hello, I wrote a Bash script to recover branch names after Git operations have create detached HEADs in a Git repository containing lots of Git submodules. The script works recursively. I would like to see: a) that script or algorithm being integrated into Git by default b) that as a default be

Re: [PATCH/ALMOST FINAL] Contextually notify user about an initial commit

2017-06-19 Thread Jeff King
On Sun, Jun 18, 2017 at 10:34:59AM +0200, Ævar Arnfjörð Bjarmason wrote: > Why not simply "No commits yet", saying "on the branch" is needlessy > duplicating information in the context of the status output in which > this is printed, i.e. now you have: > > $ ~/g/git/git-status > On branch

Re: [PATCH v2 0/2] Fix a refname trimming problem in `log --bisect`

2017-06-19 Thread Jeff King
On Sun, Jun 18, 2017 at 03:39:40PM +0200, Michael Haggerty wrote: > This is v2 of these patches. Thanks to Peff and Junio for their > feedback about v1 [1]. > > Changes since v1: > > * Added a test and tweaked the commit message of the first patch. Thanks, both changes look good to me. > As be

Re: Which hash function to use, was Re: RFC: Another proposed hash function transition plan

2017-06-19 Thread Johannes Schindelin
Hi Peff, On Fri, 16 Jun 2017, Jeff King wrote: > On Fri, Jun 16, 2017 at 03:24:19PM +0200, Johannes Schindelin wrote: > > > I have no doubt that Visual Studio Team Services, GitHub and Atlassian > > will eventually end up with FPGAs for hash computation. So that's > > that. > > I actually doubt

Re: Restoring detached HEADs after Git operations

2017-06-19 Thread Lars Schneider
> On 19 Jun 2017, at 10:46, Patrick Lehmann wrote: > > Hello, > > I wrote a Bash script to recover branch names after Git operations have > create detached HEADs in a Git repository containing lots of Git submodules. > The script works recursively. I did run into this situation myself and th

Re: [PATCH v5 08/10] rebase -i: skip unnecessary picks using the rebase--helper

2017-06-19 Thread Johannes Schindelin
Hi Liam, On Sat, 17 Jun 2017, Liam Beguin wrote: > On 16/06/17 09:56 AM, Johannes Schindelin wrote: > > > On Thu, 15 Jun 2017, Liam Beguin wrote: > > > >> On 14/06/17 09:08 AM, Johannes Schindelin wrote: > >>> diff --git a/sequencer.c b/sequencer.c > >>> index a697906d463..a0e020dab09 100644 >

Re: [PATCH v2 0/3] Add regression tests for rectent rebase -i fixes

2017-06-19 Thread Phillip Wood
On 16/06/17 14:49, Johannes Schindelin wrote: > Hi Junio, > > On Thu, 15 Jun 2017, Junio C Hamano wrote: > >> diff --git a/t/t3420-rebase-autostash.sh b/t/t3420-rebase-autostash.sh >> index 325ec75353..801bce25da 100755 >> --- a/t/t3420-rebase-autostash.sh >> +++ b/t/t3420-rebase-autostash.sh >>

Re: [PATCH v2 0/3] Add regression tests for rectent rebase -i fixes

2017-06-19 Thread Phillip Wood
On 16/06/17 00:29, Junio C Hamano wrote: > Junio C Hamano writes: > >> Junio C Hamano writes: >> >>> Phillip Wood writes: >>> From: Phillip Wood I've revised the second two tests as Johannes suggested to drop the sed script. The first one is unchanged. Phillip Woo

AW: Restoring detached HEADs after Git operations

2017-06-19 Thread Patrick Lehmann
Hello Lars, for your questions: > If there are multiple branches with the same hash then your script would pick > the first one. Can you imagine a situation where this would be a problem? I can't think of a good solution to resolve it automatically. Maybe a script could print that there are mul

Re: [PATCH v2 1/3] config: create a function to format section headers

2017-06-19 Thread Ramsay Jones
On 18/06/17 22:16, Sahil Dua wrote: > Factor out the logic which creates section headers in the config file, > e.g. the 'branch.foo' key will be turned into '[branch "foo"]'. > > This introduces no function changes, but is needed for a later change > which adds support for copying branch section

Behavior of 'git fetch' for commit hashes

2017-06-19 Thread eero.aaltonen
Hello, I am seeing greatly different behavior for 'git fetch' commands on version 2.7.4 and 2.13.1 when the argument to fetch is a commit hash. I am working on a custom Continuous Integration (CI) system. The projects have dependencies that are simply fetched as repositories to a project subdirec

Re: [PATCH v4 5/5] stash: implement builtin stash

2017-06-19 Thread Johannes Schindelin
Hi Junio, On Fri, 16 Jun 2017, Junio C Hamano wrote: > Joel Teichroeb writes: > > > +static void stash_create_callback(struct diff_queue_struct *q, > > + struct diff_options *opt, void *cbdata) > > +{ > > + int i; > > + > > + for (i = 0; i < q->nr; i++) { > > +

Re: [PATCH v4 5/5] stash: implement builtin stash

2017-06-19 Thread Jeff King
On Mon, Jun 19, 2017 at 03:16:48PM +0200, Johannes Schindelin wrote: > And if you disagree with this assessment, you should point out the same > issues in literally all of my patches, as I always put initialized > variables first, uninitialized last. Yeah, I am scratching my head here. If we do h

Re: [PATCH/ALMOST FINAL] Contextually notify user about an initial commit

2017-06-19 Thread Kaartic Sivaraam
On Mon, 2017-06-19 at 05:10 -0400, Jeff King wrote: > On Sun, Jun 18, 2017 at 10:34:59AM +0200, Ævar Arnfjörð Bjarmason > wrote: > > > Why not simply "No commits yet", saying "on the branch" is > > needlessy > > duplicating information in the context of the status output in > > which > > this is p

Re: How to git push mirror local refs only?

2017-06-19 Thread Robert Dailey
On Fri, Jun 9, 2017 at 8:53 PM, Junio C Hamano wrote: > Robert Dailey writes: > >> So I want to update my remote fork with all my local branches. >> Normally I'd do this: >> >> $ git push --mirror fork >> >> However this will also push everything under `refs/remotes` which I do >> not want. And i

Re: [PATCH v2 1/3] config: create a function to format section headers

2017-06-19 Thread Sahil Dua
On Mon, Jun 19, 2017 at 2:08 PM, Ramsay Jones wrote: > > > On 18/06/17 22:16, Sahil Dua wrote: >> Factor out the logic which creates section headers in the config file, >> e.g. the 'branch.foo' key will be turned into '[branch "foo"]'. >> >> This introduces no function changes, but is needed for a

Re: [PATCH v2 0/3] Add regression tests for rectent rebase -i fixes

2017-06-19 Thread Junio C Hamano
Phillip Wood writes: >> Phillip, would you mind picking those changes up as you deem appropriate? > > Will do, thanks for the patches Thanks, both.

Re: [PATCH/ALMOST FINAL] Contextually notify user about an initial commit

2017-06-19 Thread Junio C Hamano
Jeff King writes: > On Sun, Jun 18, 2017 at 10:34:59AM +0200, Ævar Arnfjörð Bjarmason wrote: > >> Why not simply "No commits yet", saying "on the branch" is needlessy >> duplicating information in the context of the status output in which >> this is printed, i.e. now you have: >> >> $ ~/g/gi

Re: [PATCH v2 0/2] Fix a refname trimming problem in `log --bisect`

2017-06-19 Thread Junio C Hamano
Jeff King writes: > On Sun, Jun 18, 2017 at 03:39:40PM +0200, Michael Haggerty wrote: > >> As before, the second patch is optional. If it is omitted, it might >> flush out any other bugs like this one in client code. If it is >> included, regressions are less likely, but we won't learn about othe

Re: Behavior of 'git fetch' for commit hashes

2017-06-19 Thread Stefan Beller
+cc Jonathan who did some work in the area. On Mon, Jun 19, 2017 at 5:09 AM, wrote: > Hello, > > I am seeing greatly different behavior for 'git fetch' commands on > version 2.7.4 and 2.13.1 when the argument to fetch is a commit hash. > > I am working on a custom Continuous Integration (CI) sys

Re: [PATCH v2 0/2] Fix a refname trimming problem in `log --bisect`

2017-06-19 Thread Jeff King
On Mon, Jun 19, 2017 at 08:51:00AM -0700, Junio C Hamano wrote: > Jeff King writes: > > > On Sun, Jun 18, 2017 at 03:39:40PM +0200, Michael Haggerty wrote: > > > >> As before, the second patch is optional. If it is omitted, it might > >> flush out any other bugs like this one in client code. If

Re: [PATCH v5 08/10] rebase -i: skip unnecessary picks using the rebase--helper

2017-06-19 Thread Jeff King
On Mon, Jun 19, 2017 at 11:45:50AM +0200, Johannes Schindelin wrote: > The reason for this suggestion is that one of the revision machinery's > implementation details is an ugly little semi-secret: the pretty-printing > machinery uses a global state, and that is why we need the "pretty_given" > fl

in case you want a use-case with lots of submodules

2017-06-19 Thread Yaroslav Halchenko
Hi All, On a recent trip I've listened to the git minutes podcast episode and got excited to hear Stefan Beller (CCed just in case) describing ongoing work on submodules mechanism. I got excited, since e.g. performance improvements would be of great benefit to us too. In our project, http://dat

Re: Restoring detached HEADs after Git operations

2017-06-19 Thread Stefan Beller
On Mon, Jun 19, 2017 at 1:46 AM, Patrick Lehmann wrote: > Hello, > > I wrote a Bash script to recover branch names after Git operations have > create detached HEADs in a Git repository containing lots of Git submodules. > The script works recursively. Cool. :) You may also like https://public-

Re: Restoring detached HEADs after Git operations

2017-06-19 Thread Stefan Beller
On Mon, Jun 19, 2017 at 2:52 AM, Patrick Lehmann wrote: > Hello Lars, > > for your questions: >> If there are multiple branches with the same hash then your script would >> pick the first one. Can you imagine a situation where this would be a >> problem? > > I can't think of a good solution to r

Re: Restoring detached HEADs after Git operations

2017-06-19 Thread Jeff King
On Mon, Jun 19, 2017 at 08:46:45AM +, Patrick Lehmann wrote: > for Branch in $(git branch --list | grep "^ " | sed -e "s/ //" ); do > if [[ "$(git rev-parse "$Branch")" == $REF ]]; then > echo -e " \e[36mCheckout $Branch...\e[0m" > git checkout $Branch > FOUND=1 >

Re: [PATCH v5 4/5] convert: move multiple file filter error handling to separate function

2017-06-19 Thread Torsten Bögershausen
On 2017-06-18 13:47, Lars Schneider wrote: > >> On 18 Jun 2017, at 09:20, Torsten Bögershausen wrote: >> >> >> On 2017-06-01 10:22, Lars Schneider wrote: >>> This is useful for the subsequent patch 'convert: add "status=delayed" to >>> filter process protocol'. >> >> May be >> Collecting all filt

AW: Restoring detached HEADs after Git operations

2017-06-19 Thread Patrick Lehmann
Hello, I'm just an advanced Git user, not a Git developer. So I might find some time to improve the suggested script, which I provided with the hints given on the mailing list, but I have no time to do a complete feature release in your patch based Git flow. I'm currently involved in 8 other o

Re: [PATCH/RFC] Cleanup Documentation

2017-06-19 Thread Kaartic Sivaraam
On Sun, 2017-06-18 at 22:50 -0700, Stefan Beller wrote: > > > diff --git a/Documentation/git-submodule.txt b/Documentation/git- > > > submodule.txt > > > index 74bc6200d..9812b0655 100644 > > > --- a/Documentation/git-submodule.txt > > > +++ b/Documentation/git-submodule.txt > > > @@ -63,13 +63,7 @

Re: [PATCH v5 08/10] rebase -i: skip unnecessary picks using the rebase--helper

2017-06-19 Thread Junio C Hamano
Jeff King writes: > On Mon, Jun 19, 2017 at 11:45:50AM +0200, Johannes Schindelin wrote: > >> The reason for this suggestion is that one of the revision machinery's >> implementation details is an ugly little semi-secret: the pretty-printing >> machinery uses a global state, and that is why we ne

Re: [PATCH v5 4/5] convert: move multiple file filter error handling to separate function

2017-06-19 Thread Lars Schneider
> On 19 Jun 2017, at 19:18, Torsten Bögershausen wrote: > > On 2017-06-18 13:47, Lars Schneider wrote: >> >>> On 18 Jun 2017, at 09:20, Torsten Bögershausen wrote: >>> >>> >>> On 2017-06-01 10:22, Lars Schneider wrote: This is useful for the subsequent patch 'convert: add "status=delaye

Re: Restoring detached HEADs after Git operations

2017-06-19 Thread Stefan Beller
On Mon, Jun 19, 2017 at 10:34 AM, Patrick Lehmann wrote: > Hello, > > I'm just an advanced Git user, not a Git developer. So I might find some time > to improve the suggested script, which I provided with the hints given on the > mailing list, but I have no time to do a complete feature release

Re: Behavior of 'git fetch' for commit hashes

2017-06-19 Thread Jonathan Tan
On Mon, 19 Jun 2017 12:09:28 + wrote: > For version 2.7.4 > = > Git exits with exit code 1. > > However, if I first do 'git fetch ', then 'git fetch will > also work > > * branch-> FETCH_HEAD I suspect that what is happening is that 'git fetch ' also downloads the com

Re: Restoring detached HEADs after Git operations

2017-06-19 Thread Junio C Hamano
Stefan Beller writes: > On Mon, Jun 19, 2017 at 2:52 AM, Patrick Lehmann > wrote: >> Hello Lars, >> >> for your questions: >>> If there are multiple branches with the same hash then your script would >>> pick the first one. Can you imagine a situation where this would be a >>> problem? >> >> I

Re: [PATCH/RFC] Cleanup Documentation

2017-06-19 Thread Stefan Beller
On Mon, Jun 19, 2017 at 10:33 AM, Kaartic Sivaraam wrote: > >> Please markup the '.gitmodules' either via single quotes or `. >> (or even link to 'gitmodules(5)' ) >> > Marked it up using `. Help needed to link to 'gitmodules(5)', as I'm > not sure how to provide alternative text to 'linkgit:'.

[PATCH v3 0/4] Add regression tests for recent rebase -i fixes

2017-06-19 Thread Phillip Wood
From: Phillip Wood I've updated the second two tests to be portable using q_to_cr() as Johannes suggested and added his patch to fix the autostash messages going to stdout rather than stderr. The reflog message test is unchanged. Thanks to Johannes for his help and to Junio for picking up the bas

Re: Restoring detached HEADs after Git operations

2017-06-19 Thread Ævar Arnfjörð Bjarmason
On Mon, Jun 19 2017, Patrick Lehmann jotted: > Hello, > > I wrote a Bash script to recover branch names after Git operations have > create detached HEADs in a Git repository containing lots of Git submodules. > The script works recursively. > > I would like to see: > a) that script or algorithm

[PATCH v3 1/4] sequencer: print autostash messages to stderr

2017-06-19 Thread Phillip Wood
From: Johannes Schindelin The rebase messages are printed to stderr traditionally. However due to a bug introduced in 587947750bd (rebase: implement --[no-]autostash and rebase.autostash, 2013-05-12) which was faithfully copied when reimplementing parts of the interactive rebase in the sequencer

[PATCH v3 2/4] rebase -i: Add test for reflog message

2017-06-19 Thread Phillip Wood
From: Phillip Wood Check that the reflog message written to the branch reflog when the rebase is completed is correct Signed-off-by: Phillip Wood --- t/t3404-rebase-interactive.sh | 7 +++ 1 file changed, 7 insertions(+) diff --git a/t/t3404-rebase-interactive.sh b/t/t3404-rebase-interact

[PATCH v3 3/4] rebase: Add regression tests for console output

2017-06-19 Thread Phillip Wood
From: Phillip Wood Check the console output when using --autostash and the stash applies cleanly is what we expect. The test is quite strict but should catch any changes to the console output from the various rebase flavors. Thanks-to: Johannes Schindelin Signed-off-by: Phillip Wood --- t/t34

[PATCH v3 4/4] rebase: Add more regression tests for console output

2017-06-19 Thread Phillip Wood
From: Phillip Wood Check the console output when using --autostash and the stash does not apply is what we expect. The test is quite strict but should catch any changes to the console output from the various rebase flavors. Thanks-to: Johannes Schindelin Signed-off-by: Phillip Wood --- t/t342

Re: How to git push mirror local refs only?

2017-06-19 Thread Junio C Hamano
Robert Dailey writes: > On Fri, Jun 9, 2017 at 8:53 PM, Junio C Hamano wrote: >> Robert Dailey writes: >> >>> So I want to update my remote fork with all my local branches. >>> Normally I'd do this: >>> >>> $ git push --mirror fork >>> ... >> Something along this line in your .git/config: >> >>

Re: [PATCH 2/2] Add test for the new status message

2017-06-19 Thread Kaartic Sivaraam
On Sun, 2017-06-18 at 21:32 -0700, Junio C Hamano wrote: > Kaartic Sivaraam writes: > > > +test_expect_success 'No commits yet should be noted in status > > output' ' > > +   git init initial && > > +   cd initial && > > +   git status >output && > > +   test_i18ngrep "No commits

Re: [PATCH 2/2] Add test for the new status message

2017-06-19 Thread Jeff King
On Mon, Jun 19, 2017 at 11:29:49PM +0530, Kaartic Sivaraam wrote: > Is there a way to test for the "Initial commit" message in the commit > template? You can do "git commit --dry-run", which produces the template on stdout. That should be good enough for our purposes here, as it's the same code

AW: Restoring detached HEADs after Git operations

2017-06-19 Thread Patrick Lehmann
Hello Stefan, the use case is as follows: The projects consists of circa 18 IP cores. Each IP core is represented by a Git repository. Think of an IP core as of a lonestanding DLL or SO file project. Each IP core references 2 submodules, which bring the verification environments for testing th

Re: [RFC/PATCH] submodules: overhaul documentation

2017-06-19 Thread Brandon Williams
On 06/13, Stefan Beller wrote: > Adding two native speakers as we start word smithing. > > On Tue, Jun 13, 2017 at 12:29 PM, Junio C Hamano wrote: > > >> + > >> +A submodule is another Git repository tracked in a subdirectory of your > >> +repository. The tracked repository has its own history,

Re: [PATCH 00/28] Create a reference backend for packed refs

2017-06-19 Thread Junio C Hamano
Michael Haggerty writes: > I've developed these patches on top of master plus the following > patches, which are followups to mh/packed-refs-store-prep: > > * lock_packed_refs(): fix cache validity check > * for_each_bisect_ref(): don't trim refnames > > The patches can also be obtained from my G

Re: Restoring detached HEADs after Git operations

2017-06-19 Thread Stefan Beller
On Mon, Jun 19, 2017 at 10:55 AM, Junio C Hamano wrote: > Stefan Beller writes: > >> On Mon, Jun 19, 2017 at 2:52 AM, Patrick Lehmann >> wrote: >>> Hello Lars, >>> >>> for your questions: If there are multiple branches with the same hash then your script would pick the first one. Can

Re: Restoring detached HEADs after Git operations

2017-06-19 Thread Stefan Beller
On Mon, Jun 19, 2017 at 11:09 AM, Patrick Lehmann wrote: > Hello Stefan, > > the use case is as follows: > > The projects consists of circa 18 IP cores. Each IP core is represented by a > Git repository. Think of an IP core as of a lonestanding DLL or SO file > project. Each IP core references 2

Re: [PATCH 00/28] Create a reference backend for packed refs

2017-06-19 Thread Junio C Hamano
Junio C Hamano writes: > Is the iterator over packed-refs correctly skipping over what are > covered by loose refs? The entries in the packed-refs file that are > superseded by loose refs should be allowed to point at an already > expired object. Here it is in a test form for easier diagnosis.

Re: in case you want a use-case with lots of submodules

2017-06-19 Thread Stefan Beller
On Mon, Jun 19, 2017 at 8:59 AM, Yaroslav Halchenko wrote: > Hi All, > > On a recent trip I've listened to the git minutes podcast episode and > got excited to hear Stefan Beller (CCed just in case) describing > ongoing work on submodules mechanism. I got excited, since e.g. > performance improv

Re: [PATCH 00/28] Create a reference backend for packed refs

2017-06-19 Thread Jeff King
On Mon, Jun 19, 2017 at 12:25:07PM -0700, Junio C Hamano wrote: > Junio C Hamano writes: > > > Is the iterator over packed-refs correctly skipping over what are > > covered by loose refs? The entries in the packed-refs file that are > > superseded by loose refs should be allowed to point at an

Re: [PATCH 2/2] Add test for the new status message

2017-06-19 Thread Kaartic Sivaraam
On Mon, 2017-06-19 at 14:04 -0400, Jeff King wrote: > On Mon, Jun 19, 2017 at 11:29:49PM +0530, Kaartic Sivaraam wrote: > > > Is there a way to test for the "Initial commit" message in the > > commit > > template? > > You can do "git commit --dry-run", which produces the template on > stdout. Th

Re: [PATCH v2 0/3] Add regression tests for rectent rebase -i fixes

2017-06-19 Thread Johannes Sixt
Am 16.06.2017 um 20:43 schrieb Johannes Sixt: Am 16.06.2017 um 15:49 schrieb Johannes Schindelin: On Thu, 15 Jun 2017, Junio C Hamano wrote: diff --git a/t/t3420-rebase-autostash.sh b/t/t3420-rebase-autostash.sh index 325ec75353..801bce25da 100755 --- a/t/t3420-rebase-autostash.sh +++ b/t/t3420

Re: [PATCH 00/28] Create a reference backend for packed refs

2017-06-19 Thread Jeff King
On Mon, Jun 19, 2017 at 03:43:15PM -0400, Jeff King wrote: > > > Is the iterator over packed-refs correctly skipping over what are > > > covered by loose refs? The entries in the packed-refs file that are > > > superseded by loose refs should be allowed to point at an already > > > expired object

Re: [PATCH v2 0/3] Add regression tests for rectent rebase -i fixes

2017-06-19 Thread Junio C Hamano
Johannes Sixt writes: > Am 16.06.2017 um 20:43 schrieb Johannes Sixt: >> Am 16.06.2017 um 15:49 schrieb Johannes Schindelin: >>> On Thu, 15 Jun 2017, Junio C Hamano wrote: diff --git a/t/t3420-rebase-autostash.sh b/t/t3420-rebase-autostash.sh index 325ec75353..801bce25da 100755 ---

Re: [RFC/PATCH 0/5] remote: eliminate remote->{fetch,push}_refspec and lazy parsing of refspecs

2017-06-19 Thread Junio C Hamano
Jeff King writes: > If we forget the "storing it twice" argument, would it make sense to > convert the parallel arrays of items into a single array-of-struct? > I.e.: > > struct configured_refspec { > const char *string; > struct refspec refspec; > unsigned parsed:1; > } > >

What's cooking in git.git (Jun 2017, #05; Mon, 19)

2017-06-19 Thread Junio C Hamano
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. You can find the changes described

AW: Restoring detached HEADs after Git operations

2017-06-19 Thread Patrick Lehmann
Hello Stefan, I never have tapped into the DLL Hell trap. That's maybe I never did C++ development or I started with VB .NET / C# as .NET solved major parts of the DLL Hell :). That doesn't mean my new beloved language Python doesn't have a similar problem ... Thinking about DLL Hell is a thi

Re: in case you want a use-case with lots of submodules

2017-06-19 Thread Yaroslav Halchenko
On Mon, 19 Jun 2017, Stefan Beller wrote: > On Mon, Jun 19, 2017 at 8:59 AM, Yaroslav Halchenko > wrote: > > Hi All, > > On a recent trip I've listened to the git minutes podcast episode and > > got excited to hear Stefan Beller (CCed just in case) describing > > ongoing work on submodules me

Better usability of stash refs

2017-06-19 Thread Robert Dailey
To drop a stash, I have to do this (example): $ git stash drop stash@{3} Using the full "stash@{N}" seems superfluous since the documentation states it must be a stash in the first place. It would make more sense (and be quicker to type) to do: $ git stash drop 3 Is there a trick I can use to m

Re: Better usability of stash refs

2017-06-19 Thread Junio C Hamano
Robert Dailey writes: > To drop a stash, I have to do this (example): > > $ git stash drop stash@{3} > > Using the full "stash@{N}" seems superfluous since the documentation > states it must be a stash in the first place. It would make more sense > (and be quicker to type) to do: > > $ git stash

Re: Better usability of stash refs

2017-06-19 Thread Jeff King
On Mon, Jun 19, 2017 at 03:32:54PM -0500, Robert Dailey wrote: > To drop a stash, I have to do this (example): > > $ git stash drop stash@{3} > > Using the full "stash@{N}" seems superfluous since the documentation > states it must be a stash in the first place. It would make more sense > (and b

Re: What's cooking in git.git (Jun 2017, #05; Mon, 19)

2017-06-19 Thread Stefan Beller
> > * sb/submodule-doc (2017-06-13) 1 commit > - submodules: overhaul documentation > > Doc update. > > Waiting for discussion to settle. Please hold back, this definitely needs another version. > * sb/diff-color-move (2017-06-01) 17 commits > - diff.c: color moved lines differently > ... >

Git Strange behaviour with remote deleted branch

2017-06-19 Thread Reda Lyazidi
Hello, with git I noticed when I removed a remote branch with git push origin --delete in my clone when I used git branch -a I don't the deleted branch but my colleagues still see it. I tried with two clones in my PC, with the first one delete branch and the other still sees it despite git

[GSoC] Update: Week 5

2017-06-19 Thread Prathamesh Chavan
SUMMARY OF MY PROJECT: Git submodule subcommands are currently implemented by using shell script 'git-submodule.sh'. There are several reasons why we'll prefer not to use the shell script. My project intends to convert the subcommands into C code, thus making them builtins. This will increase Git'

[GSoC][PATCH 1/6] dir: create function count_slashes

2017-06-19 Thread Prathamesh Chavan
Similar functions exist in apply.c and builtin/show-branch.c for counting the number of slashes in a string. Also in the later patches, we introduce a third caller for the same. Hence, we unify it now by cleaning the existing functions and declaring a common function count_slashes in dir.h and impl

[GSoC][PATCH 3/6] submodule: port set_name_rev from shell to C

2017-06-19 Thread Prathamesh Chavan
Since later on we want to port submodule subcommand status, and since set_name_rev is part of cmd_status, hence this function is ported. It has been ported to function print_name_rev in C, which calls get_name_rev to get the revname, and after formatting it, print_name_rev prints it. And hence in t

[GSoC][PATCH 5/6] submodule: port submodule subcommand sync from shell to C

2017-06-19 Thread Prathamesh Chavan
The mechanism used for porting the submodule subcommand 'sync' is similar to that of 'foreach', where we split the function cmd_sync from shell into three functions in C, module_sync, for_each_submodule_list and sync_submodule. print_default_remote is introduced as a submodule--helper subcommand f

[GSoC][PATCH 4/6] submodule: port submodule subcommand status

2017-06-19 Thread Prathamesh Chavan
The mechanism used for porting submodule subcommand 'status' is similar to that used for subcommand 'foreach'. The function cmd_status from git-submodule is ported to three functions in the builtin submodule--helper namely: module_status, for_each_submodule_list and status_submodule. print_status

[GSoC][PATCH 6/6] submodule: port submodule subcommand 'deinit' from shell to C

2017-06-19 Thread Prathamesh Chavan
The same mechanism is used even for porting this submodule subcommand, as used in the ported subcommands till now. The function cmd_deinit in split up after porting into three functions: module_deinit, for_each_submodule_list and deinit_submodule. Mentored-by: Christian Couder Mentored-by: Stefan

[GSoC][PATCH 2/6] submodule--helper: introduce get_submodule_displaypath and for_each_submodule_list

2017-06-19 Thread Prathamesh Chavan
Functions get_submodule_displaypath and for_each_submodule_list for using them in the later patches, related to porting submodule subcommands from shell to C. These new functions are also used in ported submodule subcommand init Mentored-by: Christian Couder Mentored-by: Stefan Beller Signed-off

[PATCH] die routine: change recursion limit from 1 to 1024

2017-06-19 Thread Ævar Arnfjörð Bjarmason
Change the recursion limit for the default die routine from a *very* low 1 to 1024. This ensures that infinite recursions are broken, but doesn't lose error messages. The intent of the existing code, as explained in commit cd163d4b4e ("usage.c: detect recursion in die routines and bail out immedia

[PATCH] grep: fix erroneously copy/pasted variable in check/assert pattern

2017-06-19 Thread Ævar Arnfjörð Bjarmason
Fix an erroneously copy/pasted check for the pcre2_jit_stack variable to check pcre2_match_context instead. The former was already checked in the preceding "if" statement. This is a trivial and obvious error introduced in my commit 94da9193a6 ("grep: add support for PCRE v2", 2017-06-01). In prac

Re: [PATCH] die routine: change recursion limit from 1 to 1024

2017-06-19 Thread Stefan Beller
> Now, git-grep could make use of the pluggable error facility added in > commit c19a490e37 ("usage: allow pluggable die-recursion checks", > 2013-04-16). I think we should do that instead (though I have not looked at the downsides of this), because... > > So let's just set the recursion limit to

Re: Git Strange behaviour with remote deleted branch

2017-06-19 Thread Paul Smith
On Mon, 2017-06-19 at 23:33 +0200, Reda Lyazidi wrote: > with git I noticed when I removed a remote branch with git push origin > --delete > in my clone when I used git branch -a I don't the deleted branch > but my colleagues still see it. > > I tried with two clones in my PC, with the first one

Re: Behavior of 'git fetch' for commit hashes

2017-06-19 Thread Jonathan Tan
On Mon, 19 Jun 2017 10:49:36 -0700 Jonathan Tan wrote: > On Mon, 19 Jun 2017 12:09:28 + > wrote: > > > For version 2.13.3 Firstly, exactly which version of Git doesn't work? I'm assuming 2.13.1 (as written elsewhere in your e-mail), since 2.13.3 doesn't exist. > > However, the workaround

Re: [PATCH] die routine: change recursion limit from 1 to 1024

2017-06-19 Thread Ævar Arnfjörð Bjarmason
On Mon, Jun 19 2017, Stefan Beller jotted: >> Now, git-grep could make use of the pluggable error facility added in >> commit c19a490e37 ("usage: allow pluggable die-recursion checks", >> 2013-04-16). > > I think we should do that instead (though I have not looked at the downsides > of this), bec

Re: [PATCH] die routine: change recursion limit from 1 to 1024

2017-06-19 Thread Stefan Beller
On Mon, Jun 19, 2017 at 3:32 PM, Ævar Arnfjörð Bjarmason wrote: > > On Mon, Jun 19 2017, Stefan Beller jotted: > >>> Now, git-grep could make use of the pluggable error facility added in >>> commit c19a490e37 ("usage: allow pluggable die-recursion checks", >>> 2013-04-16). >> >> I think we should

Re: [GSoC] Update: Week 5

2017-06-19 Thread Andrew Ardill
On 20 June 2017 at 07:41, Prathamesh Chavan wrote: >But as communicating between child_process is still an issue >and so there was no simple was to current carry out the >porting. And hence, a hack was used instead. But after >discussing it, instead using the repository-object pat

Re: [GSoC] Update: Week 5

2017-06-19 Thread Brandon Williams
On 06/20, Andrew Ardill wrote: > On 20 June 2017 at 07:41, Prathamesh Chavan wrote: > > >But as communicating between child_process is still an issue > >and so there was no simple was to current carry out the > >porting. And hence, a hack was used instead. But after > >discussing

[PATCH v4 1/8] sha1_file: teach packed_object_info about typename

2017-06-19 Thread Jonathan Tan
In commit 46f0344 ("sha1_file: support reading from a loose object of unknown type", 2015-05-06), "struct object_info" gained a "typename" field that could represent a type name from a loose object file, whether valid or invalid, as opposed to the existing "typep" which could only represent valid t

[PATCH v4 2/8] sha1_file: rename LOOKUP_UNKNOWN_OBJECT

2017-06-19 Thread Jonathan Tan
The LOOKUP_UNKNOWN_OBJECT flag was introduced in commit 46f0344 ("sha1_file: support reading from a loose object of unknown type", 2015-05-03) in order to support a feature in cat-file subsequently introduced in commit 39e4ae3 ("cat-file: teach cat-file a '--allow-unknown-type' option", 2015-05-03)

[PATCH v4 3/8] sha1_file: rename LOOKUP_REPLACE_OBJECT

2017-06-19 Thread Jonathan Tan
The LOOKUP_REPLACE_OBJECT flag controls whether the lookup_replace_object() function is invoked by sha1_object_info_extended(), read_sha1_file_extended(), and lookup_replace_object_extended(), but it is not immediately clear which functions accept that flag. Therefore restrict this flag to only sh

[PATCH v4 5/8] sha1_file: refactor read_object

2017-06-19 Thread Jonathan Tan
read_object() and sha1_object_info_extended() both implement mechanisms such as object replacement, retrying the packed store after failing to find the object in the packed store then the loose store, and being able to mark a packed object as bad and then retrying the whole process. Consolidating t

[PATCH v4 0/8] Improvements to sha1_file

2017-06-19 Thread Jonathan Tan
Thanks, Peff and Junio for your comments. Here's an updated version and some replies to comments. > I also found this quite subtle. However, I don't think that > has_sha1_file() actually freshens. It's a bit confusing because > has_loose_object() reuses the check_and_freshen() function to do the >

[PATCH v4 4/8] sha1_file: move delta base cache code up

2017-06-19 Thread Jonathan Tan
In a subsequent patch, packed_object_info() will be modified to use the delta base cache, so move the relevant code to before packed_object_info(). Signed-off-by: Jonathan Tan --- sha1_file.c | 220 ++-- 1 file changed, 110 insertions(+), 1

[PATCH v4 7/8] sha1_file: do not access pack if unneeded

2017-06-19 Thread Jonathan Tan
Add an option to struct object_info to suppress population of additional information about a packed object if unneeded. This allows an optimization in which sha1_object_info_extended() does not even need to access the pack if no information besides provenance is requested. A subsequent patch will m

[PATCH v4 6/8] sha1_file: improve sha1_object_info_extended

2017-06-19 Thread Jonathan Tan
Improve sha1_object_info_extended() by supporting additional flags. This allows has_sha1_file_with_flags() to be modified to use sha1_object_info_extended() in a subsequent patch. Signed-off-by: Jonathan Tan --- cache.h | 4 sha1_file.c | 43 ---

[PATCH v4 8/8] sha1_file: refactor has_sha1_file_with_flags

2017-06-19 Thread Jonathan Tan
has_sha1_file_with_flags() implements many mechanisms in common with sha1_object_info_extended(). Make has_sha1_file_with_flags() a convenience function for sha1_object_info_extended() instead. Signed-off-by: Jonathan Tan --- builtin/fetch.c | 10 ++ builtin/index-pack.c | 3 ++- c

Re: [PATCH v4 5/5] stash: implement builtin stash

2017-06-19 Thread Joel Teichroeb
On Fri, Jun 16, 2017 at 3:47 PM, Junio C Hamano wrote: > Joel Teichroeb writes: >> +/* >> + * Untracked files are stored by themselves in a parentless commit, for >> + * ease of unpacking later. >> + */ >> +static int save_untracked(struct stash_info *info, const char *message, >> + i

Re: [PATCH v5 08/10] rebase -i: skip unnecessary picks using the rebase--helper

2017-06-19 Thread Liam Beguin
On 19/06/17 05:45 AM, Johannes Schindelin wrote: > Hi Liam, > > On Sat, 17 Jun 2017, Liam Beguin wrote: > >> On 16/06/17 09:56 AM, Johannes Schindelin wrote: >> >>> On Thu, 15 Jun 2017, Liam Beguin wrote: >>> On 14/06/17 09:08 AM, Johannes Schindelin wrote: > diff --git a/sequencer.c b

Re: [PATCH v4 5/5] stash: implement builtin stash

2017-06-19 Thread Joel Teichroeb
On Sun, Jun 11, 2017 at 2:27 PM, Thomas Gummerer wrote: >> + >> +int cmd_stash(int argc, const char **argv, const char *prefix) >> +{ >> + int result = 0; >> + pid_t pid = getpid(); >> + >> + struct option options[] = { >> + OPT_END() >> + }; >> + >> + git_config(gi

[PATCH 12/26] diff.c: emit_diff_symbol learns DIFF_SYMBOL_HEADER

2017-06-19 Thread Stefan Beller
Signed-off-by: Stefan Beller --- diff.c | 28 1 file changed, 20 insertions(+), 8 deletions(-) diff --git a/diff.c b/diff.c index 7c56150b56..95f11ea86f 100644 --- a/diff.c +++ b/diff.c @@ -571,6 +571,7 @@ enum diff_symbol { DIFF_SYMBOL_WORDS_PORCELAIN,

[PATCH 07/26] diff.c: emit_diff_symbol learns DIFF_SYMBOL_NO_LF_EOF

2017-06-19 Thread Stefan Beller
Signed-off-by: Stefan Beller --- diff.c | 19 +++ 1 file changed, 11 insertions(+), 8 deletions(-) diff --git a/diff.c b/diff.c index a1804a7785..28be3226c2 100644 --- a/diff.c +++ b/diff.c @@ -563,11 +563,13 @@ enum diff_symbol { DIFF_SYMBOL_SEPARATOR, DIFF_SYMBO

[PATCH 06/26] diff.c: emit_diff_symbol learns DIFF_SYMBOL_CONTEXT_FRAGINFO

2017-06-19 Thread Stefan Beller
Signed-off-by: Stefan Beller --- diff.c | 8 ++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/diff.c b/diff.c index 3af07fa659..a1804a7785 100644 --- a/diff.c +++ b/diff.c @@ -562,6 +562,7 @@ static void emit_line(struct diff_options *o, const char *set, const char *reset

[PATCH 08/26] diff.c: migrate emit_line_checked to use emit_diff_symbol

2017-06-19 Thread Stefan Beller
Add a new flags field to emit_diff_symbol, that will be used by context lines for: * white space rules that are applicable (The first 12 bits) * how the rules are evaluated (actually this double encodes the sign of the line, but the code is easier to keep this way, bits 13,14,15) * if the line a

[PATCH 19/26] diff.c: emit_diff_symbol learns about DIFF_SYMBOL_STAT_SEP

2017-06-19 Thread Stefan Beller
Signed-off-by: Stefan Beller --- diff.c | 10 +++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/diff.c b/diff.c index 5b46baa12a..18bfc4720b 100644 --- a/diff.c +++ b/diff.c @@ -591,6 +591,7 @@ enum diff_symbol { DIFF_SYMBOL_STATS_SUMMARY_INSERTS_DELETES, DI

[PATCH 17/26] diff.c: convert show_stats to use emit_diff_symbol

2017-06-19 Thread Stefan Beller
We call print_stat_summary from builtin/apply, so we still need the version with a file pointer, so introduce print_stat_summary_0 that uses emit_string machinery and keep print_stat_summary with the same arguments around. Signed-off-by: Stefan Beller --- diff.c | 118 +++

  1   2   >