Re: cherry-picking fails after making a directory a submodule

2018-01-08 Thread Per Cederqvist
On Mon, Jan 8, 2018 at 10:46 PM, Stefan Beller wrote: > On Mon, Jan 8, 2018 at 1:08 PM, Per Cederqvist wrote: >> I have a situation where I have switched a directory from being a >> subdirectory to being a submodule. I then try to cherry-pick a commit >> from a taskbranch

cherry-picking fails after making a directory a submodule

2018-01-08 Thread Per Cederqvist
I have a situation where I have switched a directory from being a subdirectory to being a submodule. I then try to cherry-pick a commit from a taskbranch that was made before the switch to the master branch. The commit touches a file outside the subdirectory/submodule. Yet "git cherry-pick" fails

Re: git log: invert --author and --committer

2016-05-23 Thread Per Cederqvist
On Mon, May 23, 2016 at 9:26 PM, Junio C Hamano wrote: > Junio C Hamano writes: > >> Per Cederqvist writes: >> >>> git log --invert-grep --author cibot >>... >> Yeah, the author/committer search piggy-backs the more generic "grep >> in

git log: invert --author and --committer

2016-05-23 Thread Per Cederqvist
We have a repository that mostly contains configuration data. This is updated by our continuous integration build system, but every once in a while there are also more interesting commits made by humans. For several years I have suffered in silence, wishing for a way to do something like git

Re: [PATCH 10/10] submodule deinit: complain when given a file instead of a submodule

2016-05-02 Thread Per Cederqvist
959bbdf0 (submodule: fix regression for > deinit without submodules, 2016-03-22), this also disallows the use > of `git submodule deinit .` to deinit all submodules, when no > submodules are present. `deinit .` continues to work on repositories, > which have at least one submo

"git submodule deinit -f ." no longer works when there are no submodules

2016-03-22 Thread Per Cederqvist
It used to be possible to run git submodule deinit -f . to remove any submodules, no matter how many submodules you had. That is no longer possible in projects that don't have any submodules at all. The command will fail with: error: pathspec '.' did not match any file(s) known to git.

"git submodule sync --recursive" documentation omission

2015-12-02 Thread Per Cederqvist
The git-submodule(1) is inconsistent. In the synopsis, it says: git submodule [--quiet] sync [--recursive] [--] [...] The description of the sync does not mention --recursive, and the description of --recursive says that it is only available for foreach, update and status. The option appe

Re: [PATCH 2/2] pager_in_use: make sure output is still going to pager

