Re: [GSoC] Proposal

2016-03-25 Thread 惠轶群
I had updated the proposal before deadline, if someone is interesting. 2016-03-25 15:12 GMT+08:00 惠轶群 : > Well, I should have done some search before ask. -- To unsubscribe from this list: send the line "unsubscribe git" in the body of a message to majord...@vger.kernel.org

Re: [GSoC] A late proposal: a modern send-email

2016-03-25 Thread 惠轶群
2016-03-26 2:16 GMT+08:00 Junio C Hamano : > 惠轶群 writes: > >> # Purpose >> The current implementation of send-email is based on perl and has only >> a tui, it has two problems: >> - user must install a ton of dependencies before submit a single patch. >> -

Re: [PATCHv3 5/5] submodule--helper clone: lose the extra prefix option

2016-03-25 Thread Stefan Beller
On Fri, Mar 25, 2016 at 4:15 PM, Junio C Hamano wrote: > Stefan Beller writes: > >>> Of course by using -C, you might notice that repo/sub/untracked does >>> not exist, but that is not a proper error checking---what if the >>> submodule at repo/sub does

Re: [PATCH v2] t7012: Implement test for git-checkout

2016-03-25 Thread Chhatoi Pritam Baral
On 03/26/2016 05:04 AM, Chhatoi Pritam Baral wrote: > Previously a TODO; add a test for git-checkout skipping a > file with the skip-worktree bit set. > > Signed-off-by: Chhatoi Pritam Baral > --- > > This is a microproject for my GSoC '16 application. > > Thanks,

[PATCH v2] t7012: Implement test for git-checkout

2016-03-25 Thread Chhatoi Pritam Baral
Previously a TODO; add a test for git-checkout skipping a file with the skip-worktree bit set. Signed-off-by: Chhatoi Pritam Baral --- This is a microproject for my GSoC '16 application. Thanks, Torsten, for pointing out my mistakes. :) It was my first time sending

Re: [PATCH] t7012: Implement test for git-checkout

2016-03-25 Thread Eric Sunshine
On Fri, Mar 25, 2016 at 1:36 PM, Chhatoi Pritam Baral wrote: > Previously a TODO, this patch adds a test for git-checkout skipping a > file with the skip-worktree bit set. In addition to Torsten's comments... > diff --git a/t/t7012-skip-worktree-writing.sh >

[PATCH 2/2] mergetools: add support for ExamDiff

2016-03-25 Thread Jacob Nisnevich
Signed-off-by: Jacob Nisnevich --- mergetools/examdiff | 18 ++ 1 file changed, 18 insertions(+) create mode 100644 mergetools/examdiff diff --git a/mergetools/examdiff b/mergetools/examdiff new file mode 100644 index 000..7b524d4 --- /dev/null

[PATCH 1/2] mergetools: create mergetool_find_win32_cmd() helper function for winmerge

2016-03-25 Thread Jacob Nisnevich
Signed-off-by: Jacob Nisnevich --- git-mergetool--lib.sh | 25 + mergetools/winmerge | 21 + 2 files changed, 26 insertions(+), 20 deletions(-) diff --git a/git-mergetool--lib.sh b/git-mergetool--lib.sh index

[PATCH 0/2] mergetools: add support for ExamDiff

2016-03-25 Thread Jacob Nisnevich
OK I add the quotes and modified the comment. I also changed $folder to $sub_directory. I think that makes a little bit more sense and sounds a lot better. Jacob Nisnevich (2): mergetools: create mergetool_find_win32_cmd() helper function for winmerge mergetools: add support for ExamDiff

Re: [PATCHv3 5/5] submodule--helper clone: lose the extra prefix option

2016-03-25 Thread Junio C Hamano
Stefan Beller writes: >> Of course by using -C, you might notice that repo/sub/untracked does >> not exist, but that is not a proper error checking---what if the >> submodule at repo/sub does have a directory with that name? IOW, >> the computation that gave

Re: [PATCH v9 2/3] t7507-commit-verbose: make test suite use write_script

2016-03-25 Thread Eric Sunshine
On Fri, Mar 25, 2016 at 2:15 PM, Pranit Bauva wrote: > On Fri, Mar 25, 2016 at 10:34 PM, Eric Sunshine > wrote: >> That works too, simplifying the overall implementation, and >> eliminating the need for the introductory patch which moves >>

Re: [PATCHv3 5/5] submodule--helper clone: lose the extra prefix option

