Re: [PATCH] request-pull: resurrect for-linus - tags/for-linus DWIM

2014-05-18 Thread Michael S. Tsirkin
On Fri, May 16, 2014 at 10:57:50AM -0700, Junio C Hamano wrote: Older versions of Git before v1.7.10 did not DWIM $ git pull $URL for-linus to the tag tags/for-linus and the users were required to say $ git pull $URL tags/for-linus instead. Because newer versions of Git works

Re: [PATCH v3] format-patch --signature-file file

2014-05-18 Thread Jeff King
On Sat, May 17, 2014 at 09:02:22AM -0700, Jeremiah Mahler wrote: Added feature that allows a signature file to be used with format-patch. $ git format-patch --signature-file ~/.signature -1 Now signatures with newlines and other special characters can be easily included.

Re: [PATCH] remote-helpers: point at their upstream repositories

2014-05-18 Thread Matthieu Moy
Felipe Contreras felipe.contre...@gmail.com writes: % git fetch WARNING: git-remote-hg is now maintained independently. WARNING: For more information visit https://github.com/felipec/git-remote-hg searching for changes no changes found I don't think the situation is as simple as you

Re: [PATCH v3] format-patch --signature-file file

2014-05-18 Thread Jeremiah Mahler
Peff, Lots of good suggestions. I had to expand upon the signature pattern match to get to work. On Sun, May 18, 2014 at 07:20:20AM -0400, Jeff King wrote: On Sat, May 17, 2014 at 09:02:22AM -0700, Jeremiah Mahler wrote: ... +test_expect_success 'format-patch --signature-file file' ' +

[RFC/PATCH] replace: add --graft option

2014-05-18 Thread Christian Couder
The usage string for this option is: git replace [-f] --graft commit [parent...] First we create a new commit that is the same as commit except that its parents are [parents...] Then we create a replace ref that replace commit with the commit we just created. With this new option, it should be

Re: [GUILT v3 14/31] Use git check-ref-format to validate patch names.

2014-05-18 Thread Per Cederqvist
On Fri, May 16, 2014 at 5:20 PM, Jeff Sipek jef...@josefsipek.net wrote: On Fri, May 16, 2014 at 04:46:01PM +0200, Per Cederqvist wrote: The valid_patchname now lets git check-ref-format do its job instead of trying (and failing) to implement the same rules. See git-check-ref-format(1) for a

Re: [GUILT v3 09/31] Test suite: properly check the exit status of commands.