2015-08-11 Thread Per Cederqvist
On Mon, Aug 10, 2015 at 7:24 PM, Jeff King wrote: > On Mon, Aug 10, 2015 at 06:38:10PM +0200, Johannes Schindelin wrote: > >> > +const char *pipe_id_get(int fd) >> > +{ >> > + static struct strbuf id = STRBUF_INIT; >> > + struct stat st; >> > + >> > + if (fstat(fd, &st) < 0 || !S_ISFIFO(st.s

"git pull --rebase" fails if pager.pull is true, after producing a colorized diff it cannot apply

2015-08-03 Thread Per Cederqvist
d commit; this make the history non-linear, but since # the commit only touched a new file it should be trivial to linearize # it. (cd repo-b && echo one > b && git add b && git commit -m"First B commit") # Set pager.pull true so that we trigger the bug. (cd repo-b &

Re: [GUILT 1/5] Fix generation of Documentation/usage-%.txt.

2015-01-23 Thread Per Cederqvist
On Fri, Jan 23, 2015 at 3:21 PM, Jeff Sipek wrote: > On Fri, Jan 23, 2015 at 02:24:55PM +0100, Per Cederqvist wrote: >> The old rule worked, most of the time, but had several issues: >> >> - It depended on the corresponding guilt-*.txt file, but the usage.sh >>scr

[GUILT 1/2] guilt graph: Simplify getfiles.

2015-01-23 Thread Per Cederqvist
git diff-tree by default emits TAB-separated fields. cut by defaults processes TAB-separated fields. Simplify getfiles() by using TAB as the separator. Signed-off-by: Per Cederqvist --- guilt-graph | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/guilt-graph b/guilt-graph

[GUILT 2/2] Teach "guilt graph" the "-x exclude-pattern" option.

2015-01-23 Thread Per Cederqvist
times to ignore many files. Each argument is saved to a temporary file and "grep -v -f $TEMPORARY" is used to filter out the file names you want to ignore. Also added a minimal test case and documentation. Signed-off-by: Per Cederqvist --- Documentation/guilt-graph.txt | 5 + g

[GUILT 0/2] Teach "guilt graph" to ignore some files.

2015-01-23 Thread Per Cederqvist
r.cz/guilt/ceder.git repository. (That branch is based on the doc-dash-2015-v1 branch that contains my documentation fixes, so if you just want these two commits you will have to cherry-pick.)) /ceder Per Cederqvist (2): guilt graph: Simplify getfiles. Teach "guilt graph" t

[GUILT 5/5] doc: git doesn't use git-foo invocations.

2015-01-23 Thread Per Cederqvist
Make them into reference to the man pages instead. Signed-off-by: Per Cederqvist --- Documentation/guilt-add.txt | 2 +- Documentation/guilt-refresh.txt | 2 +- Documentation/guilt-rm.txt | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/Documentation/guilt-add.txt

[GUILT 4/5] doc: don't use guilt-foo invocations in usage messages.

2015-01-23 Thread Per Cederqvist
Signed-off-by: Per Cederqvist --- Documentation/usage.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Documentation/usage.sh b/Documentation/usage.sh index 629f546..9cc49f7 --- a/Documentation/usage.sh +++ b/Documentation/usage.sh @@ -2,4 +2,4 @@ name=$(basename $1) u

[GUILT 3/5] doc: don't use guilt-foo invocations in examples.

2015-01-23 Thread Per Cederqvist
nother file. I know too little docbook to be able to find the cause. Signed-off-by: Per Cederqvist --- Documentation/guilt-add.txt| 2 +- Documentation/guilt-delete.txt | 2 +- Documentation/guilt-diff.txt | 2 +- Documentation/guilt-help.txt | 4 ++-- Documentation/guilt-new.txt|

[GUILT 2/5] doc: guilt.xml depends on cmds.txt.

2015-01-23 Thread Per Cederqvist
.gitignore. Signed-off-by: Per Cederqvist --- Documentation/.gitignore | 3 +++ Documentation/Makefile | 2 ++ 2 files changed, 5 insertions(+) diff --git a/Documentation/.gitignore b/Documentation/.gitignore index c4f0588..9b8d4da 100644 --- a/Documentation/.gitignore +++ b/Documentation/.gitignore

[GUILT 1/5] Fix generation of Documentation/usage-%.txt.

2015-01-23 Thread Per Cederqvist
t price to get the correctness. This command is still very fast compared to the docbook processing. Signed-off-by: Per Cederqvist --- Documentation/Makefile | 4 ++-- Documentation/usage.sh | 8 +++- 2 files changed, 5 insertions(+), 7 deletions(-) diff --git a/Documentation/Makefile b/Documentat

[GUILT 0/5] doc: less guilt-foo invocations, minor Makefile fixes

2015-01-23 Thread Per Cederqvist
t-add(1), so it might be wise to follow suite. While working on this, I also found two minor issues with Documentation/Makefile. /ceder Per Cederqvist (5): Fix generation of Documentation/usage-%.txt. doc: guilt.xml depends on cmds.txt. doc: don't use guilt-foo invocations in e

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

2015-01-22 Thread Per Cederqvist
4e..593e9da 100644 > --- a/regression/scaffold > +++ b/regression/scaffold > @@ -50,7 +50,7 @@ function filter_dd > # usage: cmd .. > function cmd > { > - echo "% $@" > + printf "%% %s\n" "$*" > if ! ( > exec 3>&

[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

[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 --- a/Doc

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

2014-05-18 Thread Per Cederqvist
Signed-off-by: Per Cederqvist Signed-off-by: Josef 'Jeff' Sipek --- .dir-locals.el | 3 +++ Documentation/Contributing | 15 +++ 2 files changed, 18 insertions(+) create mode 100644 .dir-locals.el diff --git a/.dir-locals.el b/.dir-locals.el new file mode 10

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

2014-05-18 Thread Per Cederqvist
branch upstream with a patch applied. While this might break guilt if a user is running both version 0.35 and the current version against the same local repository, it will not lead to data loss, and that situation is probably rare. Signed-off-by: Per Cederqvist Signed-off-by: Josef 'Jeff&#

[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 Signed-off-by: Josef 'Jeff' Sipek --- regression/t-061.out | 1 - regression/t-061.sh | 2 +- 2 files changed, 1 insertion(+), 2 deletions(-) diff --git a/regression/t-061.out b/r

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

2014-05-18 Thread Per Cederqvist
Signed-off-by: Per Cederqvist Signed-off-by: Josef 'Jeff' Sipek --- 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 --- a/regression/t-061.sh +++ b/regression/t-061.s

[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 Signed-off-by: Josef 'Je

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

2014-05-18 Thread Per Cederqvist
when there are no patches to apply. Updated the test suite. "guilt push -a" still does not fail. (It successfully manages to ensure that all patches are pushed, even if it did not have to do anything to make it so.) Signed-off-by: Per Cederqvist Signed-off-by: Josef 'Jef

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

2014-05-18 Thread Per Cederqvist
Signed-off-by: Per Cederqvist Signed-off-by: Josef 'Jeff' Sipek --- 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 +++ b/guilt-patchbomb @@ -47,7 +47,7 @@ if

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

2014-05-18 Thread Per Cederqvist
Signed-off-by: Per Cederqvist Signed-off-by: Josef 'Jeff' Sipek --- 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 +66,7 @@ pop_all_patches git

[GUILT v4 24/33] disp no longer processes backslashes.

2014-05-18 Thread Per Cederqvist
sh processing is required, and changed "disp" and "_disp" to use printf code "%s" instead of "%b". Signed-off-by: Per Cederqvist Signed-off-by: Josef 'Jeff' Sipek --- guilt | 17 + 1 file changed, 13 insertions(+), 4 deletions(-)

[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 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 Signed-off-by: Josef 'Jeff' Sipek --- guilt-graph | 2 ++ regression/t-033.out | 22

[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 Signed-off-by: Josef 'Jeff' Sipek --- regression/t-033.out | 65 regre

[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 Signed-off-by: Josef 'Jeff' Sipek --- guilt-graph | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/guilt-graph b/guilt-graph index 56d0e77..924a63e 1007

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

2014-05-18 Thread Per Cederqvist
that explicitly disables backslash expansion is not portable; it is not supported by dash.) Signed-off-by: Per Cederqvist Signed-off-by: Josef 'Jeff' Sipek --- guilt-import-commit | 2 +- regression/t-034.out | 14 +++--- 2 files changed, 8 insertions(+), 8 deletions(-) di

[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 Signed-off-by: Josef 'Jeff' Sipek --- guilt-graph | 9 +++-- regression/t-033.out | 3 +++ regression/t-03

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

2014-05-18 Thread Per Cederqvist
e is future-proof in case new rules are added in the future). Always append a ".patch" suffix to the patch name. Added test cases. Signed-off-by: Per Cederqvist Signed-off-by: Josef 'Jeff' Sipek --- guilt-import-comm

[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 Signed-off-by: Josef 'Jeff' Sipek --- regression/t-021.sh | 2 +- regression/t-025.sh | 2 +- regression/t-028.sh | 2 +- 3 files

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

2014-05-18 Thread Per Cederqvist
Signed-off-by: Per Cederqvist Signed-off-by: Josef 'Jeff' Sipek --- 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 --- a/regression/t-028

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

2014-05-18 Thread Per Cederqvist
this so that "guilt push" also accepts a unique regular expression.) Signed-off-by: Per Cederqvist Signed-off-by: Josef 'Jeff' Sipek --- guilt-header | 29 ++--- 1 file changed, 26 insertions(+), 3 deletions(-) diff --git a/guilt-header b/guilt-heade

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

2014-05-18 Thread Per Cederqvist
names no matter what version of Git we are using (but versions prior to 1.5.0 are not supported). Refer to the git-check-ref-format(1) man page in the error messages produced when valid_patchname indicates that the name is bad. Added testcases that breaks most of the rules in that man-page.

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

2014-05-18 Thread Per Cederqvist
n running the t-*.sh script and checking the exit status, so the exit status was lost. (Actually, the exit status was saved in $ERR, but nothing ever looked at $ERR.) Signed-off-by: Per Cederqvist Signed-off-by: Josef 'Jeff' Sipek --- regression/run-tests | 10 +++--- 1 fi

[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 Signed-off-by: Josef 'Jeff' Sipek --- regression/t-020.out | 269 +++ regression/t-020

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

2014-05-18 Thread Per Cederqvist
command that should fail actually succeeds. Updated t-032.sh, which used "shouldfail" instead of "cmd" in one place. (The comment in the script makes it clear that the command is expected to succeed.) Signed-off-by: Per Cederqvist --- regression/scaffold | 23 +++

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

2014-05-18 Thread Per Cederqvist
all errors. Give a better error message if "-m" isn't followed by a message argument. Signed-off-by: Per Cederqvist Signed-off-by: Josef 'Jeff' Sipek --- guilt-new | 7 +++ 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/guilt-new b/guilt-new index

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

2014-05-18 Thread Per Cederqvist
$ guilt new empty-2 $ guilt pop Now at empty-1 $ guilt fold empty-2 $ guilt pop All patches popped. $ guilt push Applying patch..empty-1 fatal: unrecognized input To force apply this patch, use 'guilt push -f' Signed-off-by: Per Cederqvist Signed-off

[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 Signed-off-by: Josef 'Jeff' Sipek --- regression/t-035

[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 Signed-off-by: Josef 'Jeff' Sipek --- regression/t-026.out | 15 +++ regression/t-026.sh | 5 - 2 files changed, 19 insertions(+), 1 deletion(-) diff --git a/regression/t-026.out b/regression

[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 Signed-off-by: Josef 'Jeff' Sipek --- 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 +49,7 @@ series_remove_pat

[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 Signed-off-by: Josef 'Jeff' Sipek --- 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 --- a/guilt-import-commit +++ b/guilt-import-commi

[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 Signed-off-by: Josef 'Jeff' Sipek --- regression/scaffold | 1 + 1 file changed, 1 insertion(+)

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

2014-05-18 Thread Per Cederqvist
ilt pop." This patch series is also available on http://repo.or.cz/w/guilt/ceder.git in the "oslo-2014-v4" branch. If you already have a copy of guilt, you should be able to fetch that branch with something like: git remote add ceder http://repo.or.cz/r/guilt/ceder.git git f

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 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. &

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 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-

[GUILT v3 13/31] Check that "guilt header '.*'" fails.

2014-05-16 Thread Per Cederqvist
Signed-off-by: Per Cederqvist Signed-off-by: Josef 'Jeff' Sipek --- 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 --- a/regression/t-028

[GUILT v3 30/31] Added a short style guide, and Emacs settings.

2014-05-16 Thread Per Cederqvist
Signed-off-by: Per Cederqvist Signed-off-by: Josef 'Jeff' Sipek --- .dir-locals.el | 3 +++ Documentation/Contributing | 15 +++ 2 files changed, 18 insertions(+) create mode 100644 .dir-locals.el diff --git a/.dir-locals.el b/.dir-locals.el new file mode 10

[GUILT v3 29/31] Added guilt.reusebranch configuration option.

2014-05-16 Thread Per Cederqvist
branch upstream with a patch applied. While this might break guilt if a user is running both version 0.35 and the current version against the same local repository, it will not lead to data loss, and that situation is probably rare. Signed-off-by: Per Cederqvist --- guilt| 24

[GUILT v3 26/31] "guilt pop" now fails when there are no more patches to pop.

2014-05-16 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 Signed-off-by: Josef 'Je

[GUILT v3 28/31] Fix coding style errors in t-061.sh.

2014-05-16 Thread Per Cederqvist
Signed-off-by: Per Cederqvist --- 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 --- a/regression/t-061.sh +++ b/regression/t-061.sh @@ -15,8 +15,7 @@ old_style_branch

[GUILT v3 27/31] Minor testsuite fix.

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

[GUILT v3 25/31] "guilt push" now fails when there are no more patches to push.

2014-05-16 Thread Per Cederqvist
when there are no patches to apply. Updated the test suite. "guilt push -a" still does not fail. (It successfully manages to ensure that all patches are pushed, even if it did not have to do anything to make it so.) Signed-off-by: Per Cederqvist Signed-off-by: Josef 'Jef

[GUILT v3 22/31] The log.decorate setting should not influence patchbomb.

2014-05-16 Thread Per Cederqvist
Signed-off-by: Per Cederqvist Signed-off-by: Josef 'Jeff' Sipek --- 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 +++ b/guilt-patchbomb @@ -47,7 +47,7 @@ if

[GUILT v3 23/31] The log.decorate setting should not influence guilt rebase.

2014-05-16 Thread Per Cederqvist
Signed-off-by: Per Cederqvist Signed-off-by: Josef 'Jeff' Sipek --- 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 +66,7 @@ pop_all_patches git

[GUILT v3 24/31] disp no longer processes backslashes.

2014-05-16 Thread Per Cederqvist
sh processing is required, and changed "disp" and "_disp" to use printf code "%s" instead of "%b". Signed-off-by: Per Cederqvist Signed-off-by: Josef 'Jeff' Sipek --- guilt | 17 + 1 file changed, 13 insertions(+), 4 deletions(-)

[GUILT v3 20/31] "guilt graph": Handle patch names containing quotes.

2014-05-16 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 Signed-off-by: Josef 'Jeff' Sipek --- guilt-graph | 2 ++ regression/t-033.out | 22

[GUILT v3 19/31] Check that "guilt graph" works when working on a branch with a comma.

2014-05-16 Thread Per Cederqvist
git branch names can contain commas. Check that "guilt graph" works even in that case. Signed-off-by: Per Cederqvist Signed-off-by: Josef 'Jeff' Sipek --- regression/t-033.out | 65 regre

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

2014-05-16 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 v3 17/31] "guilt graph" no longer loops when no patches are applied.

2014-05-16 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 Signed-off-by: Josef 'Jeff' Sipek --- guilt-graph | 9 +++-- regression/t-033.out | 3 +++ regression/t-03

[GUILT v3 18/31] guilt-graph: Handle commas in branch names.

2014-05-16 Thread Per Cederqvist
This fix relies on the fact that git branch names can not contain ":". Signed-off-by: Per Cederqvist Signed-off-by: Josef 'Jeff' Sipek --- guilt-graph | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/guilt-graph b/guilt-graph index 56d0e77..924a63e 1007

[GUILT v3 16/31] Fix backslash handling when creating names of imported patches.

2014-05-16 Thread Per Cederqvist
that explicitly disables backslash expansion is not portable; it is not supported by dash.) Signed-off-by: Per Cederqvist Signed-off-by: Josef 'Jeff' Sipek --- guilt-import-commit | 2 +- regression/t-034.out | 14 +++--- 2 files changed, 8 insertions(+), 8 deletions(-) di

[GUILT v3 15/31] Produce legal patch names in guilt-import-commit.

2014-05-16 Thread Per Cederqvist
e is future-proof in case new rules are added in the future). Always append a ".patch" suffix to the patch name. Added test cases. Signed-off-by: Per Cederqvist Signed-off-by: Josef 'Jeff' Sipek --- guilt-import-comm

[GUILT v3 12/31] "guilt header": more robust header selection.

2014-05-16 Thread Per Cederqvist
this so that "guilt push" also accepts a unique regular expression.) Signed-off-by: Per Cederqvist --- guilt-header | 29 ++--- 1 file changed, 26 insertions(+), 3 deletions(-) diff --git a/guilt-header b/guilt-header index 41e00cc..c3d24f9 100755 --- a/guilt-he

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

2014-05-16 Thread Per Cederqvist
s that the name is bad. Added testcases that breaks most of the rules in that man-page. Git version 1.8.5 no longer allows the single character "@" as a branch name. Guilt always rejects that name, for increased compatibility. Signed-off-by: Per Cederqvist Signed-off-by: Josef 

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

2014-05-16 Thread Per Cederqvist
n running the t-*.sh script and checking the exit status, so the exit status was lost. (Actually, the exit status was saved in $ERR, but nothing ever looked at $ERR.) Signed-off-by: Per Cederqvist Signed-off-by: Josef 'Jeff' Sipek --- regression/run-tests | 10 +++--- 1 fi

[GUILT v3 11/31] test suite: remove pointless redirection.

2014-05-16 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 Signed-off-by: Josef 'Jeff' Sipek --- regression/t-021.sh | 2 +- regression/t-025.sh | 2 +- regression/t-028.sh | 2 +- 3 files

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

2014-05-16 Thread Per Cederqvist
ouldfail" instead of "cmd" in one place. (The comment in the script makes it clear that the command is expected to succeed.) Signed-off-by: Per Cederqvist --- regression/scaffold | 17 +++-- regression/t-032.sh | 2 +- 2 files changed, 12 insertions(+), 7 deletion

[GUILT v3 08/31] Added more test cases for "guilt new": empty patches.

2014-05-16 Thread Per Cederqvist
Test that empty patches are handled correctly, both with and without the guilt.diffstat configuration option. Signed-off-by: Per Cederqvist --- regression/t-020.out | 269 +++ regression/t-020.sh | 60 2 files changed, 329

[GUILT v3 07/31] Added test cases for "guilt fold".

2014-05-16 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 Signed-off-by: Josef 'Jeff' Sipek --- regression/t-035

[GUILT v3 05/31] "guilt new": Accept more than 4 arguments.

2014-05-16 Thread Per Cederqvist
all errors. Give a better error message if "-m" isn't followed by a message argument. Signed-off-by: Per Cederqvist Signed-off-by: Josef 'Jeff' Sipek --- guilt-new | 7 +++ 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/guilt-new b/guilt-new index

[GUILT v3 03/31] Added test case for "guilt delete -f".

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

[GUILT v3 04/31] Allow "guilt import-commit" to run from a dir which contains spaces.

2014-05-16 Thread Per Cederqvist
Signed-off-by: Per Cederqvist Signed-off-by: Josef 'Jeff' Sipek --- 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 --- a/guilt-import-commit +++ b/guilt-import-commi

[GUILT v3 06/31] Fix the do_get_patch function.

2014-05-16 Thread Per Cederqvist
$ guilt new empty-2 $ guilt pop Now at empty-1 $ guilt fold empty-2 $ guilt pop All patches popped. $ guilt push Applying patch..empty-1 fatal: unrecognized input To force apply this patch, use 'guilt push -f' Signed-off-by: Per Cederqvist Signed-off

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

2014-05-16 Thread Per Cederqvist
that branch with something like: git remote add ceder http://repo.or.cz/r/guilt/ceder.git git fetch ceder refs/heads/oslo-2014-v3:refs/remotes/ceder/oslo-2014-v3 A few of the regression/t-*.out files contain non-ASCII characters. I hope they survive the mail transfer; if not, please use the

[GUILT v3 02/31] Allow "guilt delete -f" to run from a dir which contains spaces.

2014-05-16 Thread Per Cederqvist
Signed-off-by: Per Cederqvist Signed-off-by: Josef 'Jeff' Sipek --- 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 +49,7 @@ series_remove_pat

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

2014-05-16 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 Signed-off-by: Josef 'Jeff' Sipek --- regression/scaffold | 1 + 1 file changed, 1 insertion(+)

Re: [GUILT v2 12/29] "guilt header": more robust header selection.

2014-05-16 Thread Per Cederqvist
On Fri, May 16, 2014 at 12:46 AM, Jeff Sipek wrote: > On Tue, May 13, 2014 at 10:30:48PM +0200, Per Cederqvist wrote: >> If you run something like "guilt header '.*'" the command would crash, >> because the grep comand that tries to ensure that the patch exi

Re: [GUILT v2 28/29] Added guilt.reusebranch configuration option.

2014-05-15 Thread Per Cederqvist
On Wed, May 14, 2014 at 5:53 PM, Jeff Sipek wrote: > On Tue, May 13, 2014 at 10:31:04PM +0200, Per Cederqvist wrote: >> When the option is true (the default), Guilt does not create a new Git >> branch when patches are applied. This way, you can switch between >> Guilt

Re: [GUILT v2 08/29] Added more test cases for "guilt new": empty patches.

2014-05-14 Thread Per Cederqvist
On Wed, May 14, 2014 at 7:10 PM, Jeff Sipek wrote: > On Tue, May 13, 2014 at 10:30:44PM +0200, Per Cederqvist wrote: >> Test that empty patches are handled correctly, both with and without >> the guilt.diffstat configuration option. >> >> Signed-off-by: Per Cederqvist

Re: [GUILT v2 00/29] Teach guilt import-commit how to create legal patch names, and more

2014-05-14 Thread Per Cederqvist
On Tue, May 13, 2014 at 11:29 PM, Per Cederqvist wrote: > On Tue, May 13, 2014 at 10:54 PM, Jeff Sipek wrote: >> On Tue, May 13, 2014 at 04:45:47PM -0400, Theodore Ts'o wrote: >>> On Tue, May 13, 2014 at 10:30:36PM +0200, Per Cederqvist wrote: >> ... >>> &g

Re: [GUILT v2 25/29] "guilt push" now fails when there are no more patches to push.

2014-05-14 Thread Per Cederqvist
On Tue, May 13, 2014 at 11:41 PM, Jeff Sipek wrote: > On Tue, May 13, 2014 at 10:31:01PM +0200, Per Cederqvist wrote: >> 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 -

Re: [GUILT v2 16/29] Fix backslash handling when creating names of imported patches.

2014-05-14 Thread Per Cederqvist
On Wed, May 14, 2014 at 12:09 AM, Jeff Sipek wrote: > On Tue, May 13, 2014 at 10:30:52PM +0200, Per Cederqvist wrote: >> The 'echo %s' construct sometimes processes escape sequences. (This > > %s? Should this be $s? Yes. Will fix that typo in v3 of the patch series.

Re: [GUILT v2 07/29] Added test cases for "guilt fold".

2014-05-14 Thread Per Cederqvist
On Tue, May 13, 2014 at 11:30 PM, Jeff Sipek wrote: > On Tue, May 13, 2014 at 10:30:43PM +0200, Per Cederqvist wrote: >> 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.

Re: [GUILT v2 06/29] Fix the do_get_patch function.

2014-05-14 Thread Per Cederqvist
On Tue, May 13, 2014 at 11:13 PM, Jeff Sipek wrote: > On Tue, May 13, 2014 at 10:30:42PM +0200, Per Cederqvist wrote: >> A patch file consists of: >> >> (1) the description >> (2) optional diffstat >> (3) the patches >> >> When extracting the patch

Re: [GUILT v2 00/29] Teach guilt import-commit how to create legal patch names, and more

2014-05-13 Thread Per Cederqvist
On Tue, May 13, 2014 at 10:54 PM, Jeff Sipek wrote: > On Tue, May 13, 2014 at 04:45:47PM -0400, Theodore Ts'o wrote: >> On Tue, May 13, 2014 at 10:30:36PM +0200, Per Cederqvist wrote: > ... >> > - Changed behavior: by default, guilt no longer changes branch when >

[GUILT v2 29/29] Added a short style guide, and Emacs settings.

2014-05-13 Thread Per Cederqvist
Signed-off-by: Per Cederqvist --- .dir-locals.el | 3 +++ Documentation/Contributing | 15 +++ 2 files changed, 18 insertions(+) create mode 100644 .dir-locals.el diff --git a/.dir-locals.el b/.dir-locals.el new file mode 100644 index 000..50ef2b7 --- /dev/null

[GUILT v2 22/29] The log.decorate setting should not influence patchbomb.

2014-05-13 Thread Per Cederqvist
Signed-off-by: Per Cederqvist Signed-off-by: Josef 'Jeff' Sipek --- 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 +++ b/guilt-patchbomb @@ -47,7 +47,7 @@ if

[GUILT v2 23/29] The log.decorate setting should not influence guilt rebase.

2014-05-13 Thread Per Cederqvist
Signed-off-by: Per Cederqvist Signed-off-by: Josef 'Jeff' Sipek --- 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 +66,7 @@ pop_all_patches git

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

2014-05-13 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 v2 24/29] disp no longer processes backslashes.

2014-05-13 Thread Per Cederqvist
sh processing is required, and changed "disp" and "_disp" to use printf code %s instead of "%b". Signed-off-by: Per Cederqvist --- guilt | 17 + 1 file changed, 13 insertions(+), 4 deletions(-) diff --git a/guilt b/guilt index 23cc2da..9947

  1   2   >