2016-03-25 Thread Stefan Beller
On Fri, Mar 25, 2016 at 3:39 PM, Junio C Hamano wrote: > Stefan Beller writes: > >> The replacement works fine in all tests except for the recursive >> tests as then the chdir is an important detail. In the submodule >> there is no $wt_prefix (as it is the

Re: [PATCH 1/2] mergetools: create mergetool_find_win32_cmd() helper function for winmerge

2016-03-25 Thread Junio C Hamano
Jacob Nisnevich writes: > Signed-off-by: Jacob Nisnevich > --- > git-mergetool--lib.sh | 25 + > mergetools/winmerge | 21 + > 2 files changed, 26 insertions(+), 20 deletions(-) > > diff --git

[PATCH 2/2] mergetools: add support for ExamDiff

2016-03-25 Thread Jacob Nisnevich
Signed-off-by: Jacob Nisnevich --- mergetools/examdiff | 18 ++ 1 file changed, 18 insertions(+) create mode 100644 mergetools/examdiff diff --git a/mergetools/examdiff b/mergetools/examdiff new file mode 100644 index 000..7b524d4 --- /dev/null

[PATCH 1/2] mergetools: create mergetool_find_win32_cmd() helper function for winmerge

2016-03-25 Thread Jacob Nisnevich
Signed-off-by: Jacob Nisnevich --- git-mergetool--lib.sh | 25 + mergetools/winmerge | 21 + 2 files changed, 26 insertions(+), 20 deletions(-) diff --git a/git-mergetool--lib.sh b/git-mergetool--lib.sh index

[PATCH 0/2] add support for ExamDiff

2016-03-25 Thread Jacob Nisnevich
I implemented all the changes you suggested and separated the patch into two different patches. Thanks for all the help David. Jacob Nisnevich (2): mergetools: create mergetool_find_win32_cmd() helper function for winmerge mergetools: add support for ExamDiff git-mergetool--lib.sh | 25

Re: [PATCHv3 5/5] submodule--helper clone: lose the extra prefix option

2016-03-25 Thread Junio C Hamano
Stefan Beller writes: > The replacement works fine in all tests except for the recursive > tests as then the chdir is an important detail. In the submodule > there is no $wt_prefix (as it is the parents' wt_prefix we passed in), So the real reason is that we may tweak

Re: [PATCH] t7012: Implement test for git-checkout

2016-03-25 Thread Torsten Bögershausen
On 2016-03-25 18.36, Chhatoi Pritam Baral wrote: Thanks for working on Git. Some comments inline. > Previously a TODO, this patch adds a test for git-checkout skipping a > file with the > skip-worktree bit set. Micro-nit: the "this patch ..." may be written shorter: > Previously a TODO, add a test

Re: [PATCH v10 2/2] pull --rebase: add --[no-]autostash flag

2016-03-25 Thread Eric Sunshine
On Fri, Mar 25, 2016 at 2:07 PM, Mehul Jain wrote: > On Fri, Mar 25, 2016 at 2:01 PM, Eric Sunshine > wrote: >> Nit: Some of the test titles spell this as "rebase.autostash" while >> others use "rebase.autoStash". >> [...] >> The title says

Re: [PATCHv3 5/5] submodule--helper clone: lose the extra prefix option

2016-03-25 Thread Stefan Beller
On Fri, Mar 25, 2016 at 1:54 PM, Junio C Hamano wrote: > Junio C Hamano writes: > >> This helper is called from the root level of the superproject's >> working tree (after cd_to_toplevel is done), and has options like >> --url. If the user named --url with

What's cooking in git.git (Mar 2016, #05; Fri, 25)

2016-03-25 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. We'll have 2.8 final early next

Re: [PATCH v2] api-parse-options.txt: document OPT_CMDMODE()

2016-03-25 Thread Junio C Hamano
Pranit Bauva writes: > I have used bits from your email. I forgot to add "Helped-by: Junio C > Hamano " . Could you squash it in? It's OK to omit such a credit for a patch this small. After understanding the issues, you would have written essentially

Re: [PATCH v2 0/5] branch: fix branch operations with multiple working trees

2016-03-25 Thread Junio C Hamano
Kazuki Yamaguchi writes: > [1/5] > Adds RESOLVE_REF_COMMON_DIR to resolve_ref_unsafe(). The second - fourth > patch depend on this. At the same time, this allows us to remove > reimplementation of resolve_ref_unsafe() in worktree.c: parse_ref(). > > [2/5] > Adds REF_COMMON_DIR flag

Re: [PATCH v2 5/5] branch -d: refuse deleting a branch which is currently checked out

2016-03-25 Thread Junio C Hamano
Kazuki Yamaguchi writes: > When a branch is checked out by current working tree, deleting the > branch is forbidden. However when the branch is checked out only by > other working trees, deleting is allowed. > Use find_shared_symref() to check if the branch is in use, not just >

Re: [PATCHv3 5/5] submodule--helper clone: lose the extra prefix option

2016-03-25 Thread Junio C Hamano
Junio C Hamano writes: > This helper is called from the root level of the superproject's > working tree (after cd_to_toplevel is done), and has options like > --url. If the user named --url with a relative pathname to a local > repository directory (or a bundle file),

[PATCH v3] api-parse-options.txt: document OPT_CMDMODE()

2016-03-25 Thread Pranit Bauva
OPT_CMDMODE mechanism was introduced in the release of 1.8.5 to actively notice when multiple "operation mode" options that specify mutually incompatible operation modes are given. Helped-by: Junio C Hamano Signed-off-by: Pranit Bauva ---

Re: [PATCHv3 5/5] submodule--helper clone: lose the extra prefix option

2016-03-25 Thread Junio C Hamano
Stefan Beller writes: > In the rewrite from shell to C (ee8838d157761, 2015-09-08, submodule: > rewrite `module_clone` shell function in C), we never made use of the > prefix. Probably it sneaked in as module_list which was converted in the > same series had the prefix as

Re: [RFC/GSOC] Git Beginner | Warnings for potentially destructive commands

2016-03-25 Thread Jacob Keller
On Fri, Mar 25, 2016 at 10:38 AM, Junio C Hamano wrote: > The above two examples make me wonder if these should be static > text. "ggit rebase" and "ggit reset" have full information of the > concrete branch names, commit object names and the actual topology > of the history,

Re: [PATCHv3 1/5] submodule: prepare recursive path from non root directory

2016-03-25 Thread Junio C Hamano
Stefan Beller writes: > diff --git a/git-submodule.sh b/git-submodule.sh > index 43c68de..d83608c 100755 > --- a/git-submodule.sh > +++ b/git-submodule.sh > @@ -825,8 +825,9 @@ Maybe you want to use 'update --init'?")" > if test -n "$recursive" >

Re: [PATCH v2] api-parse-options.txt: document OPT_CMDMODE()

2016-03-25 Thread Pranit Bauva
I have used bits from your email. I forgot to add "Helped-by: Junio C Hamano " . Could you squash it in? On Sat, Mar 26, 2016 at 12:28 AM, Pranit Bauva wrote: > OPT_CMDMODE mechanism was introduced in the release of 1.8.5 to actively > notice when

Re: [PATCH v10 2/2] pull --rebase: add --[no-]autostash flag

2016-03-25 Thread Mehul Jain
On Sat, Mar 26, 2016 at 12:07 AM, Matthieu Moy wrote: > I think you should also change one of the tests to use pull.resbase=true > so that this behavior is properly tested. Sure. I will add this test in the re-roll. Thanks, Mehul -- To unsubscribe from this list:

[PATCH v2] api-parse-options.txt: document OPT_CMDMODE()

2016-03-25 Thread Pranit Bauva
OPT_CMDMODE mechanism was introduced in the release of 1.8.5 to actively notice when multiple "operation mode" options that specify mutually incompatible operation modes are given. Signed-off-by: Pranit Bauva --- Documentation/technical/api-parse-options.txt | 7 +++

Re: How to use @{-1} with push?

2016-03-25 Thread Junio C Hamano
Robert Dailey writes: > So the push works with the fully-qualified ref, but not git branch: I thought these are clear from their documentation. "push" works on refnames, "branch" works on branch names. "push" takes an branch name as a short-hand and adds refs/heads/

[PATCHv3 4/5] submodule sync: test syncing one submodule

2016-03-25 Thread Stefan Beller
The current test suite doesn't cover syncing one module only. Instead of adding a new test, we can change existing tests to cover this part as well. Signed-off-by: Stefan Beller --- t/t7403-submodule-sync.sh | 13 + 1 file changed, 9 insertions(+), 4 deletions(-)

[PATCHv3 3/5] submodule update: add test for recursive from non root dir

2016-03-25 Thread Stefan Beller
Test "submodule update --recursive" being invoked from a sub directory as this is currently not covered by the test suite. Signed-off-by: Stefan Beller --- t/t7406-submodule-update.sh | 14 +++--- 1 file changed, 11 insertions(+), 3 deletions(-) diff --git

[PATCHv3 5/5] submodule--helper clone: lose the extra prefix option

2016-03-25 Thread Stefan Beller
In the rewrite from shell to C (ee8838d157761, 2015-09-08, submodule: rewrite `module_clone` shell function in C), we never made use of the prefix. Probably it sneaked in as module_list which was converted in the same series had the prefix as well. Signed-off-by: Stefan Beller

[PATCHv3 2/5] submodule--helper list: lose the extra prefix option

2016-03-25 Thread Stefan Beller
The usual early machinery of Git is to change the directory to the top level of the working tree and pass the actual path inside the working tree as `prefix` to the command being run. This is the case both for commands written in C (where the prefix is passed into the command in a function

[PATCHv3 1/5] submodule: prepare recursive path from non root directory

2016-03-25 Thread Stefan Beller
One of the first things that happens in most submodule sub commands is git submodule--helper list --prefix "$wt_prefix" Currently the passed --prefix is used for doing path calculation as if we were in that path relative to the repository root, which is why we need to pass "$wt_prefix". A

[PATCHv3 0/5] submodule helper: cleanup prefix passing

2016-03-25 Thread Stefan Beller
Thanks Junio for the in-depth discussion! I squashed the first two commits as they are actually fixing the same underlying issue. Setting wt_prefix= is the actual preparation for switching the submodule--helper to git -C instead of "--prefix$prefix". But setting wt_prefix=empty would break

Re: [PATCH v10 2/2] pull --rebase: add --[no-]autostash flag

2016-03-25 Thread Matthieu Moy
Mehul Jain writes: > On Fri, Mar 25, 2016 at 2:35 PM, Matthieu Moy > wrote: >> Mehul Jain writes: >> >>> +--autostash:: >>> +--no-autostash:: >>> + Before starting rebase, stash local modifications away (see

Re: [PATCH 3/4] submodule--helper list: lose the extra prefix option

2016-03-25 Thread Junio C Hamano
Stefan Beller writes: > Exactly, sorry for not writing my chain of thoughts down completely. > > To make them reusable, I'd assume we want them to be easy to > understand, and by using a well known way in git it is easier to > understand. I already said I do not care too

[PATCH v2 3/5] refs: add create_symref_common_dir as a variation of create_symref

2016-03-25 Thread Kazuki Yamaguchi
Add a new function create_symref_common_dir. This function passes REF_COMMON_DIR to lock_ref_sha1_basic, unlike create_symref, so to make it possible to update main working tree's per-worktree symbolic refs (HEAD) when we are in a linked working tree. Assume we have a linked working tree and we

[PATCH v2 5/5] branch -d: refuse deleting a branch which is currently checked out

2016-03-25 Thread Kazuki Yamaguchi
When a branch is checked out by current working tree, deleting the branch is forbidden. However when the branch is checked out only by other working trees, deleting is allowed. Use find_shared_symref() to check if the branch is in use, not just comparing with the current working tree's HEAD.

[PATCH v2 2/5] refs: add REF_COMMON_DIR flag

2016-03-25 Thread Kazuki Yamaguchi
Add a flag to force using $GIT_COMMON_DIR, instead of selecting $GIT_DIR or $GIT_COMMON_DIR by refname. This allows updating worktree-specific refs of the main working tree from a linked working tree. We will use this later. Signed-off-by: Kazuki Yamaguchi --- refs.h

[PATCH v2 4/5] branch -m: update all per-worktree HEADs

2016-03-25 Thread Kazuki Yamaguchi
When renaming a branch, the current code only updates the current working tree's HEAD, but it should update .git/HEAD of all checked out working trees. This is the current behavior, /path/to/wt's HEAD is not updated: % git worktree list /path/to 2c3c5f2 [master] /path/to/wt 2c3c5f2

[PATCH v2 0/5] branch: fix branch operations with multiple working trees

2016-03-25 Thread Kazuki Yamaguchi
[1/5] Adds RESOLVE_REF_COMMON_DIR to resolve_ref_unsafe(). The second - fourth patch depend on this. At the same time, this allows us to remove reimplementation of resolve_ref_unsafe() in worktree.c: parse_ref(). [2/5] Adds REF_COMMON_DIR flag to lock_ref_sha1_basic(). [3/5] Adds

[PATCH v2 1/5] refs: add new flag RESOLVE_REF_COMMON_DIR to resolve_ref_unsafe

2016-03-25 Thread Kazuki Yamaguchi
If the new flag RESOLVE_REF_COMMON_DIR is passed to resolve_ref_unsafe, it assumes the refname belongs to $GIT_COMMON_DIR. resolve_ref_unsafe currently has no way to resolve worktree-specific refs such as HEAD of the main working tree when we are in a linked working tree. worktree.c has a

Re: [GSoC] A late proposal: a modern send-email

2016-03-25 Thread Junio C Hamano
惠轶群 writes: > # Purpose > The current implementation of send-email is based on perl and has only > a tui, it has two problems: > - user must install a ton of dependencies before submit a single patch. > - tui and parameter are both not quite friendly to new users. Is "a ton

Re: [PATCH v9 2/3] t7507-commit-verbose: make test suite use write_script

2016-03-25 Thread Pranit Bauva
On Fri, Mar 25, 2016 at 10:34 PM, Eric Sunshine wrote: > That works too, simplifying the overall implementation, and > eliminating the need for the introductory patch which moves > 'test_set_editor' into each test. Wouldn't it be cleaner if the introductory patch

Re: How to use @{-1} with push?

2016-03-25 Thread Robert Dailey
On Fri, Mar 25, 2016 at 1:02 PM, Robert Dailey wrote: > On Fri, Mar 25, 2016 at 12:45 PM, Junio C Hamano wrote: >> You can ask rev-parse to give you --symbolic-full-name, error out if >> it is empty (i.e. detached HEAD), and otherwise use the result,

Re: [PATCH v10 2/2] pull --rebase: add --[no-]autostash flag

2016-03-25 Thread Mehul Jain
On Fri, Mar 25, 2016 at 2:35 PM, Matthieu Moy wrote: > Mehul Jain writes: > >> +--autostash:: >> +--no-autostash:: >> + Before starting rebase, stash local modifications away (see >> + linkgit:git-stash[1]) if needed, and apply the

Re: [PATCH v10 2/2] pull --rebase: add --[no-]autostash flag

2016-03-25 Thread Mehul Jain
On Fri, Mar 25, 2016 at 2:01 PM, Eric Sunshine wrote: >> +test_expect_success 'pull --rebase --autostash & rebase.autostash=true' ' > > Nit: Some of the test titles spell this as "rebase.autostash" while > others use "rebase.autoStash". That's a mistake. All test titles

Re: How to use @{-1} with push?

2016-03-25 Thread Robert Dailey
On Fri, Mar 25, 2016 at 12:45 PM, Junio C Hamano wrote: > You can ask rev-parse to give you --symbolic-full-name, error out if > it is empty (i.e. detached HEAD), and otherwise use the result, no? > > $ git checkout next > $ git checkout master > $ git rev-parse

Re: [PATCH v10 0/2] introduce --[no-]autostash command line flag

2016-03-25 Thread Mehul Jain
On Fri, Mar 25, 2016 at 12:53 PM, Eric Sunshine wrote: > On Mon, Mar 21, 2016 at 2:18 PM, Mehul Jain wrote: >> Changes introduced w.r.t. previous patch: >> [...] >> * Two more tests are added to checkout for error when "git pull >>

Re: [PATCH v3/GSoC 2/5] path.c: implement xdg_runtime_dir()

2016-03-25 Thread Junio C Hamano
Jeff King writes: >> > That's clearer, but if I were the caller, I would worry about the >> > security of the path. >> > How about adding: >> > >> > The security of the path is ensured by file permission. >> >> Is "by file permission" descriptive enough? >> >> To protect

Re: [PATCH v3/GSoC 3/5] git-credential-cache: put socket to xdg-compatible path

2016-03-25 Thread 惠轶群
2016-03-26 1:56 GMT+08:00 Jeff King : > On Fri, Mar 25, 2016 at 10:28:55PM +0800, 惠轶群 wrote: > >> >> diff --git a/credential-cache.c b/credential-cache.c >> >> index f4afdc6..40d838b 100644 >> >> --- a/credential-cache.c >> >> +++ b/credential-cache.c >> >> @@ -105,7 +105,7 @@ int

Re: [PATCH v3/GSoC 2/5] path.c: implement xdg_runtime_dir()

2016-03-25 Thread Jeff King
On Fri, Mar 25, 2016 at 10:21:48PM +0800, 惠轶群 wrote: > > There are some minor English problems here (and elsewhere). E.g., you > > probably want "So we just issue a warning and leave it to the user to > > solve.". > > Sorry for my English. Thanks. And sorry if that sounded too harsh. I know

[GSoC] A late proposal: a modern send-email

2016-03-25 Thread 惠轶群
I know it's tooo late to post proposal here, but I'd like to let my idea known by others. # Summary Although many projects hosted on github or gitlab adopt the fork-and-merge working flow, email is still irreplaceable for its compatibility. However, the send-email module is old and difficult for

Re: [PATCH v3/GSoC 3/5] git-credential-cache: put socket to xdg-compatible path

2016-03-25 Thread Jeff King
On Fri, Mar 25, 2016 at 10:28:55PM +0800, 惠轶群 wrote: > >> diff --git a/credential-cache.c b/credential-cache.c > >> index f4afdc6..40d838b 100644 > >> --- a/credential-cache.c > >> +++ b/credential-cache.c > >> @@ -105,7 +105,7 @@ int main(int argc, const char **argv) > >> op = argv[0]; >

Re: [PATCH v3/GSoC 2/5] path.c: implement xdg_runtime_dir()

2016-03-25 Thread Jeff King
On Fri, Mar 25, 2016 at 09:55:59AM -0700, Junio C Hamano wrote: > 惠轶群 writes: > > >> There's a lot of "what" here that the caller doesn't really care about, > >> and which may go stale with respect to the implementation over time. Can > >> we make something more succinct

Re: How to use @{-1} with push?

2016-03-25 Thread Junio C Hamano
Robert Dailey writes: > Both should refer to the last branch, but I know that these can't be > used verbatim in a push command because it doesn't read it as a branch > name normally like `git checkout` would. You can ask rev-parse to give you --symbolic-full-name,

Re: [RFC/GSOC] Git Beginner | Warnings for potentially destructive commands

2016-03-25 Thread Junio C Hamano
Sidhant Sharma writes: > $ ggit rebase > > [WARNING] You are about to rebase your commits in onto the > $BASE_BRANCH, which will essentially replay the work done in $TOPIC_BRANCH > since last merge onto $BASE_BRANCH. > For instance, > Current state: > > o---o---A---B

[PATCH] t7012: Implement test for git-checkout

2016-03-25 Thread Chhatoi Pritam Baral
Previously a TODO, this patch adds a test for git-checkout skipping a file with the skip-worktree bit set. I'm doing this as a microproject for my GSoC '16 application. Signed-off-by: Chhatoi Pritam Baral --- t/t7012-skip-worktree-writing.sh | 11 ++- 1 file

Re: [PATCH 3/4] submodule--helper list: lose the extra prefix option

2016-03-25 Thread Stefan Beller
On Fri, Mar 25, 2016 at 10:25 AM, Junio C Hamano wrote: > Junio C Hamano writes: > >> The way all the subcommand written in C works is >> >> - The start-up sequence does the repository discovery, which >>involves crawling up to the top-level of the

Re: [PATCH 2/4] submodule: fix recursive execution from non root directory

2016-03-25 Thread Stefan Beller
On Fri, Mar 25, 2016 at 9:46 AM, Junio C Hamano wrote: > Stefan Beller writes: > >> Most times that directory doesn't exist and we error out. Fix this bug >> by clearing wt_prefix, such that any recursive instances of will assume >> to operate from the

Re: [PATCH 3/4] submodule--helper list: lose the extra prefix option

2016-03-25 Thread Junio C Hamano
Junio C Hamano writes: > The way all the subcommand written in C works is > > - The start-up sequence does the repository discovery, which >involves crawling up to the top-level of the working tree, and >compute "prefix", where the end-user was when the command was >

Re: [PATCH 3/4] submodule--helper list: lose the extra prefix option

2016-03-25 Thread Stefan Beller
On Fri, Mar 25, 2016 at 10:01 AM, Junio C Hamano wrote: > Stefan Beller writes: > >> The other reason you gave below is also convincing: By having it in the >> prefix, >> the C code is more likely correct and future proof. >> >> On rewriting the whole

Re: [PATCH v9 2/3] t7507-commit-verbose: make test suite use write_script

2016-03-25 Thread Eric Sunshine
On Fri, Mar 25, 2016 at 10:46 AM, SZEDER Gábor wrote: > Quoting Eric Sunshine : >> On Thu, Mar 24, 2016 at 7:00 AM, SZEDER Gábor wrote: -cat >check-for-diff <>>> -#!$SHELL_PATH -exec grep '^diff --git' "\$1"

Re: [PATCH 3/4] submodule--helper list: lose the extra prefix option

2016-03-25 Thread Junio C Hamano
Stefan Beller writes: > The other reason you gave below is also convincing: By having it in the > prefix, > the C code is more likely correct and future proof. > > On rewriting the whole submodule command in C (probably > reiterating): It is not my endgoal to rewrite every

Re: [PATCH v3/GSoC 2/5] path.c: implement xdg_runtime_dir()

2016-03-25 Thread Junio C Hamano
惠轶群 writes: >> There's a lot of "what" here that the caller doesn't really care about, >> and which may go stale with respect to the implementation over time. Can >> we make something more succinct like: >> >> /* >>* Return a path suitable for writing run-time files

Re: [PATCH 1/4] submodule: fix recursive path printing from non root directory

2016-03-25 Thread Stefan Beller
On Fri, Mar 25, 2016 at 9:43 AM, Junio C Hamano wrote: > Stefan Beller writes: > >> Recursing into submodules currently works by just calling >> (cd $submodule && eval ) for update, sync and status >> command. >> >> Say you have the following setup >> >>

Re: [PATCH 1/2] Modified flag field type in rev_list_info struct in bisect.h. There is no need for flag field to be signed, as it is not supposed to be used as decimal.

2016-03-25 Thread Eric Sunshine
[please respond inline rather than top-posting] On Fri, Mar 25, 2016 at 8:53 AM, work wrote: > On 03/25/2016 09:18 AM, Junio C Hamano wrote: >> Stefan Beller writes: >>> Maybe my exposure to the code was accidentally in a way such that >>> I ever only

Re: [PATCH 3/4] submodule--helper list: lose the extra prefix option

2016-03-25 Thread Stefan Beller
On Thu, Mar 24, 2016 at 11:28 PM, Junio C Hamano wrote: > > So this change may not be wrong per-se, but if the lossage of prefix > is the final goal (as opposed to an approach to gain other benefits, > e.g. "now we do not have to use prefix, we can simplify these other >

Re: [PATCH 2/4] submodule: fix recursive execution from non root directory

2016-03-25 Thread Junio C Hamano
Stefan Beller writes: > Most times that directory doesn't exist and we error out. Fix this bug > by clearing wt_prefix, such that any recursive instances of will assume > to operate from the respective root of the respective submodule. As long as the recursive instances do

Re: [PATCH 1/4] submodule: fix recursive path printing from non root directory

2016-03-25 Thread Junio C Hamano
Stefan Beller writes: > Recursing into submodules currently works by just calling > (cd $submodule && eval ) for update, sync and status > command. > > Say you have the following setup > > repo/ # a superproject repository > repo/untracked/ # an untracked dir in repo/ >

Re: [PATCH v3 0/5] Expanding tabs in "git log" output

2016-03-25 Thread Junio C Hamano
Torsten Bögershausen writes: > This is copy-paste replacement for the last commit. > (Most probably it is white space damaged) > I'm not sure, is it's worth it ? Not if you are keeping "expand_tabs_in_log" boolean field. I was expecting that the new "log-tab-width" thing extends

Re: [PATCH v10 2/2] pull --rebase: add --[no-]autostash flag

2016-03-25 Thread Eric Sunshine
On Fri, Mar 25, 2016 at 4:44 AM, Eric Sunshine wrote: > On Fri, Mar 25, 2016 at 4:31 AM, Eric Sunshine > wrote: >> for i in --autostash --no-autostash >> do >> test_expect_success "pull $i (without --rebase) is illegal" " >>

Re: [PATCH v3 0/5] Expanding tabs in "git log" output

2016-03-25 Thread Junio C Hamano
Torsten Bögershausen writes: > On 2016-03-24 19.22, Junio C Hamano wrote: >> Torsten Bögershausen writes: >> >>> Would it make sense to have >>> git log --tab-size=8 >>> (or similar) >>> >>> and add a config variable like >>> git config ui.logtabsize >>> which is

Re: [PATCH 3/4] submodule--helper list: lose the extra prefix option

2016-03-25 Thread Junio C Hamano
Junio C Hamano writes: > Stefan Beller writes: > >> The usual early machinery of Git is to change the directory to >> the top level of the working tree and pass the actual path inside >> the working tree as `prefix` to the command being run. >> >> This is

Re: parse-options does not recognize "unspecified" behavior

2016-03-25 Thread Pranit Bauva
> Deprecating doesn't mean "removing". It merely means that we add a note > to the documentation stating that the option in question is deprecated, > but we will keep supporting it for several years and releases to come. Okay. Didn't know. > This means that '--verbose' and '--show-diff' must

Re: parse-options does not recognize "unspecified" behavior

2016-03-25 Thread SZEDER Gábor
Quoting Pranit Bauva : On Sat, Mar 19, 2016 at 4:55 PM, SZEDER Gábor wrote: Yes, I think in general, "-v" and "-q" should work as opposites. But that is not the case with commit, where "-v" and "-q" operate on totally separate messages. I think that

Re: [PATCH v9 2/3] t7507-commit-verbose: make test suite use write_script

2016-03-25 Thread Pranit Bauva
On Fri, Mar 25, 2016 at 8:16 PM, SZEDER Gábor wrote: > By redirecting grep's output to a file in the editor script, like this > patch wanted to, we can count the lines in the test script itself after > 'git commit' finished. This way we could use test_line_count, with > all

Re: [PATCH v9 2/3] t7507-commit-verbose: make test suite use write_script

2016-03-25 Thread SZEDER Gábor
Quoting Eric Sunshine : On Thu, Mar 24, 2016 at 7:00 AM, SZEDER Gábor wrote: diff --git a/t/t7507-commit-verbose.sh b/t/t7507-commit-verbose.sh index 2ddf28c..cf95efb 100755 --- a/t/t7507-commit-verbose.sh +++ b/t/t7507-commit-verbose.sh @@ -3,12

Re: [PATCH] tag.c: move PGP verification code from plumbing

2016-03-25 Thread Santiago Torres
> > - signal(SIGPIPE, SIG_IGN); > > while (i < argc) > > - if (verify_tag(argv[i++], flags)) > > + name = argv[i++]; > > + if (get_sha1(name, sha1)) > > + return error("tag '%s' not found.", name); > > + > > +

How to use @{-1} with push?

2016-03-25 Thread Robert Dailey
I have an alias that I'm working on to do a push and delete of a topic branch: # Push HEAD, delete branch local & remote # # $1 = remote name # $2 = branch name pushdel = "!f() { : git push ; git push \"$1\" HEAD \":$2\" && git branch -d \"$2\" ; }; f" I use it after I

Re: [PATCH v3/GSoC 3/5] git-credential-cache: put socket to xdg-compatible path

2016-03-25 Thread 惠轶群
2016-03-25 18:00 GMT+08:00 Jeff King : > On Wed, Mar 23, 2016 at 06:13:23PM +0800, Hui Yiqun wrote: > >> move .git-credential-cache/socket to xdg_runtime_dir("credential-cache.sock") > > Motivation? I will improve my commit message. > >> diff --git a/credential-cache.c

Re: [PATCH v3/GSoC 2/5] path.c: implement xdg_runtime_dir()

2016-03-25 Thread 惠轶群
> I find there are some similar leakage in this file. I'll fix them in > another patch. > > Do you think we need some additional comments for the release of strbuf? For example, in strbuf.h. -- To unsubscribe from this list: send the line "unsubscribe git" in the body of a message to

Re: [PATCH v3/GSoC 2/5] path.c: implement xdg_runtime_dir()

2016-03-25 Thread 惠轶群
2016-03-25 17:59 GMT+08:00 Jeff King : > On Wed, Mar 23, 2016 at 06:13:22PM +0800, Hui Yiqun wrote: > >> +/** >> + * this function does the following: >> + * >> + * 1. if $XDG_RUNTIME_DIR is non-empty, `$XDG_RUNTIME_DIR/git` is used in >> next >> + * step, otherwise `/tmp/git-$uid`

Re: [PATCH v3 0/5] Expanding tabs in "git log" output

2016-03-25 Thread Torsten Bögershausen
This is copy-paste replacement for the last commit. (Most probably it is white space damaged) I'm not sure, is it's worth it ? If yes, I can send a proper patch later. git show HEAD commit 3ac551127d51cd59b24f49729d9ce4dd011a09a1 Author: Junio C Hamano Date: Wed Mar 23

Re: [PATCH v2] worktree: add: introduce --checkout option

2016-03-25 Thread Mike Rappazzo
On Fri, Mar 25, 2016 at 7:41 AM, Duy Nguyen wrote: > On Fri, Mar 25, 2016 at 6:31 PM, Zhang Lei wrote: >> By the way, Duy, another unrelated question: why worktree name under >> .git/worktrees is being named >> after the working tree path basename? I

Re: [PATCH 1/2] Modified flag field type in rev_list_info struct in bisect.h. There is no need for flag field to be signed, as it is not supposed to be used as decimal.

2016-03-25 Thread work
Yep. Thanks for your remarks. I have made a bit more research about using old rev_list_info struct (with signed int flag) and realized, that it doesn't appear in expressions, where using signed integer will differ from unsigned one. I'll take using 'unsigned' instead of 'unsigned int' in

Re: [PATCH v2] worktree: add: introduce --checkout option

2016-03-25 Thread Duy Nguyen
Please don't top-post. On Fri, Mar 25, 2016 at 7:06 PM, Zhang Lei wrote: > Yes, path basename makes sense. > I am asking this question because we have some legacy code requires > that working tree > called something like 'src', as a result, multiple branch would have >

Re: [PATCH v2] worktree: add: introduce --checkout option

2016-03-25 Thread Zhang Lei
Yes, path basename makes sense. I am asking this question because we have some legacy code requires that working tree called something like 'src', as a result, multiple branch would have src1 src2 src3 under .git/worktrees which could not be easy to maintain. I agreed with you, we should give

Re: [PATCH] branch: update all per-worktree HEADs when renaming a branch

2016-03-25 Thread Kazuki Yamaguchi
On Tue, Mar 22, 2016 at 07:49:00AM +0700, Duy Nguyen wrote: > On Tue, Mar 22, 2016 at 12:41 AM, Eric Sunshine > wrote: > >> diff --git a/worktree.c b/worktree.c > >> @@ -217,3 +217,41 @@ char *find_shared_symref(const char *symref, const > >> char *target) > >> +int

Duplicate -s entry in git-format-patch(1)

2016-03-25 Thread Kevin Brodsky
Hi all, I've noticed for some time now that the man page for git-format-patch is quite confusing because it includes two entries for the -s option: - "-s, --no-patch", which is pulled by "include::diff-options.txt[]"in Documentation/git-format-patch.txt - "-s, --signoff", which is directly part

Re: GSoC 2016 | Proposal | Incremental Rewrite of git bisect

2016-03-25 Thread Pranit Bauva
On Fri, Mar 25, 2016 at 5:10 PM, Christian Couder wrote: > On Fri, Mar 25, 2016 at 11:15 AM, Pranit Bauva wrote: >>> - you will add an option to "git bisect--helper" to perform what the >>> git-bisect.sh function did, and >>> - you will create

Re: [PATCH v2] worktree: add: introduce --checkout option

2016-03-25 Thread Duy Nguyen
On Fri, Mar 25, 2016 at 6:31 PM, Zhang Lei wrote: > By the way, Duy, another unrelated question: why worktree name under > .git/worktrees is being named > after the working tree path basename? I think branch name is more > reasonable since we don't allow checking out > the

Re: GSoC 2016 | Proposal | Incremental Rewrite of git bisect

2016-03-25 Thread Christian Couder
On Fri, Mar 25, 2016 at 11:15 AM, Pranit Bauva wrote: >> - you will add an option to "git bisect--helper" to perform what the >> git-bisect.sh function did, and >> - you will create a test script for "git bisect--helper" in which you >> will test each option? > > I had

[PATCH v3] worktree: add: introduce --checkout option

2016-03-25 Thread Ray Zhang
By adding this option which defaults to true, we can use the corresponding --no-checkout to make some customizations before the checkout, like sparse checkout, etc. Signed-off-by: Ray Zhang --- 1. reword on `--no-checkout` in Documentation/git-worktree.txt 2. update the

Re: [PATCH] branch: update all per-worktree HEADs when renaming a branch

2016-03-25 Thread Kazuki Yamaguchi
Hello, On 03/22/2016 03:41 AM, Eric Sunshine wrote: >> diff --git a/t/t3200-branch.sh b/t/t3200-branch.sh >> @@ -126,7 +126,19 @@ test_expect_success 'git branch -M foo bar should fail >> when bar is checked out' >> test_expect_success 'git branch -M baz bam should

  1   2   >