2014-05-18 Thread Per Cederqvist
On Fri, May 16, 2014 at 5:45 PM, Jeff Sipek jef...@josefsipek.net wrote: On Fri, May 16, 2014 at 04:45:56PM +0200, Per Cederqvist wrote: The cmd and shouldfail functions checked the exit status of the replace_path function instead of the actual command that was running. (The $? construct

[PATCH v4] format-patch --signature-file file

2014-05-18 Thread Jeremiah Mahler
Added option that allows a signature file to be used with format-patch so that signatures with newlines and other special characters can be easily included. $ git format-patch --signature-file ~/.signature -1 The config variable format.signaturefile is also provided so that it can be added by

[PATCH v4] format-patch --signature-file file

2014-05-18 Thread Jeremiah Mahler
v4 of patch to add format-patch --signature-file file option. This revision includes more suggestions from Jeff King: - Added a format.signaturefile config option. - Fixed error messages, --signature and format.signature - Fixed error checking, dies if strbuf_read_file fails. - style:

[PATCH] rebase --keep-empty -i: add test

2014-05-18 Thread Michael S. Tsirkin
There's some special code in rebase -i to deal with --keep-empty. Add test for this combination. Signed-off-by: Michael S. Tsirkin m...@redhat.com --- t/t3404-rebase-interactive.sh | 9 + 1 file changed, 9 insertions(+) diff --git a/t/t3404-rebase-interactive.sh

[PATCH 2/4] git-rebase: document ack

2014-05-18 Thread Michael S. Tsirkin
document ack! behaviour and use Signed-off-by: Michael S. Tsirkin m...@redhat.com --- Documentation/git-rebase.txt | 45 +++- 1 file changed, 40 insertions(+), 5 deletions(-) diff --git a/Documentation/git-rebase.txt b/Documentation/git-rebase.txt index

[PATCH 3/4] rebase: test ack

2014-05-18 Thread Michael S. Tsirkin
test ack! handling Signed-off-by: Michael S. Tsirkin m...@redhat.com --- t/t3415-rebase-autosquash.sh | 15 +++ 1 file changed, 15 insertions(+) diff --git a/t/t3415-rebase-autosquash.sh b/t/t3415-rebase-autosquash.sh index 41370ab..9d7db13 100755 --- a/t/t3415-rebase-autosquash.sh

[PATCH 1/4] rebase -i: add ack action

2014-05-18 Thread Michael S. Tsirkin
This implements a new ack! action for git rebase -i It is essentially a middle ground between fixup! and squash!: - commits are squashed silently without editor being started - commit logs are concatenated (with action line being discarded) - because of the above, empty commits aren't discarded,

[PATCH 0/4] ack recoding in commit log

2014-05-18 Thread Michael S. Tsirkin
As a maintainer, I often get patches by mail, then acked-by,reviewed-by etc responses are sent by separate mail. I like making acks commits, this way they are easy to keep track of as part of git history. Since response mail happens to have appropriate subject matching the patch, it's a natural

[PATCH 4/4] git-ack: record an ack

2014-05-18 Thread Michael S. Tsirkin
This is a simple script that I use by piping incoming mail with an ack to it. It produces an empty ack commit suitable for squshing with git rebase -i -autosquash. Works best if people ack individual commits: you simply pipe each ack to git ack, before pushing your branch, rebase. Some people

[GUILT v4 00/33] Teach guilt import-commit how to create legal patch names, and more

2014-05-18 Thread Per Cederqvist
This is version 4 of the patch series I sent back on 21 Mar 2014. I have addressed all feedback to date, update the documentation where needed, improved the error handling in the cmd and shouldfail functions in the test suite, fixed compatibility with older Git versions, and added signed-off-by

[GUILT v4 01/33] The tests should not fail if guilt.diffstat is set.

2014-05-18 Thread Per Cederqvist
Explicitly set guilt.diffstat to its default value. Without this, the 027 test (and possibly others) fail if guilt.diffstat is set to true in ~/.gitconfig. Signed-off-by: Per Cederqvist ced...@opera.com Signed-off-by: Josef 'Jeff' Sipek jef...@josefsipek.net --- regression/scaffold | 1 + 1

[GUILT v4 02/33] Allow guilt delete -f to run from a dir which contains spaces.

2014-05-18 Thread Per Cederqvist
Signed-off-by: Per Cederqvist ced...@opera.com Signed-off-by: Josef 'Jeff' Sipek jef...@josefsipek.net --- guilt-delete | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/guilt-delete b/guilt-delete index 3e394f8..967ac10 100755 --- a/guilt-delete +++ b/guilt-delete @@ -49,7

[GUILT v4 04/33] Allow guilt import-commit to run from a dir which contains spaces.

2014-05-18 Thread Per Cederqvist
Signed-off-by: Per Cederqvist ced...@opera.com Signed-off-by: Josef 'Jeff' Sipek jef...@josefsipek.net --- guilt-import-commit | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/guilt-import-commit b/guilt-import-commit index 20dcee2..f14647c 100755 ---

[GUILT v4 03/33] Added test case for guilt delete -f.

2014-05-18 Thread Per Cederqvist
Ensure that the file really is deleted. Signed-off-by: Per Cederqvist ced...@opera.com Signed-off-by: Josef 'Jeff' Sipek jef...@josefsipek.net --- regression/t-026.out | 15 +++ regression/t-026.sh | 5 - 2 files changed, 19 insertions(+), 1 deletion(-) diff --git

[GUILT v4 06/33] Fix the do_get_patch function.

2014-05-18 Thread Per Cederqvist
A patch file consists of: (1) the description (2) optional diffstat (3) the patches When extracting the patch, we only want part 3. The do_get_patch used to give us part 2 and part 3. That made for instance this series of operations fail if guilt.diffstat is true: $ guilt new empty-1

[GUILT v4 07/33] Added test cases for guilt fold.

2014-05-18 Thread Per Cederqvist
Test that we can combine any combination of patches with empty and non-empty messages, both with and without guilt.diffstat. (All patches are empty.) Signed-off-by: Per Cederqvist ced...@opera.com Signed-off-by: Josef 'Jeff' Sipek jef...@josefsipek.net --- regression/t-035.out | 467

[GUILT v4 05/33] guilt new: Accept more than 4 arguments.

2014-05-18 Thread Per Cederqvist
The argument parser arbitrarily refused to accept more than 4 arguments. That made it impossible to run guilt new -f -s -m msg patch. Removed the checks for the number of arguments from the guilt new parser -- the other checks that are already there are enough to catch all errors. Give a better

[GUILT v4 08/33] Added more test cases for guilt new: empty patches.

2014-05-18 Thread Per Cederqvist
Test that empty patches are handled correctly, both with and without the guilt.diffstat configuration option. Signed-off-by: Per Cederqvist ced...@opera.com Signed-off-by: Josef 'Jeff' Sipek jef...@josefsipek.net --- regression/t-020.out | 269 +++

[GUILT v4 09/33] Test suite: properly check the exit status of commands.

2014-05-18 Thread Per Cederqvist
The cmd and shouldfail functions checked the exit status of the replace_path function instead of the actual command that was running. (The $? construct checks the exit status of the last command in a pipeline, not the first command.) Print an explicit error message if a command that should fail

[GUILT v4 10/33] Run test_failed if the exit status of a test script is bad.

2014-05-18 Thread Per Cederqvist
There were two problems with the old code: - Since set -e is in effect (that is set in scaffold) the run-test script exited immediately if a t-*.sh script failed. This is not nice, as we want the error report that test_failed prints. - The code ran cd - between running the t-*.sh script

[GUILT v4 13/33] Check that guilt header '.*' fails.

2014-05-18 Thread Per Cederqvist
Signed-off-by: Per Cederqvist ced...@opera.com Signed-off-by: Josef 'Jeff' Sipek jef...@josefsipek.net --- regression/t-028.out | 7 +++ regression/t-028.sh | 4 2 files changed, 11 insertions(+) diff --git a/regression/t-028.out b/regression/t-028.out index 1564c09..ea72a3a 100644 ---

[GUILT v4 12/33] guilt header: more robust header selection.

2014-05-18 Thread Per Cederqvist
If you run something like guilt header '.*' the command would crash, because the grep comand that tries to ensure that the patch exist would detect a match, but the later code expected the match to be exact. Fixed by comparing exact strings. And as a creeping feature guilt header will now try to

[GUILT v4 14/33] Use git check-ref-format to validate patch names.

2014-05-18 Thread Per Cederqvist
The valid_patchname now lets git check-ref-format do its job instead of trying (and failing) to implement the same rules. See git-check-ref-format(1) for a list of the rules. Re-implement rules added to git check-ref-format after Git 1.5.0, so that guilt rejects the same names no matter what

[GUILT v4 11/33] test suite: remove pointless redirection.

2014-05-18 Thread Per Cederqvist
The shouldfail function already redirects stderr to stdout, so there is no need to do the same in t-028.sh and t-021.sh. Signed-off-by: Per Cederqvist ced...@opera.com Signed-off-by: Josef 'Jeff' Sipek jef...@josefsipek.net --- regression/t-021.sh | 2 +- regression/t-025.sh | 2 +-

[GUILT v4 15/33] Produce legal patch names in guilt-import-commit.

2014-05-18 Thread Per Cederqvist
Try harder to create patch names that adhere to the rules in git-check-ref-format(1) when deriving a patch name from the commit message. Verify that the derived name using git check-ref-format, and as a final fallback simply use the patch name x (to ensure that the code is future-proof in case

[GUILT v4 17/33] guilt graph no longer loops when no patches are applied.

2014-05-18 Thread Per Cederqvist
Give an error message if no patches are applied. Added a test case that never terminates unless this fix is applied. Signed-off-by: Per Cederqvist ced...@opera.com Signed-off-by: Josef 'Jeff' Sipek jef...@josefsipek.net --- guilt-graph | 9 +++-- regression/t-033.out | 3 +++

[GUILT v4 16/33] Fix backslash handling when creating names of imported patches.

2014-05-18 Thread Per Cederqvist
The 'echo $s' construct sometimes processes escape sequences. (This happens, for instance, under Ubuntu 14.04 when /bin/sh is actually dash.) We don't want that to happen when we are importing commits, so use 'printf %s $s' instead. (The -E option of bash that explicitly disables backslash

[GUILT v4 19/33] Check that guilt graph works when working on a branch with a comma.

2014-05-18 Thread Per Cederqvist
git branch names can contain commas. Check that guilt graph works even in that case. Signed-off-by: Per Cederqvist ced...@opera.com Signed-off-by: Josef 'Jeff' Sipek jef...@josefsipek.net --- regression/t-033.out | 65 regression/t-033.sh |

[GUILT v4 18/33] guilt-graph: Handle commas in branch names.

2014-05-18 Thread Per Cederqvist
This fix relies on the fact that git branch names can not contain :. Signed-off-by: Per Cederqvist ced...@opera.com Signed-off-by: Josef 'Jeff' Sipek jef...@josefsipek.net --- guilt-graph | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/guilt-graph b/guilt-graph index

[GUILT v4 20/33] guilt graph: Handle patch names containing quotes.

2014-05-18 Thread Per Cederqvist
Quote quotes with a backslash in the guilt graph output. Otherwise, the dot file could contain syntax errors. Added a test case. Signed-off-by: Per Cederqvist ced...@opera.com Signed-off-by: Josef 'Jeff' Sipek jef...@josefsipek.net --- guilt-graph | 2 ++ regression/t-033.out | 22

[GUILT v4 21/33] The log.decorate setting should not influence import-commit.

2014-05-18 Thread Per Cederqvist
Use --no-decorate in the call to git log that tries to read the commit message to produce patch names. Otherwise, if the user has set log.decorate to short or full, the patch name will be less useful. Modify the t-034.sh test case to demonstrate that this is needed. Signed-off-by: Per

[GUILT v4 22/33] The log.decorate setting should not influence patchbomb.

2014-05-18 Thread Per Cederqvist
Signed-off-by: Per Cederqvist ced...@opera.com Signed-off-by: Josef 'Jeff' Sipek jef...@josefsipek.net --- guilt-patchbomb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/guilt-patchbomb b/guilt-patchbomb index 1231418..164b10c 100755 --- a/guilt-patchbomb +++

[GUILT v4 23/33] The log.decorate setting should not influence guilt rebase.

2014-05-18 Thread Per Cederqvist
Signed-off-by: Per Cederqvist ced...@opera.com Signed-off-by: Josef 'Jeff' Sipek jef...@josefsipek.net --- guilt-rebase | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/guilt-rebase b/guilt-rebase index fd28e48..a1714a0 100755 --- a/guilt-rebase +++ b/guilt-rebase @@ -66,7

[GUILT v4 25/33] guilt push now fails when there are no more patches to push.

2014-05-18 Thread Per Cederqvist
This makes it easier to script operations on the entire queue, for example run the test suite on each patch in the queue: guilt pop -a;while guilt push; do make test||break; done This brings guilt push in line with the push operation in Mercurial Queues (hg qpush), which fails when there are

[GUILT v4 26/33] guilt pop now fails when there are no more patches to pop.

2014-05-18 Thread Per Cederqvist
This is analogous to how guilt push now fails when there are no more patches to push. Like push, the --all argument still succeeds even if there was no need to pop anything. Updated the test suite. Signed-off-by: Per Cederqvist ced...@opera.com Signed-off-by: Josef 'Jeff' Sipek

[GUILT v4 27/33] Minor testsuite fix.

2014-05-18 Thread Per Cederqvist
Fix remove_topic() in t-061.sh so that it doesn't print a git hash. Signed-off-by: Per Cederqvist ced...@opera.com Signed-off-by: Josef 'Jeff' Sipek jef...@josefsipek.net --- regression/t-061.out | 1 - regression/t-061.sh | 2 +- 2 files changed, 1 insertion(+), 2 deletions(-) diff --git

[GUILT v4 28/33] Fix coding style errors in t-061.sh.

2014-05-18 Thread Per Cederqvist
Signed-off-by: Per Cederqvist ced...@opera.com Signed-off-by: Josef 'Jeff' Sipek jef...@josefsipek.net --- regression/t-061.sh | 6 ++ 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/regression/t-061.sh b/regression/t-061.sh index db26e12..bda50c7 100755 ---

[GUILT v4 29/33] Added guilt.reusebranch configuration option.

2014-05-18 Thread Per Cederqvist
When the option is true, Guilt does not create a new Git branch when patches are applied. This way, you can switch between Guilt 0.35 and the current version of Guilt with no issues. By default, the option is false, so that all users will immediately get the added protection against pushing a

[GUILT v4 30/33] Added a short style guide, and Emacs settings.

2014-05-18 Thread Per Cederqvist
Signed-off-by: Per Cederqvist ced...@opera.com Signed-off-by: Josef 'Jeff' Sipek jef...@josefsipek.net --- .dir-locals.el | 3 +++ Documentation/Contributing | 15 +++ 2 files changed, 18 insertions(+) create mode 100644 .dir-locals.el diff --git a/.dir-locals.el

[GUILT v4 32/33] Improved doc and tests for guilt header.

2014-05-18 Thread Per Cederqvist
--- Documentation/guilt-header.txt | 5 - regression/t-028.out | 9 + regression/t-028.sh| 3 +++ 3 files changed, 16 insertions(+), 1 deletion(-) diff --git a/Documentation/guilt-header.txt b/Documentation/guilt-header.txt index 870bfaf..71b2e66 100644 ---

[GUILT v4 33/33] Document the exit status of guilt push and guilt pop.

2014-05-18 Thread Per Cederqvist
--- Documentation/guilt-pop.txt | 3 +++ Documentation/guilt-push.txt | 3 +++ 2 files changed, 6 insertions(+) diff --git a/Documentation/guilt-pop.txt b/Documentation/guilt-pop.txt index 36fea9e..b0b89cc 100644 --- a/Documentation/guilt-pop.txt +++ b/Documentation/guilt-pop.txt @@ -26,6 +26,9

Re: [PATCH] remote-helpers: point at their upstream repositories

2014-05-18 Thread Felipe Contreras
Matthieu Moy wrote: Felipe Contreras felipe.contre...@gmail.com writes: % git fetch WARNING: git-remote-hg is now maintained independently. WARNING: For more information visit https://github.com/felipec/git-remote-hg searching for changes no changes found I don't think the

Re: [PATCH] remote-helpers: point at their upstream repositories

2014-05-18 Thread Junio C Hamano
Felipe Contreras felipe.contre...@gmail.com writes: But that being said, this is Felipe's code. While we have a legal right to distribute it in v2.0, if he would really prefer it out for v2.0, I would respect that. I am fine with that. Are you? Because in two of the three options you

Re: [PATCH] remote-helpers: point at their upstream repositories

2014-05-18 Thread Junio C Hamano
Jeff King p...@peff.net writes: My concerns were with people not noticing the README. Removing the code entirely is the way I thought of to address that. Junio suggested another way, which I would also be fine with. And it seems like a friendlier way than removal to handle it for v2.0, if we

Re: [PATCH] rebase --keep-empty -i: add test

2014-05-18 Thread Neil Horman
On Sun, May 18, 2014 at 11:28:39PM +0300, Michael S. Tsirkin wrote: There's some special code in rebase -i to deal with --keep-empty. Add test for this combination. Signed-off-by: Michael S. Tsirkin m...@redhat.com Acked-by: Neil Horman nhor...@tuxdriver.com ---

Re: [PATCH 2/4] git-rebase: document ack

2014-05-18 Thread Eric Sunshine
On Sun, May 18, 2014 at 5:17 PM, Michael S. Tsirkin m...@redhat.com wrote: document ack! behaviour and use Signed-off-by: Michael S. Tsirkin m...@redhat.com --- Documentation/git-rebase.txt | 45 +++- 1 file changed, 40 insertions(+), 5 deletions(-)

[ANNOUNCE] git reintegrate v0.3; manager of integration branches

2014-05-18 Thread Felipe Contreras
Hi, git reintegrate is a helper tool to manage integration branches, it has all the options of other known tools. This is a rewrite of John Keeping's git-integration in Ruby, it has essentially the same features and passes all the git-integration tests, but it has more features. One feature

[ANNOUNCE] git related v0.3

2014-05-18 Thread Felipe Contreras
Hi, This tool finds people that might be interested in a patch, by going back through the history for each single hunk modified, and finding people that reviewed, acknowledged, signed, or authored the code the patch is modifying. It does this by running `git blame` incrementally on each hunk,

[ANNOUNCE] git send-series v0.1

2014-05-18 Thread Felipe Contreras
Hi, This tool allows you to maintain a patch series more easily. You can store the cover letter, the cc list, version of the series, and other metadata. By default it will use the currently checked out branch, and show you a template like this: version: cc: Subject Content.

Re: [PATCH] remote-helpers: point at their upstream repositories

2014-05-18 Thread Felipe Contreras
Junio C Hamano wrote: Felipe Contreras felipe.contre...@gmail.com writes: But that being said, this is Felipe's code. While we have a legal right to distribute it in v2.0, if he would really prefer it out for v2.0, I would respect that. I am fine with that. Are you? Because in

bug: autostash is lost after aborted rebase

2014-05-18 Thread Karen Etheridge
scenario: - edit some tracked files; do not add them to the index - git config rebase.autostash true - git rebase -i HEAD~3 (an autostash will be created) - delete the entire buffer and save/exit the editor - this will abort the rebase poof, the autostash is gone (it is not reapplied) -- it

Re: [PATCH] remote-helpers: point at their upstream repositories

2014-05-18 Thread Felipe Contreras
Junio C Hamano wrote: My suggestion to rename the directory without smudging the scripts was meant to be a step that can come before that step, and I think its necessity is debatable. It depends on how gradual a transition you want to give, and being always the more cautious type, I think

RE: bug: autostash is lost after aborted rebase

2014-05-18 Thread Felipe Contreras
Karen Etheridge wrote: scenario: - edit some tracked files; do not add them to the index - git config rebase.autostash true - git rebase -i HEAD~3 (an autostash will be created) - delete the entire buffer and save/exit the editor - this will abort the rebase poof, the autostash is