From: Per Cederqvist <hidden> Date: 2016-06-15 23:00:24
I recently found myself sitting on a train with a computer in front of
me. I tried to use "guilt import-commit", which seemed to work, but
when I tried to "guilt push" the commits I had just imported I got
some errors. It turned out that "guilt import-commit" had generated
invalid patch names.
I decided to fix the issue, and write a test case that demonstrated
the problem.
One thing led to another, and here I am, a few late nights at a hotel
and a return trip on the train later, submitting a patch series in 28
parts. Sorry about the number of patches, but this is what happens
when you uncover a bug while writing a test case for the bug you
uncovered while writing a test case for your original problem.
The patch series consists of:
- A number of fixes to the test suite.
- A number of bug fixes which I hope are non-controversial. Most of
the fixes have test cases.
- Changed behavior: "guilt push" when there is nothing more to push
now uses exit status 1. This makes it possible to write shell
loops such as "while guilt push; do make test||break; done". Also,
"guilt pop" when no patches are applied also uses exit status 1.
(This aligns "guilt push" and "guilt pop" with how "hg qpush" and
"hg qpop" has worked for several years.)
- Changed behavior: by default, guilt no longer changes branch when
you push a patch. You need to do "git config guilt.reusebranch
false" to re-enable that. This patch sets the default value of
guilt.reusebranch to true; it should in my opinion change to false
a year or two after the next release.
A more detailed overview of the patches:
1. Some tests fail if "git config guilt.diffstat true" is in effect.
2-4. Some commands fail if run from a directory with spaces in its
name.
5. "guilt new" had an overly restrictive argument parser.
6-8. guilt.diffstat could break "guilt fold" and "guilt new".
9-10. The test suite did not test exit status properly.
11. Remove pointless redirections in the test suite.
12-13. "guilt header" tried to check if a patch existed, but the check
was broken.
14-16. Various parts of guilt tried to ensure that patch names were
legal git branch names, but failed.
17-20. "guilt graph" failed when no patch was applied, and when a
branch name contained a comma or a quote.
21-23. "git config log.decorate short" caused "guilt import-commit",
"guilt patchbomb" and "guilt rebase" to fail in various ways.
24. Patches may contain backslashes, but various informative messages
from guilt did backslash processing.
25-26. "guilt push" and "guilt pop" should fail when there is nothing
to do.
27-28. These two commits were things I intended to contribute a while
back, when contributing the "Change git branch when patches are
applied" change (commit 67d3af63f422). These commits makes
that behavior optional, and it defaults to being disabled, so
that you can use both Guilt v0.35 (and earlier) and the current
Guilt code against the same repo. These commits add some code
complexity, and you might want to skip them if you think the
current behavior is better.
This patch series is also available on
http://repo.or.cz/w/guilt/ceder.git in the "oslo-2014" 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 fetch ceder refs/heads/oslo-2014:refs/remotes/ceder/oslo-2014
A few of the regression/t-*.out files contain non-ASCII characters. I
hope they survive the mail transfer; if not, please use the repo above
to fetch the commits.
Per Cederqvist (28):
The tests should not fail if guilt.diffstat is set.
Allow "guilt delete -f" to run from a dir which contains spaces.
Added test case for "guilt delete -f".
Allow "guilt import-commit" to run from a dir which contains spaces.
"guilt new": Accept more than 4 arguments.
Fix and simplify the do_get_patch function.
Added test cases for "guilt fold".
Added more test cases for "guilt new": empty patches.
Test suite: properly check the exit status of commands.
Run test_failed if the exit status of a test script is bad.
test suite: remove pointless redirection.
"guilt header": more robust header selection.
Check that "guilt header '.*'" fails.
Use "git check-ref-format" to validate patch names.
Produce legal patch names in guilt-import-commit.
Fix backslash handling when creating names of imported patches.
"guilt graph" no longer loops when no patches are applied.
guilt-graph: Handle commas in branch names.
Check that "guilt graph" works when working on a branch with a comma.
"guilt graph": Handle patch names containing quotes.
The log.decorate setting should not influence import-commit.
The log.decorate setting should not influence patchbomb.
The log.decorate setting should not influence guilt rebase.
disp no longer processes backslashes.
"guilt push" now fails when there are no more patches to push.
"guilt pop" now fails when there are no more patches to pop.
Minor testsuite fix.
Added guilt.reusebranch configuration option.
guilt | 76 ++++--
guilt-delete | 2 +-
guilt-fork | 2 +-
guilt-graph | 14 +-
guilt-header | 33 ++-
guilt-import | 2 +-
guilt-import-commit | 32 ++-
guilt-new | 9 +-
guilt-patchbomb | 2 +-
guilt-pop | 13 +-
guilt-push | 14 +-
guilt-rebase | 2 +-
regression/run-tests | 11 +-
regression/scaffold | 19 +-
regression/t-020.out | 339 ++++++++++++++++++++++++++
regression/t-020.sh | 73 +++++-
regression/t-021.out | 2 +
regression/t-021.sh | 8 +-
regression/t-025.out | 426 ++++++++++++++++++++++++++++++++-
regression/t-025.sh | 14 +-
regression/t-026.out | 15 ++
regression/t-026.sh | 5 +-
regression/t-028.out | 7 +
regression/t-028.sh | 6 +-
regression/t-032.out | 4 +-
regression/t-032.sh | 2 +-
regression/t-033.out | 87 +++++++
regression/t-033.sh | 57 +++++
regression/t-034.out | 569 ++++++++++++++++++++++++++++++++++++++++++++
regression/t-034.sh | 74 ++++++
regression/t-035.out | 659 +++++++++++++++++++++++++++++++++++++++++++++++++++
regression/t-035.sh | 88 +++++++
regression/t-061.out | 1 -
regression/t-061.sh | 9 +-
regression/t-062.out | 441 ++++++++++++++++++++++++++++++++++
regression/t-062.sh | 140 +++++++++++
36 files changed, 3168 insertions(+), 89 deletions(-)
create mode 100644 regression/t-033.out
create mode 100755 regression/t-033.sh
create mode 100644 regression/t-034.out
create mode 100755 regression/t-034.sh
create mode 100644 regression/t-035.out
create mode 100755 regression/t-035.sh
create mode 100644 regression/t-062.out
create mode 100755 regression/t-062.sh
Yours,
/ceder
--
1.8.3.1
From: Per Cederqvist <hidden> Date: 2016-06-15 23:00:24
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 <redacted>
---
regression/t-035.out | 659 +++++++++++++++++++++++++++++++++++++++++++++++++++
regression/t-035.sh | 88 +++++++
2 files changed, 747 insertions(+)
create mode 100644 regression/t-035.out
create mode 100755 regression/t-035.sh
From: Per Cederqvist <hidden> Date: 2016-06-15 23:00:24
When extracting the patch, we only want the actual patches. We don't
want the "---" delimiter. Simplify the extraction by simply deleting
everything before the first "diff " line. (Use sed instead of awk to
simplify the code.)
Without this patch, "guilt fold" and "guilt push" sometimes fails if
guilt.diffstat is true.
Signed-off-by: Per Cederqvist <redacted>
---
guilt | 7 +------
1 file changed, 1 insertion(+), 6 deletions(-)
From: Per Cederqvist <hidden> Date: 2016-06-15 23:00:24
This fix relies on the fact that git branch names can not contain ":".
Signed-off-by: Per Cederqvist <redacted>
---
guilt-graph | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
From: Per Cederqvist <hidden> Date: 2016-06-15 23:00:24
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 <redacted>
---
guilt-pop | 13 +++++++------
regression/t-021.out | 2 ++
regression/t-021.sh | 6 ++++++
regression/t-061.sh | 7 ++++++-
4 files changed, 21 insertions(+), 7 deletions(-)
@@ -48,10 +48,16 @@ fi patch="$1" [ ! -z "$all" ] && patch="-a"+[ -z "$patch" ] && { patch=1; num=t; } if [ ! -s "$applied" ]; then disp "No patches applied."- exit 0+ if [ "$patch" = "-a" ]+ then+ exit 0+ else+ exit 1+ fi elif [ "$patch" = "-a" ]; then # we are supposed to pop all patches
@@ -68,11 +74,6 @@ elif [ ! -z "$num" ]; then # catch underflow [ $eidx -lt 0 ] && eidx=0 [ $eidx -eq $sidx ] && die "No patches requested to be removed."-elif [ -z "$patch" ]; then- # we are supposed to pop only the current patch on the stack-- sidx=`wc -l < "$applied"`- eidx=`expr $sidx - 1` else # we're supposed to pop only up to a patch, make sure the patch is # in the series
@@ -23,6 +23,12 @@ guilt series | _tac | while read n ; dodone#+# pop when there is nothing to pop+#++shouldfailguiltpop++## push all# cmdguiltpush--all
From: Per Cederqvist <hidden> Date: 2016-06-15 23:00:24
Quote quotes with a backslash in the "guitl graph" output. Otherwise,
the "dot" file could contain syntax errors.
Added a test case.
---
guilt-graph | 2 ++
regression/t-033.out | 22 ++++++++++++++++++++++
regression/t-033.sh | 9 +++++++++
3 files changed, 33 insertions(+)
From: Per Cederqvist <hidden> Date: 2016-06-15 23:00:24
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 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 <redacted>
---
guilt-push | 14 ++++-----
regression/t-020.out | 89 ++++++++++++++++++++++++++++++++++++++++++++++++++++
regression/t-020.sh | 13 +++++++-
3 files changed, 108 insertions(+), 8 deletions(-)
@@ -55,6 +55,7 @@ fi patch="$1" [ ! -z "$all" ] && patch="-a"+[ -z "$patch" ] && { patch=1; num=t; } if [ "$patch" = "-a" ]; then # we are supposed to push all patches, get the last one out of
@@ -65,7 +66,7 @@ if [ "$patch" = "-a" ]; then die "There are no patches to push." fi elif [ ! -z "$num" ]; then- # we are supposed to pop a set number of patches+ # we are supposed to push a set number of patches [ "$patch" -lt 0 ] && die "Invalid number of patches to push."
@@ -78,11 +79,6 @@ elif [ ! -z "$num" ]; then # clamp to minimum [ $tidx -lt $eidx ] && eidx=$tidx-elif [ -z "$patch" ]; then- # we are supposed to push only the next patch onto the stack-- eidx=`wc -l < "$applied"`- eidx=`expr $eidx + 1` else # we're supposed to push only up to a patch, make sure the patch is # in the series
@@ -109,7 +105,11 @@ if [ "$sidx" -gt "$eidx" ]; then else disp "File series fully applied, ends at patch `get_series | tail -n 1`" fi- exit 0+ if [ -n "$all" ]; then+ exit 0+ else+ exit 1+ fi fi get_series | sed -n -e "${sidx},${eidx}p" | while read p
@@ -26,6 +26,17 @@ guilt series | while read n ; dodone#+# pushing when there is nothing to push+#++shouldfailguiltpush+cmdguiltpush-a++cmdlist_files++cmdgitlog-p++## pop all# cmdguiltpop--all
@@ -61,7 +72,7 @@ cmd guilt pop --allnpatches=`guiltseries|wc-l`fornin`_seq-2$npatches`;do-if[$n-ge0];then+if[$n-gt0];thencmdguiltpush-n$nelseshouldfailguiltpush-n$n
@@ -47,7 +47,7 @@ if [ $? -ne 0 ]; then fi # display the list of commits to be sent as patches-git log --pretty=oneline "$r" | cut -c 1-8,41- | $pager+git log --no-decorate --pretty=oneline "$r" | cut -c 1-8,41- | $pager _disp "Are these what you want to send? [Y/n] " read n
@@ -381,7 +381,6 @@ ccd56089d1b5305a9d35617cb7f6f4b06ffa68ba commit refs/patches/master/mode ffb7faa126a6d91bcdd44a494f76b96dd860b8b9 commit refs/patches/master/remove % guilt pop -a No patches applied.-ccd56089d1b5305a9d35617cb7f6f4b06ffa68ba % git checkout guilt/master Switched to branch "guilt/master" % guilt pop -a
From: Per Cederqvist <hidden> Date: 2016-06-15 23:00:24
Only one invocation of "disp" or "_disp" actually needed backslash
processing. In quite a few instances, it was wrong to do backslash
processing, as the message contained data derived from the user.
Created the new function "disp_e" that should be used when backslash
processing is required, and changed "disp" and "disp_" to use printf
code %s instead of "%b".
Signed-off-by: Per Cederqvist <redacted>
---
guilt | 17 +++++++++++++----
1 file changed, 13 insertions(+), 4 deletions(-)
@@ -36,15 +36,24 @@ usage() exit 1 }-# echo -n is a bashism, use printf instead+# Print arguments, but no trailing newline.+# (echo -n is a bashism, use printf instead) _disp() {- printf "%b" "$*"+ printf "%s" "$*" }-# echo -e is a bashism, use printf instead+# Print arguments.+# (echo -E is a bashism, use printf instead) disp() {+ printf "%s\n" "$*"+}++# Print arguments, processing backslash sequences.+# (echo -e is a bashism, use printf instead)+disp_e()+{ printf "%b\n" "$*" }
From: Per Cederqvist <hidden> Date: 2016-06-15 23:00:24
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 Cederqvist <redacted>
---
guilt-import-commit | 2 +-
regression/t-034.out | 2 ++
regression/t-034.sh | 2 ++
3 files changed, 5 insertions(+), 1 deletion(-)
@@ -26,7 +26,7 @@ disp "About to begin conversion..." >&2 disp "Current head: `cat \"$GIT_DIR\"/refs/heads/\`git_branch\``" >&2 for rev in `git rev-list $rhash`; do- s=`git log --pretty=oneline -1 $rev | cut -c 42-`+ s=`git log --no-decorate --pretty=oneline -1 $rev | cut -c 42-` # Try to convert the first line of the commit message to a # valid patch name.
@@ -232,6 +232,7 @@ Date: Mon Jan 1 00:00:00 2007 +0000 Signed-off-by: Commiter Name <commiter@email> % guilt init+% git config log.decorate short % guilt import-commit base..HEAD About to begin conversion... Current head: 2a8b1889aa5066193bac978e6bf5073ffcfa6541
@@ -259,6 +260,7 @@ Converting 45e81b51 as the_sequence_.lock-_is_forbidden Converting eebb76e9 as the_sequence_-._is_forbidden Done. Current head: d4850419ccc1146c7169f500725ce504b9774ed0+% git config log.decorate no % guilt push -a Applying patch..the_sequence_-._is_forbidden.patch Patch applied.
@@ -57,7 +57,9 @@ cmd git log# Import all the commits to guilt. cmdguiltinit+cmdgitconfiglog.decorateshort cmdguiltimport-commitbase..HEAD+cmdgitconfiglog.decoratenoforpatchin.git/patches/master/*.patchdo
From: Per Cederqvist <hidden> Date: 2016-06-15 23:00:24
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 <redacted>
---
regression/t-021.sh | 2 +-
regression/t-025.sh | 2 +-
regression/t-028.sh | 2 +-
3 files changed, 3 insertions(+), 3 deletions(-)
@@ -29,6 +29,6 @@ guilt series | while read n; docmdguiltheader$ndone-shouldfailguiltheadernon-existant2>&1+shouldfailguiltheadernon-existant# FIXME: how do we check that -e works?
From: Per Cederqvist <hidden> Date: 2016-06-15 23:00:24
From: Per Cederqvist <redacted>
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 0.35 and the current version of Guilt with no issues.
At a future time, maybe a year after Guilt with guilt.reusebranch
support is released, the default should be changed to "false" to take
advantage of the ability to use a separate Git branch when patches are
applied.
Signed-off-by: Per Cederqvist <redacted>
---
guilt | 29 +++-
regression/scaffold | 1 +
regression/t-062.out | 441 +++++++++++++++++++++++++++++++++++++++++++++++++++
regression/t-062.sh | 140 ++++++++++++++++
4 files changed, 606 insertions(+), 5 deletions(-)
create mode 100644 regression/t-062.out
create mode 100755 regression/t-062.sh
@@ -850,6 +850,9 @@ guilt_push_diff_context=1 # default diffstat value: true or false DIFFSTAT_DEFAULT="false"+# default old_style_prefix value: true or false+REUSE_BRANCH_DEFAULT="true"+ # Prefix for guilt branches. GUILT_PREFIX=guilt/
@@ -861,6 +864,10 @@ GUILT_PREFIX=guilt/ diffstat=`git config --bool guilt.diffstat` [ -z "$diffstat" ] && diffstat=$DIFFSTAT_DEFAULT+# reuse Git branch?+reuse_branch=`git config --bool guilt.reusebranch`+[ -z "$reuse_branch" ] && reuse_branch=$REUSE_BRANCH_DEFAULT+ # # The following gets run every time this file is source'd #
@@ -925,13 +932,25 @@ else die "Unsupported operating system: $UNAME_S" fi-if [ "$branch" = "$raw_git_branch" ] && [ -n "`get_top 2>/dev/null`" ]+if [ -n "`get_top 2>/dev/null`" ] then- # This is for compat with old repositories that still have a- # pushed patch without the new-style branch prefix.- old_style_prefix=true+ # If there is at least one pushed patch, we set+ # old_style_prefix according to how it was pushed. It is only+ # possible to change the prefix style while no patches are+ # applied.+ if [ "$branch" = "$raw_git_branch" ]+ then+ old_style_prefix=true+ else+ old_style_prefix=false+ fi else- old_style_prefix=false+ if $reuse_branch+ then+ old_style_prefix=true+ else+ old_style_prefix=false+ fi fi _main "$@"
@@ -0,0 +1,140 @@+#!/bin/bash+#+# Test the branch-switching upgrade code+#++source$REG_DIR/scaffold++remove_topic(){+cmdguiltpop-a+ifgitrev-parse--verify--quietguilt/master>/dev/null+then+cmdgitcheckoutguilt/master+else+cmdgitcheckoutmaster+fi+cmdguiltpop-a+cmdgitbranch-d$1+cmdrm-r.git/patches/$1+cmdgitfor-each-ref+cmdlist_files+}++functionfixup_time_info+{+touch-a-m-t"$TOUCH_DATE"".git/patches/master/$1"+}++cmdsetup_repo++cmdgitconfigguilt.reusebranchtrue++cmdguiltpush-a+cmdlist_files+cmdgitfor-each-ref++cmdgitfor-each-ref++cmdlist_files++foriin`seq5`+do+if[$i-ge5]+then+shouldfailguiltpop+else+cmdguiltpop+fi+cmdgitfor-each-ref+cmdguiltpush+cmdgitfor-each-ref+cmdguiltpop+cmdgitfor-each-ref+done++# Check that "pop -a" does the right thing.+cmdguiltpush-a++cmdgitfor-each-ref++cmdguiltpop-a++cmdgitfor-each-ref++# Check that pushing two patches converts the repo to now-style (since+# it currently has no patches applied).+cmdguiltpushadd+cmdgitfor-each-ref++# Check guilt branch with a few patches applied.+cmdguiltbranchtopic+cmdgitfor-each-ref++# Check that the topic branch is converted to new-style.+cmdguiltpop-a+cmdguiltpush+cmdgitfor-each-ref++remove_topictopic++# Check guilt branch with the full patch series applied.+cmdguiltpush-a+cmdguiltbranchtopic+cmdgitfor-each-ref++remove_topictopic++# Check guilt branch with no patches applied.+# This gives us a new-style checkout.+cmdguiltbranchtopic+cmdgitfor-each-ref+cmdlist_files++remove_topictopic++# Check guilt branch in a new-style directory with all patches+# applied. (Strictly speaking, this test should probably move to a+# file devoted to testing "guilt branch".)+cmdguiltpush-a+cmdguiltbranchtopic+cmdgitfor-each-ref+cmdlist_files+cmdguiltpop-a+cmdgitfor-each-ref++remove_topictopic++# Check that "guilt new" does the right thing when no patches are+# applied. (Strictly speaking, this test should maybe move to+# t-025.sh).++cmdguiltnewnewpatch+cmdgitfor-each-ref'--format=%(refname)'+cmdguiltpop+fixup_time_infonewpatch+cmdguiltpush+cmdgitfor-each-ref++# Check that "guilt commit" does the right thing when committing all+# applied patches. (Strictly speaking, this test should maybe move to+# t-030.sh).+cmdgitbranch+cmdguiltapplied+cmdguiltcommit-a+cmdgitfor-each-ref+cmdgitbranch++# Check that "guilt commit" does the right thing when committing only+# a few of the applied patches. (Strictly speaking, this test should+# maybe move to t-030.sh).+cmdguiltpush-a+cmdguiltapplied+cmdgitbranch+cmdgitfor-each-ref+cmdguiltcommit-n2+cmdgitfor-each-ref+cmdgitbranch+cmdguiltcommit-n2+cmdgitfor-each-ref+cmdgitbranch+cmdguiltseries
From: Per Cederqvist <hidden> Date: 2016-06-15 23:00:24
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 new rules are added in the future).
Always append a ".patch" suffix to the patch name.
Added test cases.
Signed-off-by: Per Cederqvist <redacted>
---
guilt-import-commit | 22 +-
regression/t-034.out | 567 +++++++++++++++++++++++++++++++++++++++++++++++++++
regression/t-034.sh | 72 +++++++
3 files changed, 659 insertions(+), 2 deletions(-)
create mode 100644 regression/t-034.out
create mode 100755 regression/t-034.sh
@@ -28,19 +28,37 @@ disp "Current head: `cat \"$GIT_DIR\"/refs/heads/\`git_branch\``" >&2 for rev in `git rev-list $rhash`; do s=`git log --pretty=oneline -1 $rev | cut -c 42-`+ # Try to convert the first line of the commit message to a+ # valid patch name. fname=`echo $s | sed -e "s/&/and/g" -e "s/[ :]/_/g" -e "s,[/\\],-,g" \ -e "s/['\\[{}]//g" -e 's/]//g' -e 's/\*/-/g' \- -e 's/\?/-/g' | tr A-Z a-z`+ -e 's/\?/-/g' -e 's/\.\.\.*/./g' -e 's/^\.//' \+ -e 's/\.patch$//' -e 's/\.$//' | tr A-Z a-z`++ if ! valid_patchname "$fname"+ then+ # Try harder to make it a legal commit name by+ # removing all but a few safe characters.+ fname=`echo $fname|tr -d -c _a-zA-Z0-9---/\\n`+ fi+ if ! valid_patchname "$fname"+ then+ # If we failed to derive a legal patch name, use the+ # name "x". (If this happens, we likely have to+ # append a suffix to make the name unique.)+ fname=x+ fi disp "Converting `echo $rev | cut -c 1-8` as $fname" mangle_prefix=1 fname_base=$fname- while [ -f "$GUILT_DIR/$branch/$fname" ]; do+ while [ -f "$GUILT_DIR/$branch/$fname.patch" ]; do fname="$fname_base-$mangle_prefix" mangle_prefix=`expr $mangle_prefix + 1` disp "Patch under that name exists...trying '$fname'" done+ fname="$fname".patch ( do_make_header $rev
@@ -0,0 +1,567 @@+% setup_git_repo+% git tag base+% create_commit a The sequence /. is forbidden.+[master eebb76e] The sequence /. is forbidden.+ Author: Author Name <author@email>+ 1 file changed, 1 insertion(+)+ create mode 100644 a+% create_commit a The sequence .lock/ is forbidden.+[master 45e81b5] The sequence .lock/ is forbidden.+ Author: Author Name <author@email>+ 1 file changed, 1 insertion(+)+% create_commit a A/component/may/not/end/in/foo.lock+[master bbf3f59] A/component/may/not/end/in/foo.lock+ Author: Author Name <author@email>+ 1 file changed, 1 insertion(+)+% create_commit a Two consecutive dots (..) is forbidden.+[master 1535e67] Two consecutive dots (..) is forbidden.+ Author: Author Name <author@email>+ 1 file changed, 1 insertion(+)+% create_commit a Check/multiple/../dots/...../foo..patch+[master 48eb60c] Check/multiple/../dots/...../foo..patch+ Author: Author Name <author@email>+ 1 file changed, 1 insertion(+)+% create_commit a Space is forbidden.+[master 10dea83] Space is forbidden.+ Author: Author Name <author@email>+ 1 file changed, 1 insertion(+)+% create_commit a Tilde~is~forbidden.+[master 70a83b7] Tilde~is~forbidden.+ Author: Author Name <author@email>+ 1 file changed, 1 insertion(+)+% create_commit a Caret^is^forbidden.+[master ee6ef2c] Caret^is^forbidden.+ Author: Author Name <author@email>+ 1 file changed, 1 insertion(+)+% create_commit a Colon:is:forbidden.+[master c077fe2] Colon:is:forbidden.+ Author: Author Name <author@email>+ 1 file changed, 1 insertion(+)+% create_commit a Delisforbidden.+[master 589ee30] Delisforbidden.+ Author: Author Name <author@email>+ 1 file changed, 1 insertion(+)+% git branch some-branch+% git tag some-tag+% create_commit a Ctrlisforbidden.+[master e63cdde] Ctrlisforbidden.+ Author: Author Name <author@email>+ 1 file changed, 1 insertion(+)+% create_commit a CR
is
also
forbidden.
+[master 21ad093] CR
is
also
forbidden.
+ Author: Author Name <author@email>
+ 1 file changed, 1 insertion(+)
+% create_commit a Question-mark?is?forbidden.
+[master be2fa9b] Question-mark?is?forbidden.
+ Author: Author Name <author@email>
+ 1 file changed, 1 insertion(+)
+% create_commit a Asterisk*is*forbidden.
+[master af7b50f] Asterisk*is*forbidden.
+ Author: Author Name <author@email>
+ 1 file changed, 1 insertion(+)
+% create_commit a Open[bracket[is[forbidden.
+[master 689f618] Open[bracket[is[forbidden.
+ Author: Author Name <author@email>
+ 1 file changed, 1 insertion(+)
+% create_commit a Multiple/slashes//are//forbidden.
+[master 6e7d52a] Multiple/slashes//are//forbidden.
+ Author: Author Name <author@email>
+ 1 file changed, 1 insertion(+)
+% create_commit a Cannot/end/in/slash/
+[master 95bb6cd] Cannot/end/in/slash/
+ Author: Author Name <author@email>
+ 1 file changed, 1 insertion(+)
+% create_commit a Cannot end in ..
+[master 106e8e5] Cannot end in ..
+ Author: Author Name <author@email>
+ 1 file changed, 1 insertion(+)
+% create_commit a Cannot@{have@{the@{sequence@{at-brace.
+[master 30187ed] Cannot@{have@{the@{sequence@{at-brace.
+ Author: Author Name <author@email>
+ 1 file changed, 1 insertion(+)
+% create_commit a @
+[master aedb74f] @
+ Author: Author Name <author@email>
+ 1 file changed, 1 insertion(+)
+% create_commit a Backslash\is\forbidden.
+[master 0a46f8f] Backslash\is\forbidden.
+ Author: Author Name <author@email>
+ 1 file changed, 1 insertion(+)
+% create_commit a Can/have/embedded/single/slashes
+[master 2a8b188] Can/have/embedded/single/slashes
+ Author: Author Name <author@email>
+ 1 file changed, 1 insertion(+)
+% git log
+commit 2a8b1889aa5066193bac978e6bf5073ffcfa6541
+Author: Author Name <author@email>
+Date: Mon Jan 1 00:00:00 2007 +0000
+
+ Can/have/embedded/single/slashes
+
+commit 0a46f8fa7c8c5a6f1039f842fe5cbd21d3a2a2a6
+Author: Author Name <author@email>
+Date: Mon Jan 1 00:00:00 2007 +0000
+
+ Backslash\is\forbidden.
+
+commit aedb74fd8388282fd7af50cb191a7f62bfc45eb5
+Author: Author Name <author@email>
+Date: Mon Jan 1 00:00:00 2007 +0000
+
+ @
+
+commit 30187ed0f47d12df9cedcbb846647d0d52130c12
+Author: Author Name <author@email>
+Date: Mon Jan 1 00:00:00 2007 +0000
+
+ Cannot@{have@{the@{sequence@{at-brace.
+
+commit 106e8e5a8cceec7297af97376ca5f93506643d0b
+Author: Author Name <author@email>
+Date: Mon Jan 1 00:00:00 2007 +0000
+
+ Cannot end in ..
+
+commit 95bb6cd7edf7b1e634a1e7d02c8faa99e39cbbf2
+Author: Author Name <author@email>
+Date: Mon Jan 1 00:00:00 2007 +0000
+
+ Cannot/end/in/slash/
+
+commit 6e7d52a7dacc684225c11b4edd2bac25fb52bd9b
+Author: Author Name <author@email>
+Date: Mon Jan 1 00:00:00 2007 +0000
+
+ Multiple/slashes//are//forbidden.
+
+commit 689f618085195775d204898254154b8bb50897a5
+Author: Author Name <author@email>
+Date: Mon Jan 1 00:00:00 2007 +0000
+
+ Open[bracket[is[forbidden.
+
+commit af7b50f93854bc5f46de5a389c1f3dea081eae2f
+Author: Author Name <author@email>
+Date: Mon Jan 1 00:00:00 2007 +0000
+
+ Asterisk*is*forbidden.
+
+commit be2fa9b5c5788dc05c4036f1b8197a1d33169610
+Author: Author Name <author@email>
+Date: Mon Jan 1 00:00:00 2007 +0000
+
+ Question-mark?is?forbidden.
+
+commit 21ad093a0c1b4a96285180a3d7b99a4045ef9202
+Author: Author Name <author@email>
+Date: Mon Jan 1 00:00:00 2007 +0000
+
+ CR
is
also
forbidden.
+
+commit e63cdde7a1c90b66d7d411683528200f3f067d5f
+Author: Author Name <author@email>
+Date: Mon Jan 1 00:00:00 2007 +0000
+
+ Ctrlisforbidden.
+
+commit 589ee305a82aacf155529e75cbc84e661c37c83d
+Author: Author Name <author@email>
+Date: Mon Jan 1 00:00:00 2007 +0000
+
+ Delisforbidden.
+
+commit c077fe203fd18036fb00b56eec1763673d1769c6
+Author: Author Name <author@email>
+Date: Mon Jan 1 00:00:00 2007 +0000
+
+ Colon:is:forbidden.
+
+commit ee6ef2cc9dd5525409300377b013c0d9734bd931
+Author: Author Name <author@email>
+Date: Mon Jan 1 00:00:00 2007 +0000
+
+ Caret^is^forbidden.
+
+commit 70a83b705a2602a9493aba7f8f22e7abd13adc63
+Author: Author Name <author@email>
+Date: Mon Jan 1 00:00:00 2007 +0000
+
+ Tilde~is~forbidden.
+
+commit 10dea8380135f4d10cd10324e13da659261ceda3
+Author: Author Name <author@email>
+Date: Mon Jan 1 00:00:00 2007 +0000
+
+ Space is forbidden.
+
+commit 48eb60cddaefdaac5f78655f9028a9da741a18d1
+Author: Author Name <author@email>
+Date: Mon Jan 1 00:00:00 2007 +0000
+
+ Check/multiple/../dots/...../foo..patch
+
+commit 1535e67718949abf72f843685a1672ebfe4bd21f
+Author: Author Name <author@email>
+Date: Mon Jan 1 00:00:00 2007 +0000
+
+ Two consecutive dots (..) is forbidden.
+
+commit bbf3f5926e11d97b08cdb6e833c9deb603453d1b
+Author: Author Name <author@email>
+Date: Mon Jan 1 00:00:00 2007 +0000
+
+ A/component/may/not/end/in/foo.lock
+
+commit 45e81b5163ec3ed656b058ac3fd95b8986824e0f
+Author: Author Name <author@email>
+Date: Mon Jan 1 00:00:00 2007 +0000
+
+ The sequence .lock/ is forbidden.
+
+commit eebb76e96913d2dc78aef5f233fadc74af770b3b
+Author: Author Name <author@email>
+Date: Mon Jan 1 00:00:00 2007 +0000
+
+ The sequence /. is forbidden.
+
+commit d4850419ccc1146c7169f500725ce504b9774ed0
+Author: Author Name <author@email>
+Date: Mon Jan 1 00:00:00 2007 +0000
+
+ initial
+
+ Signed-off-by: Commiter Name <commiter@email>
+% guilt init
+% guilt import-commit base..HEAD
+About to begin conversion...
+Current head: 2a8b1889aa5066193bac978e6bf5073ffcfa6541
+Converting 2a8b1889 as can-have-embedded-single-slashes
+Converting 0a46f8fa as backslash-isorbidden
+Converting aedb74fd as x
+Converting 30187ed0 as cannot@have@the@sequence@at-brace
+Converting 106e8e5a as cannot_end_in_
+Converting 95bb6cd7 as cannot-end-in-slash-
+Converting 6e7d52a7 as multiple-slashes--are--forbidden
+Converting 689f6180 as openbracketisforbidden
+Converting af7b50f9 as asterisk-is-forbidden
+Converting be2fa9b5 as question-mark-is-forbidden
+Converting 21ad093a as crisalsoforbidden
+Converting e63cdde7 as ctrlisforbidden
+Converting 589ee305 as delisforbidden
+Converting c077fe20 as colon_is_forbidden
+Converting ee6ef2cc as caretisforbidden
+Converting 70a83b70 as tildeisforbidden
+Converting 10dea838 as space_is_forbidden
+Converting 48eb60cd as check-multiple-.-dots-.-foo
+Converting 1535e677 as two_consecutive_dots_(.)_is_forbidden
+Converting bbf3f592 as a-component-may-not-end-in-foolock
+Converting 45e81b51 as the_sequence_.lock-_is_forbidden
+Converting eebb76e9 as the_sequence_-._is_forbidden
+Done.
+Current head: d4850419ccc1146c7169f500725ce504b9774ed0
+% guilt push -a
+Applying patch..the_sequence_-._is_forbidden.patch
+Patch applied.
+Applying patch..the_sequence_.lock-_is_forbidden.patch
+Patch applied.
+Applying patch..a-component-may-not-end-in-foolock.patch
+Patch applied.
+Applying patch..two_consecutive_dots_(.)_is_forbidden.patch
+Patch applied.
+Applying patch..check-multiple-.-dots-.-foo.patch
+Patch applied.
+Applying patch..space_is_forbidden.patch
+Patch applied.
+Applying patch..tildeisforbidden.patch
+Patch applied.
+Applying patch..caretisforbidden.patch
+Patch applied.
+Applying patch..colon_is_forbidden.patch
+Patch applied.
+Applying patch..delisforbidden.patch
+Patch applied.
+Applying patch..ctrlisforbidden.patch
+Patch applied.
+Applying patch..crisalsoforbidden.patch
+Patch applied.
+Applying patch..question-mark-is-forbidden.patch
+Patch applied.
+Applying patch..asterisk-is-forbidden.patch
+Patch applied.
+Applying patch..openbracketisforbidden.patch
+Patch applied.
+Applying patch..multiple-slashes--are--forbidden.patch
+Patch applied.
+Applying patch..cannot-end-in-slash-.patch
+Patch applied.
+Applying patch..cannot_end_in_.patch
+Patch applied.
+Applying patch..cannot@have@the@sequence@at-brace.patch
+Patch applied.
+Applying patch..x.patch
+Patch applied.
+Applying patch..backslash-isorbidden.patch
+Patch applied.
+Applying patch..can-have-embedded-single-slashes.patch
+Patch applied.
+% git log --decorate
+commit 434e07cacdd8e7eb4723e67cb2d100b3a4121a3a (HEAD, refs/patches/master/can-have-embedded-single-slashes.patch, guilt/master)
+Author: Author Name <author@email>
+Date: Mon Jan 1 00:00:00 2007 +0000
+
+ Can/have/embedded/single/slashes
+
+commit 7c3ffa4f940c862e9f11f5d4a5ae421f7a8d3141 (refs/patches/master/backslash-isorbidden.patch)
+Author: Author Name <author@email>
+Date: Mon Jan 1 00:00:00 2007 +0000
+
+ Backslash\is\forbidden.
+
+commit ea46f435d4d8f3c5349dce1aabc1a39fbf7ef803 (refs/patches/master/x.patch)
+Author: Author Name <author@email>
+Date: Mon Jan 1 00:00:00 2007 +0000
+
+ @
+
+commit a275ed5d7f10ea88c986852ee95a7d5a61663b5f (refs/patches/master/cannot@have@the@sequence@at-brace.patch)
+Author: Author Name <author@email>
+Date: Mon Jan 1 00:00:00 2007 +0000
+
+ Cannot@{have@{the@{sequence@{at-brace.
+
+commit f091fee39457e64ebd35410c1cf95e6613816a54 (refs/patches/master/cannot_end_in_.patch)
+Author: Author Name <author@email>
+Date: Mon Jan 1 00:00:00 2007 +0000
+
+ Cannot end in ..
+
+commit 025672497aff5c910c8ff86aaedc662f14c2f4ad (refs/patches/master/cannot-end-in-slash-.patch)
+Author: Author Name <author@email>
+Date: Mon Jan 1 00:00:00 2007 +0000
+
+ Cannot/end/in/slash/
+
+commit f13e243c7c56f39422567a431bccceec8b789596 (refs/patches/master/multiple-slashes--are--forbidden.patch)
+Author: Author Name <author@email>
+Date: Mon Jan 1 00:00:00 2007 +0000
+
+ Multiple/slashes//are//forbidden.
+
+commit edef5e925083d445f71c170d3293fac9619bc7a2 (refs/patches/master/openbracketisforbidden.patch)
+Author: Author Name <author@email>
+Date: Mon Jan 1 00:00:00 2007 +0000
+
+ Open[bracket[is[forbidden.
+
+commit 1626a11d979a1e9e775c766484172212277153df (refs/patches/master/asterisk-is-forbidden.patch)
+Author: Author Name <author@email>
+Date: Mon Jan 1 00:00:00 2007 +0000
+
+ Asterisk*is*forbidden.
+
+commit 74df14ab3a0ec9a0382998fbf167ebb1b0a36c6a (refs/patches/master/question-mark-is-forbidden.patch)
+Author: Author Name <author@email>
+Date: Mon Jan 1 00:00:00 2007 +0000
+
+ Question-mark?is?forbidden.
+
+commit ec46429125abdb0c5ac2b46cc399bdcd7cfc73fd (refs/patches/master/crisalsoforbidden.patch)
+Author: Author Name <author@email>
+Date: Mon Jan 1 00:00:00 2007 +0000
+
+ CR
is
also
forbidden.
+
+commit 01524f9921af2a041cc88c068f76baa39e436cb2 (refs/patches/master/ctrlisforbidden.patch)
+Author: Author Name <author@email>
+Date: Mon Jan 1 00:00:00 2007 +0000
+
+ Ctrlisforbidden.
+
+commit 9fc9677b61880f9159838e89f714893e0a2fcafb (refs/patches/master/delisforbidden.patch)
+Author: Author Name <author@email>
+Date: Mon Jan 1 00:00:00 2007 +0000
+
+ Delisforbidden.
+
+commit 10433fd7206b7f79aabb4da514710d93c8deed4a (refs/patches/master/colon_is_forbidden.patch)
+Author: Author Name <author@email>
+Date: Mon Jan 1 00:00:00 2007 +0000
+
+ Colon:is:forbidden.
+
+commit fb1edb753c97ec865ceea316420b1df586caaa2b (refs/patches/master/caretisforbidden.patch)
+Author: Author Name <author@email>
+Date: Mon Jan 1 00:00:00 2007 +0000
+
+ Caret^is^forbidden.
+
+commit 3a0d5ccef0359004fcaa9cee98fbd6a2c4432e74 (refs/patches/master/tildeisforbidden.patch)
+Author: Author Name <author@email>
+Date: Mon Jan 1 00:00:00 2007 +0000
+
+ Tilde~is~forbidden.
+
+commit ea22c3b49c448dba8d7eaa6b805f9f1bc83fbedc (refs/patches/master/space_is_forbidden.patch)
+Author: Author Name <author@email>
+Date: Mon Jan 1 00:00:00 2007 +0000
+
+ Space is forbidden.
+
+commit db6ea8252440b04811344336f510a5469b2ddab0 (refs/patches/master/check-multiple-.-dots-.-foo.patch)
+Author: Author Name <author@email>
+Date: Mon Jan 1 00:00:00 2007 +0000
+
+ Check/multiple/../dots/...../foo..patch
+
+commit fe07105cd62660f4440ad24b9fc7dfdd9e71d764 (refs/patches/master/two_consecutive_dots_(.)_is_forbidden.patch)
+Author: Author Name <author@email>
+Date: Mon Jan 1 00:00:00 2007 +0000
+
+ Two consecutive dots (..) is forbidden.
+
+commit 96a3e92c4df85f52362ce4f6d31983c462db9ae9 (refs/patches/master/a-component-may-not-end-in-foolock.patch)
+Author: Author Name <author@email>
+Date: Mon Jan 1 00:00:00 2007 +0000
+
+ A/component/may/not/end/in/foo.lock
+
+commit ee4f0f96dfc9c94f5410c1e6414f9004325a37fc (refs/patches/master/the_sequence_.lock-_is_forbidden.patch)
+Author: Author Name <author@email>
+Date: Mon Jan 1 00:00:00 2007 +0000
+
+ The sequence .lock/ is forbidden.
+
+commit fdcb23c3072209bea3d9e0a2594132b936c5347e (refs/patches/master/the_sequence_-._is_forbidden.patch)
+Author: Author Name <author@email>
+Date: Mon Jan 1 00:00:00 2007 +0000
+
+ The sequence /. is forbidden.
+
+commit d4850419ccc1146c7169f500725ce504b9774ed0 (tag: base, master)
+Author: Author Name <author@email>
+Date: Mon Jan 1 00:00:00 2007 +0000
+
+ initial
+
+ Signed-off-by: Commiter Name <commiter@email>
+% git log --decorate some-branch
+commit 589ee305a82aacf155529e75cbc84e661c37c83d (tag: some-tag, some-branch)
+Author: Author Name <author@email>
+Date: Mon Jan 1 00:00:00 2007 +0000
+
+ Delisforbidden.
+
+commit c077fe203fd18036fb00b56eec1763673d1769c6
+Author: Author Name <author@email>
+Date: Mon Jan 1 00:00:00 2007 +0000
+
+ Colon:is:forbidden.
+
+commit ee6ef2cc9dd5525409300377b013c0d9734bd931
+Author: Author Name <author@email>
+Date: Mon Jan 1 00:00:00 2007 +0000
+
+ Caret^is^forbidden.
+
+commit 70a83b705a2602a9493aba7f8f22e7abd13adc63
+Author: Author Name <author@email>
+Date: Mon Jan 1 00:00:00 2007 +0000
+
+ Tilde~is~forbidden.
+
+commit 10dea8380135f4d10cd10324e13da659261ceda3
+Author: Author Name <author@email>
+Date: Mon Jan 1 00:00:00 2007 +0000
+
+ Space is forbidden.
+
+commit 48eb60cddaefdaac5f78655f9028a9da741a18d1
+Author: Author Name <author@email>
+Date: Mon Jan 1 00:00:00 2007 +0000
+
+ Check/multiple/../dots/...../foo..patch
+
+commit 1535e67718949abf72f843685a1672ebfe4bd21f
+Author: Author Name <author@email>
+Date: Mon Jan 1 00:00:00 2007 +0000
+
+ Two consecutive dots (..) is forbidden.
+
+commit bbf3f5926e11d97b08cdb6e833c9deb603453d1b
+Author: Author Name <author@email>
+Date: Mon Jan 1 00:00:00 2007 +0000
+
+ A/component/may/not/end/in/foo.lock
+
+commit 45e81b5163ec3ed656b058ac3fd95b8986824e0f
+Author: Author Name <author@email>
+Date: Mon Jan 1 00:00:00 2007 +0000
+
+ The sequence .lock/ is forbidden.
+
+commit eebb76e96913d2dc78aef5f233fadc74af770b3b
+Author: Author Name <author@email>
+Date: Mon Jan 1 00:00:00 2007 +0000
+
+ The sequence /. is forbidden.
+
+commit d4850419ccc1146c7169f500725ce504b9774ed0 (tag: base, master)
+Author: Author Name <author@email>
+Date: Mon Jan 1 00:00:00 2007 +0000
+
+ initial
+
+ Signed-off-by: Commiter Name <commiter@email>
+% list_files
+d .git/patches
+d .git/patches/master
+d .git/refs/patches
+d .git/refs/patches/master
+f 06beca7069b9e576bd431f65d13862ed5d3e2a0f .git/patches/master/ctrlisforbidden.patch
+f 08267ec6783ea9d1adae55b275198f7594764ed0 .git/patches/master/series
+f 08267ec6783ea9d1adae55b275198f7594764ed0 .git/patches/master/status
+f 09b7e9be44ae5ec3a4bb30f5ee9d4ebc2c042f64 .git/patches/master/two_consecutive_dots_(.)_is_forbidden.patch
+f 0b971c9a17aeca2319c93d700ffd98acc2a93451 .git/patches/master/question-mark-is-forbidden.patch
+f 2b8392f63d61efc12add554555adae30883993cc .git/patches/master/cannot-end-in-slash-.patch
+f 2cd7c9ad392e071be03c051c6793e9b1e31d33c4 .git/patches/master/can-have-embedded-single-slashes.patch
+f 3136e448a4c820f6d2642f9d894c4087d3d109ab .git/patches/master/cannot_end_in_.patch
+f 34e07c584032df137f19bdb66d93f316f00a5ac8 .git/patches/master/tildeisforbidden.patch
+f 49bab499826b63deb2bd704629d60c7268c57aee .git/patches/master/the_sequence_-._is_forbidden.patch
+f 5bcddb8ccb6e6e5e8a61e9e56cb2e0f70cbab2f5 .git/patches/master/cannot@have@the@sequence@at-brace.patch
+f 637b982fe14a240de181ae63226b27e0c406b3dc .git/patches/master/asterisk-is-forbidden.patch
+f 698f8a7d41a64e3b6be1a3eba86574078b22a5f3 .git/patches/master/backslash-isorbidden.patch
+f 7b103c3c7ae298cd2334f6f49da48bae1424f77b .git/patches/master/crisalsoforbidden.patch
+f 9b810b8c63779c51d2e7f61ab59cd49835041563 .git/patches/master/x.patch
+f a22958d9ae9976fd7b2b5a9d0bcd44bf7ad9b08a .git/patches/master/caretisforbidden.patch
+f ab325bf5a432937fc6f231d3e8a773a62d53952b .git/patches/master/multiple-slashes--are--forbidden.patch
+f cb9cffbd4465bddee266c20ccebd14eb687eaa89 .git/patches/master/delisforbidden.patch
+f d0885a1a1fdee0fd1e4fedce3f7acd3100540bc4 .git/patches/master/openbracketisforbidden.patch
+f d2903523fb66a346596eabbdd1bda4e52b266440 .git/patches/master/check-multiple-.-dots-.-foo.patch
+f dfc11f76394059909671af036598c5fbe33001ba .git/patches/master/space_is_forbidden.patch
+f e47474c52d6c893f36d0457f885a6dd1267742bb .git/patches/master/colon_is_forbidden.patch
+f e7a5f8912592d9891e6159f5827c8b4f372cc406 .git/patches/master/the_sequence_.lock-_is_forbidden.patch
+f edfaa5e06bd662ae1f6a642834324fd9b849bbd9 .git/patches/master/a-component-may-not-end-in-foolock.patch
+r 01524f9921af2a041cc88c068f76baa39e436cb2 .git/refs/patches/master/ctrlisforbidden.patch
+r 025672497aff5c910c8ff86aaedc662f14c2f4ad .git/refs/patches/master/cannot-end-in-slash-.patch
+r 10433fd7206b7f79aabb4da514710d93c8deed4a .git/refs/patches/master/colon_is_forbidden.patch
+r 1626a11d979a1e9e775c766484172212277153df .git/refs/patches/master/asterisk-is-forbidden.patch
+r 3a0d5ccef0359004fcaa9cee98fbd6a2c4432e74 .git/refs/patches/master/tildeisforbidden.patch
+r 434e07cacdd8e7eb4723e67cb2d100b3a4121a3a .git/refs/patches/master/can-have-embedded-single-slashes.patch
+r 74df14ab3a0ec9a0382998fbf167ebb1b0a36c6a .git/refs/patches/master/question-mark-is-forbidden.patch
+r 7c3ffa4f940c862e9f11f5d4a5ae421f7a8d3141 .git/refs/patches/master/backslash-isorbidden.patch
+r 96a3e92c4df85f52362ce4f6d31983c462db9ae9 .git/refs/patches/master/a-component-may-not-end-in-foolock.patch
+r 9fc9677b61880f9159838e89f714893e0a2fcafb .git/refs/patches/master/delisforbidden.patch
+r a275ed5d7f10ea88c986852ee95a7d5a61663b5f .git/refs/patches/master/cannot@have@the@sequence@at-brace.patch
+r db6ea8252440b04811344336f510a5469b2ddab0 .git/refs/patches/master/check-multiple-.-dots-.-foo.patch
+r ea22c3b49c448dba8d7eaa6b805f9f1bc83fbedc .git/refs/patches/master/space_is_forbidden.patch
+r ea46f435d4d8f3c5349dce1aabc1a39fbf7ef803 .git/refs/patches/master/x.patch
+r ec46429125abdb0c5ac2b46cc399bdcd7cfc73fd .git/refs/patches/master/crisalsoforbidden.patch
+r edef5e925083d445f71c170d3293fac9619bc7a2 .git/refs/patches/master/openbracketisforbidden.patch
+r ee4f0f96dfc9c94f5410c1e6414f9004325a37fc .git/refs/patches/master/the_sequence_.lock-_is_forbidden.patch
+r f091fee39457e64ebd35410c1cf95e6613816a54 .git/refs/patches/master/cannot_end_in_.patch
+r f13e243c7c56f39422567a431bccceec8b789596 .git/refs/patches/master/multiple-slashes--are--forbidden.patch
+r fb1edb753c97ec865ceea316420b1df586caaa2b .git/refs/patches/master/caretisforbidden.patch
+r fdcb23c3072209bea3d9e0a2594132b936c5347e .git/refs/patches/master/the_sequence_-._is_forbidden.patch
+r fe07105cd62660f4440ad24b9fc7dfdd9e71d764 .git/refs/patches/master/two_consecutive_dots_(.)_is_forbidden.patch
+% guilt pop -a
+All patches popped.
@@ -0,0 +1,72 @@+#!/bin/bash+#+# Test import-commit+#++functioncreate_commit+{+echo$1>>$1&&+gitadd$1&&+gitcommit-m"$2"+}++source"$REG_DIR/scaffold"++b()+{+printf"%b""$1"+}++cmdsetup_git_repo++cmdgittagbase++# Create a series of commits whose first line of the commit message+# each violates one of the rules in get-check-ref-format(1).++cmdcreate_commita"The sequence /. is forbidden."+cmdcreate_commita"The sequence .lock/ is forbidden."+cmdcreate_commita"A/component/may/not/end/in/foo.lock"+cmdcreate_commita"Two consecutive dots (..) is forbidden."+cmdcreate_commita"Check/multiple/../dots/...../foo..patch"+cmdcreate_commita"Space is forbidden."+cmdcreate_commita"Tilde~is~forbidden."+cmdcreate_commita"Caret^is^forbidden."+cmdcreate_commita"Colon:is:forbidden."+cmdcreate_commita`b'Del\177is\177forbidden.'`+# Create a branch and a tag from the current commit, to ensure that+# doing so does not affect how the commit is imported.+cmdgitbranchsome-branch+cmdgittagsome-tag+cmdcreate_commita`b'Ctrl\001is\002forbidden.'`+cmdcreate_commita`b'CR\ris\ralso\rforbidden.'`+cmdcreate_commita"Question-mark?is?forbidden."+cmdcreate_commita"Asterisk*is*forbidden."+cmdcreate_commita"Open[bracket[is[forbidden."+cmdcreate_commita"Multiple/slashes//are//forbidden."+cmdcreate_commita"Cannot/end/in/slash/"+cmdcreate_commita"Cannot end in .."+cmdcreate_commita"Cannot@{have@{the@{sequence@{at-brace."+cmdcreate_commita"@"+cmdcreate_commita"Backslash\\is\\forbidden."++# Slash is sometimes allowed; this is not problematic.+cmdcreate_commita"Can/have/embedded/single/slashes"++cmdgitlog++# Import all the commits to guilt.+cmdguiltinit+cmdguiltimport-commitbase..HEAD++forpatchin.git/patches/master/*.patch+do+touch-a-m-t"$TOUCH_DATE""$patch"+done++# If push and pop works, the names we created are good.+cmdguiltpush-a+cmdgitlog--decorate+cmdgitlog--decoratesome-branch+cmdlist_files+cmdguiltpop-a
From: Per Cederqvist <hidden> Date: 2016-06-15 23:00:24
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 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 <redacted>
---
regression/run-tests | 11 ++++++++---
1 file changed, 8 insertions(+), 3 deletions(-)
From: Per Cederqvist <hidden> Date: 2016-06-15 23:00:24
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.)
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 <redacted>
---
regression/scaffold | 17 +++++++++++------
regression/t-032.sh | 2 +-
2 files changed, 12 insertions(+), 7 deletions(-)
From: Per Cederqvist <hidden> Date: 2016-06-15 23:00:24
git branch names can contain commas. Check that "guilt graph" works
even in that case.
Signed-off-by: Per Cederqvist <redacted>
---
regression/t-033.out | 62 ++++++++++++++++++++++++++++++++++++++++++++++++++++
regression/t-033.sh | 37 +++++++++++++++++++++++++++++++
2 files changed, 99 insertions(+)
@@ -3,9 +3,46 @@# Test the graph code#+functionfixup_time_info+{+cmdguiltpop+touch-a-m-t"$TOUCH_DATE"".git/patches/a,graph/$1"+cmdguiltpush+}+source"$REG_DIR/scaffold" cmdsetup_repo shouldfailguiltgraph+cmdgitcheckout-ba,graphmaster++cmdguiltinit++cmdguiltnewa.patch++fixup_time_infoa.patch+cmdguiltgraph++cmdechoa>>file.txt+cmdgitaddfile.txt+cmdguiltrefresh+fixup_time_infoa.patch+cmdguiltgraph++# An unrelated file. No deps.+cmdguiltnewb.patch+cmdechob>>file2.txt+cmdgitaddfile2.txt+cmdguiltrefresh+fixup_time_infob.patch+cmdguiltgraph++# An change to an old file. Should add a dependency.+cmdguiltnewc.patch+cmdechoc>>file.txt+cmdgitaddfile.txt+cmdguiltrefresh+fixup_time_infoc.patch+cmdguiltgraph
From: Per Cederqvist <hidden> Date: 2016-06-15 23:00:24
Test that empty patches are handled correctly, both with and without
the guilt.diffstat configuration option.
Signed-off-by: Per Cederqvist <redacted>
---
regression/t-020.out | 250 +++++++++++++++++++++++++++++++++++++++++++++++++++
regression/t-020.sh | 60 +++++++++++++
2 files changed, 310 insertions(+)
@@ -69,6 +76,59 @@ done cmdlist_files+# push an empty patch with no commit message+cmdguiltnewempty.patch+fixup_time_infoempty.patch+cmdlist_files+cmdgitlog-p++# Ensure we can push the empty patch even when guilt.diffstat is true.+cmdgitconfigguilt.diffstattrue+cmdguiltrefresh+fixup_time_infoempty.patch+cmdlist_files+cmdgitlog-p+cmdgitconfigguilt.diffstatfalse++# Let the patch have a commit message, but no data.+cat.git/patches/master/empty.patch<<EOF+Fixabug.++From:PerCederqvist<ceder@lysator.liu.se>++Thiscommitfixesaseriousbug.++FIXME:+-addatestcase+-trackdownthebug+-actuallyfixit+EOF++fixup_time_infoempty.patch+cmdlist_files+cmdgitlog-p++# And once more, with an empty diffstat.++cmdgitconfigguilt.diffstattrue+cmdguiltrefresh+fixup_time_infoempty.patch+cmdlist_files+cmdgitlog-p++# Restore the diffstat setting and remove the empty patch.+cmdgitconfigguilt.diffstatfalse+cmdguiltrefresh+fixup_time_infoempty.patch+cmdlist_files+cmdgitlog-p+# (Cannot delete an applied patch)+shouldfailguiltdeleteempty.patch+cmdguiltpop-a+cmdguiltdelete-fempty.patch+cmdlist_files+cmdgitlog-p+# FIXME:# --all# -a
From: Per Cederqvist <hidden> Date: 2016-06-15 23:00:24
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 <redacted>
---
guilt-graph | 10 ++++++++--
regression/t-033.out | 3 +++
regression/t-033.sh | 11 +++++++++++
3 files changed, 22 insertions(+), 2 deletions(-)
create mode 100644 regression/t-033.out
create mode 100755 regression/t-033.sh
From: Per Cederqvist <hidden> Date: 2016-06-15 23:00:24
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 error message if "-m" isn't followed by a message
argument.
Signed-off-by: Per Cederqvist <redacted>
---
guilt-new | 7 +++----
1 file changed, 3 insertions(+), 4 deletions(-)
@@ -49,3 +49,10 @@ Signed-off-by: Commiter Name <commiter@email> % guilt header non-existant Patch non-existant is not in the series+% guilt header .*+.* does not uniquely identify a patch. Did you mean any of these?+ modify+ add+ remove+ mode+ patch-with-some-desc
@@ -31,4 +31,8 @@ done shouldfailguiltheadernon-existant+# This is an evil variant of a non-existant patch. However, this+# patch name is a regexp that just happens to match an existing patch.+shouldfailguiltheader'.*'+# FIXME: how do we check that -e works?
From: Per Cederqvist <hidden> Date: 2016-06-15 23:00:24
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.
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.
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 <redacted>
---
guilt | 23 ++-
guilt-fork | 2 +-
guilt-import | 2 +-
guilt-new | 2 +-
regression/t-025.out | 426 +++++++++++++++++++++++++++++++++++++++++++++++++--
regression/t-025.sh | 12 +-
regression/t-032.out | 4 +-
7 files changed, 448 insertions(+), 23 deletions(-)
@@ -132,14 +132,21 @@ fi # usage: valid_patchname <patchname> valid_patchname() {- case "$1" in- /*|./*|../*|*/./*|*/../*|*/.|*/..|*/|*\ *|*\ *)- return 1;;- *:*)- return 1;;- *)- return 0;;- esac+ if git check-ref-format --allow-onelevel "$1"+ then+ # Starting with Git version 1.8.5, a branch cannot be+ # the single character "@". Make sure guilt rejects+ # that name even if we are currently using an older+ # version of Git. This ensures that the test suite+ # runs fine using any version of Git.+ if [ "$1" = "@" ]+ then+ return 1+ fi+ return 0+ else+ return 1+ fi } get_branch()
@@ -37,7 +37,7 @@ else fi if ! valid_patchname "$newpatch"; then- die "The specified patch name contains invalid characters (:)."+ die "The specified patch name is invalid according to git-check-ref-format(1)." fi if [ -e "$GUILT_DIR/$branch/$newpatch" ]; then
@@ -40,7 +40,7 @@ if [ -e "$GUILT_DIR/$branch/$newname" ]; then fi if ! valid_patchname "$newname"; then- die "The specified patch name contains invalid characters (:)."+ die "The specified patch name is invalid according to git-check-ref-format(1)." fi # create any directories as needed
@@ -64,7 +64,7 @@ fi if ! valid_patchname "$patch"; then disp "Patchname is invalid." >&2- die "it cannot begin with '/', './' or '../', or contain /./, /../, or whitespace"+ die "It must follow the rules in git-check-ref-format(1)." fi # create any directories as needed
@@ -141,7 +141,7 @@ f da39a3ee5e6b4b0d3255bfef95601890afd80709 .git/patches/master/prepend r acdeef96ee30eb34bbbf65d11de5cf7da4b5fee8 .git/refs/patches/master/prepend % guilt new white space Patchname is invalid.-it cannot begin with '/', './' or '../', or contain /./, /../, or whitespace+It must follow the rules in git-check-ref-format(1). % list_files d .git/patches d .git/patches/master
@@ -211,7 +211,7 @@ f da39a3ee5e6b4b0d3255bfef95601890afd80709 .git/patches/master/prepend r acdeef96ee30eb34bbbf65d11de5cf7da4b5fee8 .git/refs/patches/master/prepend % guilt new /abc Patchname is invalid.-it cannot begin with '/', './' or '../', or contain /./, /../, or whitespace+It must follow the rules in git-check-ref-format(1). % list_files d .git/patches d .git/patches/master
@@ -235,7 +235,7 @@ f da39a3ee5e6b4b0d3255bfef95601890afd80709 .git/patches/master/prepend r acdeef96ee30eb34bbbf65d11de5cf7da4b5fee8 .git/refs/patches/master/prepend % guilt new ./blah Patchname is invalid.-it cannot begin with '/', './' or '../', or contain /./, /../, or whitespace+It must follow the rules in git-check-ref-format(1). % list_files d .git/patches d .git/patches/master
@@ -259,7 +259,7 @@ f da39a3ee5e6b4b0d3255bfef95601890afd80709 .git/patches/master/prepend r acdeef96ee30eb34bbbf65d11de5cf7da4b5fee8 .git/refs/patches/master/prepend % guilt new ../blah Patchname is invalid.-it cannot begin with '/', './' or '../', or contain /./, /../, or whitespace+It must follow the rules in git-check-ref-format(1). % list_files d .git/patches d .git/patches/master
@@ -283,7 +283,7 @@ f da39a3ee5e6b4b0d3255bfef95601890afd80709 .git/patches/master/prepend r acdeef96ee30eb34bbbf65d11de5cf7da4b5fee8 .git/refs/patches/master/prepend % guilt new abc/./blah Patchname is invalid.-it cannot begin with '/', './' or '../', or contain /./, /../, or whitespace+It must follow the rules in git-check-ref-format(1). % list_files d .git/patches d .git/patches/master
@@ -307,7 +307,7 @@ f da39a3ee5e6b4b0d3255bfef95601890afd80709 .git/patches/master/prepend r acdeef96ee30eb34bbbf65d11de5cf7da4b5fee8 .git/refs/patches/master/prepend % guilt new abc/../blah Patchname is invalid.-it cannot begin with '/', './' or '../', or contain /./, /../, or whitespace+It must follow the rules in git-check-ref-format(1). % list_files d .git/patches d .git/patches/master
@@ -331,7 +331,7 @@ f da39a3ee5e6b4b0d3255bfef95601890afd80709 .git/patches/master/prepend r acdeef96ee30eb34bbbf65d11de5cf7da4b5fee8 .git/refs/patches/master/prepend % guilt new abc/. Patchname is invalid.-it cannot begin with '/', './' or '../', or contain /./, /../, or whitespace+It must follow the rules in git-check-ref-format(1). % list_files d .git/patches d .git/patches/master
@@ -355,7 +355,7 @@ f da39a3ee5e6b4b0d3255bfef95601890afd80709 .git/patches/master/prepend r acdeef96ee30eb34bbbf65d11de5cf7da4b5fee8 .git/refs/patches/master/prepend % guilt new abc/.. Patchname is invalid.-it cannot begin with '/', './' or '../', or contain /./, /../, or whitespace+It must follow the rules in git-check-ref-format(1). % list_files d .git/patches d .git/patches/master
@@ -379,7 +379,415 @@ f da39a3ee5e6b4b0d3255bfef95601890afd80709 .git/patches/master/prepend r acdeef96ee30eb34bbbf65d11de5cf7da4b5fee8 .git/refs/patches/master/prepend % guilt new abc/ Patchname is invalid.-it cannot begin with '/', './' or '../', or contain /./, /../, or whitespace+It must follow the rules in git-check-ref-format(1).+% list_files+d .git/patches+d .git/patches/master+d .git/patches/master/dir+d .git/patches/master/dir/subdir+d .git/refs/patches+d .git/refs/patches/master+d .git/refs/patches/master/dir+d .git/refs/patches/master/dir/subdir+f 1ef04b4f4149870b3f06b5f99b9d9fc260cebc67 .git/patches/master/series+f 22930c6d1f1938f298a4fca51c57e4b47171db21 .git/patches/master/mode+f 413390f3906f16f30b054a4fb86c1e014b964504 .git/patches/master/remove+f 7ce0ecd062afe46bf743d0d63dbe79e18774fe03 .git/patches/master/status+f 9c18cc7abe6b87f18503714a80a677b4094eb457 .git/patches/master/add+f bc9ab2e0f5db99d483961e956e814d963f0309f8 .git/patches/master/modify+f da39a3ee5e6b4b0d3255bfef95601890afd80709 .git/patches/master/append+f da39a3ee5e6b4b0d3255bfef95601890afd80709 .git/patches/master/dir/file+f da39a3ee5e6b4b0d3255bfef95601890afd80709 .git/patches/master/dir/subdir/file+f da39a3ee5e6b4b0d3255bfef95601890afd80709 .git/patches/master/file+f da39a3ee5e6b4b0d3255bfef95601890afd80709 .git/patches/master/prepend+r acdeef96ee30eb34bbbf65d11de5cf7da4b5fee8 .git/refs/patches/master/prepend+% guilt new abc.lock+Patchname is invalid.+It must follow the rules in git-check-ref-format(1).+% list_files+d .git/patches+d .git/patches/master+d .git/patches/master/dir+d .git/patches/master/dir/subdir+d .git/refs/patches+d .git/refs/patches/master+d .git/refs/patches/master/dir+d .git/refs/patches/master/dir/subdir+f 1ef04b4f4149870b3f06b5f99b9d9fc260cebc67 .git/patches/master/series+f 22930c6d1f1938f298a4fca51c57e4b47171db21 .git/patches/master/mode+f 413390f3906f16f30b054a4fb86c1e014b964504 .git/patches/master/remove+f 7ce0ecd062afe46bf743d0d63dbe79e18774fe03 .git/patches/master/status+f 9c18cc7abe6b87f18503714a80a677b4094eb457 .git/patches/master/add+f bc9ab2e0f5db99d483961e956e814d963f0309f8 .git/patches/master/modify+f da39a3ee5e6b4b0d3255bfef95601890afd80709 .git/patches/master/append+f da39a3ee5e6b4b0d3255bfef95601890afd80709 .git/patches/master/dir/file+f da39a3ee5e6b4b0d3255bfef95601890afd80709 .git/patches/master/dir/subdir/file+f da39a3ee5e6b4b0d3255bfef95601890afd80709 .git/patches/master/file+f da39a3ee5e6b4b0d3255bfef95601890afd80709 .git/patches/master/prepend+r acdeef96ee30eb34bbbf65d11de5cf7da4b5fee8 .git/refs/patches/master/prepend+% guilt new a/b.lock/c+Patchname is invalid.+It must follow the rules in git-check-ref-format(1).+% list_files+d .git/patches+d .git/patches/master+d .git/patches/master/dir+d .git/patches/master/dir/subdir+d .git/refs/patches+d .git/refs/patches/master+d .git/refs/patches/master/dir+d .git/refs/patches/master/dir/subdir+f 1ef04b4f4149870b3f06b5f99b9d9fc260cebc67 .git/patches/master/series+f 22930c6d1f1938f298a4fca51c57e4b47171db21 .git/patches/master/mode+f 413390f3906f16f30b054a4fb86c1e014b964504 .git/patches/master/remove+f 7ce0ecd062afe46bf743d0d63dbe79e18774fe03 .git/patches/master/status+f 9c18cc7abe6b87f18503714a80a677b4094eb457 .git/patches/master/add+f bc9ab2e0f5db99d483961e956e814d963f0309f8 .git/patches/master/modify+f da39a3ee5e6b4b0d3255bfef95601890afd80709 .git/patches/master/append+f da39a3ee5e6b4b0d3255bfef95601890afd80709 .git/patches/master/dir/file+f da39a3ee5e6b4b0d3255bfef95601890afd80709 .git/patches/master/dir/subdir/file+f da39a3ee5e6b4b0d3255bfef95601890afd80709 .git/patches/master/file+f da39a3ee5e6b4b0d3255bfef95601890afd80709 .git/patches/master/prepend+r acdeef96ee30eb34bbbf65d11de5cf7da4b5fee8 .git/refs/patches/master/prepend+% guilt new cr+Patchname is invalid.+It must follow the rules in git-check-ref-format(1).+% list_files+d .git/patches+d .git/patches/master+d .git/patches/master/dir+d .git/patches/master/dir/subdir+d .git/refs/patches+d .git/refs/patches/master+d .git/refs/patches/master/dir+d .git/refs/patches/master/dir/subdir+f 1ef04b4f4149870b3f06b5f99b9d9fc260cebc67 .git/patches/master/series+f 22930c6d1f1938f298a4fca51c57e4b47171db21 .git/patches/master/mode+f 413390f3906f16f30b054a4fb86c1e014b964504 .git/patches/master/remove+f 7ce0ecd062afe46bf743d0d63dbe79e18774fe03 .git/patches/master/status+f 9c18cc7abe6b87f18503714a80a677b4094eb457 .git/patches/master/add+f bc9ab2e0f5db99d483961e956e814d963f0309f8 .git/patches/master/modify+f da39a3ee5e6b4b0d3255bfef95601890afd80709 .git/patches/master/append+f da39a3ee5e6b4b0d3255bfef95601890afd80709 .git/patches/master/dir/file+f da39a3ee5e6b4b0d3255bfef95601890afd80709 .git/patches/master/dir/subdir/file+f da39a3ee5e6b4b0d3255bfef95601890afd80709 .git/patches/master/file+f da39a3ee5e6b4b0d3255bfef95601890afd80709 .git/patches/master/prepend+r acdeef96ee30eb34bbbf65d11de5cf7da4b5fee8 .git/refs/patches/master/prepend+% guilt new ctrl-a+Patchname is invalid.+It must follow the rules in git-check-ref-format(1).+% list_files+d .git/patches+d .git/patches/master+d .git/patches/master/dir+d .git/patches/master/dir/subdir+d .git/refs/patches+d .git/refs/patches/master+d .git/refs/patches/master/dir+d .git/refs/patches/master/dir/subdir+f 1ef04b4f4149870b3f06b5f99b9d9fc260cebc67 .git/patches/master/series+f 22930c6d1f1938f298a4fca51c57e4b47171db21 .git/patches/master/mode+f 413390f3906f16f30b054a4fb86c1e014b964504 .git/patches/master/remove+f 7ce0ecd062afe46bf743d0d63dbe79e18774fe03 .git/patches/master/status+f 9c18cc7abe6b87f18503714a80a677b4094eb457 .git/patches/master/add+f bc9ab2e0f5db99d483961e956e814d963f0309f8 .git/patches/master/modify+f da39a3ee5e6b4b0d3255bfef95601890afd80709 .git/patches/master/append+f da39a3ee5e6b4b0d3255bfef95601890afd80709 .git/patches/master/dir/file+f da39a3ee5e6b4b0d3255bfef95601890afd80709 .git/patches/master/dir/subdir/file+f da39a3ee5e6b4b0d3255bfef95601890afd80709 .git/patches/master/file+f da39a3ee5e6b4b0d3255bfef95601890afd80709 .git/patches/master/prepend+r acdeef96ee30eb34bbbf65d11de5cf7da4b5fee8 .git/refs/patches/master/prepend+% guilt new formfeed+Patchname is invalid.+It must follow the rules in git-check-ref-format(1).+% list_files+d .git/patches+d .git/patches/master+d .git/patches/master/dir+d .git/patches/master/dir/subdir+d .git/refs/patches+d .git/refs/patches/master+d .git/refs/patches/master/dir+d .git/refs/patches/master/dir/subdir+f 1ef04b4f4149870b3f06b5f99b9d9fc260cebc67 .git/patches/master/series+f 22930c6d1f1938f298a4fca51c57e4b47171db21 .git/patches/master/mode+f 413390f3906f16f30b054a4fb86c1e014b964504 .git/patches/master/remove+f 7ce0ecd062afe46bf743d0d63dbe79e18774fe03 .git/patches/master/status+f 9c18cc7abe6b87f18503714a80a677b4094eb457 .git/patches/master/add+f bc9ab2e0f5db99d483961e956e814d963f0309f8 .git/patches/master/modify+f da39a3ee5e6b4b0d3255bfef95601890afd80709 .git/patches/master/append+f da39a3ee5e6b4b0d3255bfef95601890afd80709 .git/patches/master/dir/file+f da39a3ee5e6b4b0d3255bfef95601890afd80709 .git/patches/master/dir/subdir/file+f da39a3ee5e6b4b0d3255bfef95601890afd80709 .git/patches/master/file+f da39a3ee5e6b4b0d3255bfef95601890afd80709 .git/patches/master/prepend+r acdeef96ee30eb34bbbf65d11de5cf7da4b5fee8 .git/refs/patches/master/prepend+% guilt new del+Patchname is invalid.+It must follow the rules in git-check-ref-format(1).+% list_files+d .git/patches+d .git/patches/master+d .git/patches/master/dir+d .git/patches/master/dir/subdir+d .git/refs/patches+d .git/refs/patches/master+d .git/refs/patches/master/dir+d .git/refs/patches/master/dir/subdir+f 1ef04b4f4149870b3f06b5f99b9d9fc260cebc67 .git/patches/master/series+f 22930c6d1f1938f298a4fca51c57e4b47171db21 .git/patches/master/mode+f 413390f3906f16f30b054a4fb86c1e014b964504 .git/patches/master/remove+f 7ce0ecd062afe46bf743d0d63dbe79e18774fe03 .git/patches/master/status+f 9c18cc7abe6b87f18503714a80a677b4094eb457 .git/patches/master/add+f bc9ab2e0f5db99d483961e956e814d963f0309f8 .git/patches/master/modify+f da39a3ee5e6b4b0d3255bfef95601890afd80709 .git/patches/master/append+f da39a3ee5e6b4b0d3255bfef95601890afd80709 .git/patches/master/dir/file+f da39a3ee5e6b4b0d3255bfef95601890afd80709 .git/patches/master/dir/subdir/file+f da39a3ee5e6b4b0d3255bfef95601890afd80709 .git/patches/master/file+f da39a3ee5e6b4b0d3255bfef95601890afd80709 .git/patches/master/prepend+r acdeef96ee30eb34bbbf65d11de5cf7da4b5fee8 .git/refs/patches/master/prepend+% guilt new tilde~+Patchname is invalid.+It must follow the rules in git-check-ref-format(1).+% list_files+d .git/patches+d .git/patches/master+d .git/patches/master/dir+d .git/patches/master/dir/subdir+d .git/refs/patches+d .git/refs/patches/master+d .git/refs/patches/master/dir+d .git/refs/patches/master/dir/subdir+f 1ef04b4f4149870b3f06b5f99b9d9fc260cebc67 .git/patches/master/series+f 22930c6d1f1938f298a4fca51c57e4b47171db21 .git/patches/master/mode+f 413390f3906f16f30b054a4fb86c1e014b964504 .git/patches/master/remove+f 7ce0ecd062afe46bf743d0d63dbe79e18774fe03 .git/patches/master/status+f 9c18cc7abe6b87f18503714a80a677b4094eb457 .git/patches/master/add+f bc9ab2e0f5db99d483961e956e814d963f0309f8 .git/patches/master/modify+f da39a3ee5e6b4b0d3255bfef95601890afd80709 .git/patches/master/append+f da39a3ee5e6b4b0d3255bfef95601890afd80709 .git/patches/master/dir/file+f da39a3ee5e6b4b0d3255bfef95601890afd80709 .git/patches/master/dir/subdir/file+f da39a3ee5e6b4b0d3255bfef95601890afd80709 .git/patches/master/file+f da39a3ee5e6b4b0d3255bfef95601890afd80709 .git/patches/master/prepend+r acdeef96ee30eb34bbbf65d11de5cf7da4b5fee8 .git/refs/patches/master/prepend+% guilt new caret^+Patchname is invalid.+It must follow the rules in git-check-ref-format(1).+% list_files+d .git/patches+d .git/patches/master+d .git/patches/master/dir+d .git/patches/master/dir/subdir+d .git/refs/patches+d .git/refs/patches/master+d .git/refs/patches/master/dir+d .git/refs/patches/master/dir/subdir+f 1ef04b4f4149870b3f06b5f99b9d9fc260cebc67 .git/patches/master/series+f 22930c6d1f1938f298a4fca51c57e4b47171db21 .git/patches/master/mode+f 413390f3906f16f30b054a4fb86c1e014b964504 .git/patches/master/remove+f 7ce0ecd062afe46bf743d0d63dbe79e18774fe03 .git/patches/master/status+f 9c18cc7abe6b87f18503714a80a677b4094eb457 .git/patches/master/add+f bc9ab2e0f5db99d483961e956e814d963f0309f8 .git/patches/master/modify+f da39a3ee5e6b4b0d3255bfef95601890afd80709 .git/patches/master/append+f da39a3ee5e6b4b0d3255bfef95601890afd80709 .git/patches/master/dir/file+f da39a3ee5e6b4b0d3255bfef95601890afd80709 .git/patches/master/dir/subdir/file+f da39a3ee5e6b4b0d3255bfef95601890afd80709 .git/patches/master/file+f da39a3ee5e6b4b0d3255bfef95601890afd80709 .git/patches/master/prepend+r acdeef96ee30eb34bbbf65d11de5cf7da4b5fee8 .git/refs/patches/master/prepend+% guilt new colon:+Patchname is invalid.+It must follow the rules in git-check-ref-format(1).+% list_files+d .git/patches+d .git/patches/master+d .git/patches/master/dir+d .git/patches/master/dir/subdir+d .git/refs/patches+d .git/refs/patches/master+d .git/refs/patches/master/dir+d .git/refs/patches/master/dir/subdir+f 1ef04b4f4149870b3f06b5f99b9d9fc260cebc67 .git/patches/master/series+f 22930c6d1f1938f298a4fca51c57e4b47171db21 .git/patches/master/mode+f 413390f3906f16f30b054a4fb86c1e014b964504 .git/patches/master/remove+f 7ce0ecd062afe46bf743d0d63dbe79e18774fe03 .git/patches/master/status+f 9c18cc7abe6b87f18503714a80a677b4094eb457 .git/patches/master/add+f bc9ab2e0f5db99d483961e956e814d963f0309f8 .git/patches/master/modify+f da39a3ee5e6b4b0d3255bfef95601890afd80709 .git/patches/master/append+f da39a3ee5e6b4b0d3255bfef95601890afd80709 .git/patches/master/dir/file+f da39a3ee5e6b4b0d3255bfef95601890afd80709 .git/patches/master/dir/subdir/file+f da39a3ee5e6b4b0d3255bfef95601890afd80709 .git/patches/master/file+f da39a3ee5e6b4b0d3255bfef95601890afd80709 .git/patches/master/prepend+r acdeef96ee30eb34bbbf65d11de5cf7da4b5fee8 .git/refs/patches/master/prepend+% guilt new questionmark?+Patchname is invalid.+It must follow the rules in git-check-ref-format(1).+% list_files+d .git/patches+d .git/patches/master+d .git/patches/master/dir+d .git/patches/master/dir/subdir+d .git/refs/patches+d .git/refs/patches/master+d .git/refs/patches/master/dir+d .git/refs/patches/master/dir/subdir+f 1ef04b4f4149870b3f06b5f99b9d9fc260cebc67 .git/patches/master/series+f 22930c6d1f1938f298a4fca51c57e4b47171db21 .git/patches/master/mode+f 413390f3906f16f30b054a4fb86c1e014b964504 .git/patches/master/remove+f 7ce0ecd062afe46bf743d0d63dbe79e18774fe03 .git/patches/master/status+f 9c18cc7abe6b87f18503714a80a677b4094eb457 .git/patches/master/add+f bc9ab2e0f5db99d483961e956e814d963f0309f8 .git/patches/master/modify+f da39a3ee5e6b4b0d3255bfef95601890afd80709 .git/patches/master/append+f da39a3ee5e6b4b0d3255bfef95601890afd80709 .git/patches/master/dir/file+f da39a3ee5e6b4b0d3255bfef95601890afd80709 .git/patches/master/dir/subdir/file+f da39a3ee5e6b4b0d3255bfef95601890afd80709 .git/patches/master/file+f da39a3ee5e6b4b0d3255bfef95601890afd80709 .git/patches/master/prepend+r acdeef96ee30eb34bbbf65d11de5cf7da4b5fee8 .git/refs/patches/master/prepend+% guilt new asterisk*+Patchname is invalid.+It must follow the rules in git-check-ref-format(1).+% list_files+d .git/patches+d .git/patches/master+d .git/patches/master/dir+d .git/patches/master/dir/subdir+d .git/refs/patches+d .git/refs/patches/master+d .git/refs/patches/master/dir+d .git/refs/patches/master/dir/subdir+f 1ef04b4f4149870b3f06b5f99b9d9fc260cebc67 .git/patches/master/series+f 22930c6d1f1938f298a4fca51c57e4b47171db21 .git/patches/master/mode+f 413390f3906f16f30b054a4fb86c1e014b964504 .git/patches/master/remove+f 7ce0ecd062afe46bf743d0d63dbe79e18774fe03 .git/patches/master/status+f 9c18cc7abe6b87f18503714a80a677b4094eb457 .git/patches/master/add+f bc9ab2e0f5db99d483961e956e814d963f0309f8 .git/patches/master/modify+f da39a3ee5e6b4b0d3255bfef95601890afd80709 .git/patches/master/append+f da39a3ee5e6b4b0d3255bfef95601890afd80709 .git/patches/master/dir/file+f da39a3ee5e6b4b0d3255bfef95601890afd80709 .git/patches/master/dir/subdir/file+f da39a3ee5e6b4b0d3255bfef95601890afd80709 .git/patches/master/file+f da39a3ee5e6b4b0d3255bfef95601890afd80709 .git/patches/master/prepend+r acdeef96ee30eb34bbbf65d11de5cf7da4b5fee8 .git/refs/patches/master/prepend+% guilt new open[bracket+Patchname is invalid.+It must follow the rules in git-check-ref-format(1).+% list_files+d .git/patches+d .git/patches/master+d .git/patches/master/dir+d .git/patches/master/dir/subdir+d .git/refs/patches+d .git/refs/patches/master+d .git/refs/patches/master/dir+d .git/refs/patches/master/dir/subdir+f 1ef04b4f4149870b3f06b5f99b9d9fc260cebc67 .git/patches/master/series+f 22930c6d1f1938f298a4fca51c57e4b47171db21 .git/patches/master/mode+f 413390f3906f16f30b054a4fb86c1e014b964504 .git/patches/master/remove+f 7ce0ecd062afe46bf743d0d63dbe79e18774fe03 .git/patches/master/status+f 9c18cc7abe6b87f18503714a80a677b4094eb457 .git/patches/master/add+f bc9ab2e0f5db99d483961e956e814d963f0309f8 .git/patches/master/modify+f da39a3ee5e6b4b0d3255bfef95601890afd80709 .git/patches/master/append+f da39a3ee5e6b4b0d3255bfef95601890afd80709 .git/patches/master/dir/file+f da39a3ee5e6b4b0d3255bfef95601890afd80709 .git/patches/master/dir/subdir/file+f da39a3ee5e6b4b0d3255bfef95601890afd80709 .git/patches/master/file+f da39a3ee5e6b4b0d3255bfef95601890afd80709 .git/patches/master/prepend+r acdeef96ee30eb34bbbf65d11de5cf7da4b5fee8 .git/refs/patches/master/prepend+% guilt new consecutive//slashes+Patchname is invalid.+It must follow the rules in git-check-ref-format(1).+% list_files+d .git/patches+d .git/patches/master+d .git/patches/master/dir+d .git/patches/master/dir/subdir+d .git/refs/patches+d .git/refs/patches/master+d .git/refs/patches/master/dir+d .git/refs/patches/master/dir/subdir+f 1ef04b4f4149870b3f06b5f99b9d9fc260cebc67 .git/patches/master/series+f 22930c6d1f1938f298a4fca51c57e4b47171db21 .git/patches/master/mode+f 413390f3906f16f30b054a4fb86c1e014b964504 .git/patches/master/remove+f 7ce0ecd062afe46bf743d0d63dbe79e18774fe03 .git/patches/master/status+f 9c18cc7abe6b87f18503714a80a677b4094eb457 .git/patches/master/add+f bc9ab2e0f5db99d483961e956e814d963f0309f8 .git/patches/master/modify+f da39a3ee5e6b4b0d3255bfef95601890afd80709 .git/patches/master/append+f da39a3ee5e6b4b0d3255bfef95601890afd80709 .git/patches/master/dir/file+f da39a3ee5e6b4b0d3255bfef95601890afd80709 .git/patches/master/dir/subdir/file+f da39a3ee5e6b4b0d3255bfef95601890afd80709 .git/patches/master/file+f da39a3ee5e6b4b0d3255bfef95601890afd80709 .git/patches/master/prepend+r acdeef96ee30eb34bbbf65d11de5cf7da4b5fee8 .git/refs/patches/master/prepend+% guilt new trailing-dot.+Patchname is invalid.+It must follow the rules in git-check-ref-format(1).+% list_files+d .git/patches+d .git/patches/master+d .git/patches/master/dir+d .git/patches/master/dir/subdir+d .git/refs/patches+d .git/refs/patches/master+d .git/refs/patches/master/dir+d .git/refs/patches/master/dir/subdir+f 1ef04b4f4149870b3f06b5f99b9d9fc260cebc67 .git/patches/master/series+f 22930c6d1f1938f298a4fca51c57e4b47171db21 .git/patches/master/mode+f 413390f3906f16f30b054a4fb86c1e014b964504 .git/patches/master/remove+f 7ce0ecd062afe46bf743d0d63dbe79e18774fe03 .git/patches/master/status+f 9c18cc7abe6b87f18503714a80a677b4094eb457 .git/patches/master/add+f bc9ab2e0f5db99d483961e956e814d963f0309f8 .git/patches/master/modify+f da39a3ee5e6b4b0d3255bfef95601890afd80709 .git/patches/master/append+f da39a3ee5e6b4b0d3255bfef95601890afd80709 .git/patches/master/dir/file+f da39a3ee5e6b4b0d3255bfef95601890afd80709 .git/patches/master/dir/subdir/file+f da39a3ee5e6b4b0d3255bfef95601890afd80709 .git/patches/master/file+f da39a3ee5e6b4b0d3255bfef95601890afd80709 .git/patches/master/prepend+r acdeef96ee30eb34bbbf65d11de5cf7da4b5fee8 .git/refs/patches/master/prepend+% guilt new bad@{seq+Patchname is invalid.+It must follow the rules in git-check-ref-format(1).+% list_files+d .git/patches+d .git/patches/master+d .git/patches/master/dir+d .git/patches/master/dir/subdir+d .git/refs/patches+d .git/refs/patches/master+d .git/refs/patches/master/dir+d .git/refs/patches/master/dir/subdir+f 1ef04b4f4149870b3f06b5f99b9d9fc260cebc67 .git/patches/master/series+f 22930c6d1f1938f298a4fca51c57e4b47171db21 .git/patches/master/mode+f 413390f3906f16f30b054a4fb86c1e014b964504 .git/patches/master/remove+f 7ce0ecd062afe46bf743d0d63dbe79e18774fe03 .git/patches/master/status+f 9c18cc7abe6b87f18503714a80a677b4094eb457 .git/patches/master/add+f bc9ab2e0f5db99d483961e956e814d963f0309f8 .git/patches/master/modify+f da39a3ee5e6b4b0d3255bfef95601890afd80709 .git/patches/master/append+f da39a3ee5e6b4b0d3255bfef95601890afd80709 .git/patches/master/dir/file+f da39a3ee5e6b4b0d3255bfef95601890afd80709 .git/patches/master/dir/subdir/file+f da39a3ee5e6b4b0d3255bfef95601890afd80709 .git/patches/master/file+f da39a3ee5e6b4b0d3255bfef95601890afd80709 .git/patches/master/prepend+r acdeef96ee30eb34bbbf65d11de5cf7da4b5fee8 .git/refs/patches/master/prepend+% guilt new @+Patchname is invalid.+It must follow the rules in git-check-ref-format(1).+% list_files+d .git/patches+d .git/patches/master+d .git/patches/master/dir+d .git/patches/master/dir/subdir+d .git/refs/patches+d .git/refs/patches/master+d .git/refs/patches/master/dir+d .git/refs/patches/master/dir/subdir+f 1ef04b4f4149870b3f06b5f99b9d9fc260cebc67 .git/patches/master/series+f 22930c6d1f1938f298a4fca51c57e4b47171db21 .git/patches/master/mode+f 413390f3906f16f30b054a4fb86c1e014b964504 .git/patches/master/remove+f 7ce0ecd062afe46bf743d0d63dbe79e18774fe03 .git/patches/master/status+f 9c18cc7abe6b87f18503714a80a677b4094eb457 .git/patches/master/add+f bc9ab2e0f5db99d483961e956e814d963f0309f8 .git/patches/master/modify+f da39a3ee5e6b4b0d3255bfef95601890afd80709 .git/patches/master/append+f da39a3ee5e6b4b0d3255bfef95601890afd80709 .git/patches/master/dir/file+f da39a3ee5e6b4b0d3255bfef95601890afd80709 .git/patches/master/dir/subdir/file+f da39a3ee5e6b4b0d3255bfef95601890afd80709 .git/patches/master/file+f da39a3ee5e6b4b0d3255bfef95601890afd80709 .git/patches/master/prepend+r acdeef96ee30eb34bbbf65d11de5cf7da4b5fee8 .git/refs/patches/master/prepend+% guilt new backslash\+Patchname is invalid.+It must follow the rules in git-check-ref-format(1). % list_files d .git/patches d .git/patches/master
@@ -1,7 +1,7 @@ % setup_repo % touch foo foo:baz % guilt import -P foo:bar foo-The specified patch name contains invalid characters (:).+The specified patch name is invalid according to git-check-ref-format(1). % guilt import -P foo:bar foo2 Specified file does not exist. % guilt import -P foo foo2
@@ -15,4 +15,4 @@ Already tracking a patch under that name. Already tracking a patch under that name. % guilt import -P foo,bar foo % guilt import foo:baz-The specified patch name contains invalid characters (:).+The specified patch name is invalid according to git-check-ref-format(1).
@@ -23,7 +23,7 @@ if ! must_commit_first; then fi disp "About to begin conversion..." >&2-disp "Current head: `cat $GIT_DIR/refs/heads/\`git_branch\``" >&2+disp "Current head: `cat \"$GIT_DIR\"/refs/heads/\`git_branch\``" >&2 for rev in `git rev-list $rhash`; do s=`git log --pretty=oneline -1 $rev | cut -c 42-`
@@ -46,7 +46,7 @@ for rev in `git rev-list $rhash`; do do_make_header $rev echo "" git diff --binary $rev^..$rev- ) > $GUILT_DIR/$branch/$fname+ ) > "$GUILT_DIR/$branch/$fname" # FIXME: grab the GIT_AUTHOR_DATE from the commit object and set the # timestamp on the patch
@@ -68,6 +68,6 @@ for rev in `git rev-list $rhash`; do done disp "Done." >&2-disp "Current head: `cat $GIT_DIR/refs/heads/\`git_branch\``" >&2+disp "Current head: `cat \"$GIT_DIR\"/refs/heads/\`git_branch\``" >&2 }
From: Per Cederqvist <hidden> Date: 2016-06-15 23:00:24
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 expansion is
not portable; it is not supported by dash.)
Signed-off-by: Per Cederqvist <redacted>
---
guilt-import-commit | 2 +-
regression/t-034.out | 14 +++++++-------
2 files changed, 8 insertions(+), 8 deletions(-)
@@ -236,7 +236,7 @@ Date: Mon Jan 1 00:00:00 2007 +0000 About to begin conversion... Current head: 2a8b1889aa5066193bac978e6bf5073ffcfa6541 Converting 2a8b1889 as can-have-embedded-single-slashes-Converting 0a46f8fa as backslash-isorbidden+Converting 0a46f8fa as backslash-is-forbidden Converting aedb74fd as x Converting 30187ed0 as cannot@have@the@sequence@at-brace Converting 106e8e5a as cannot_end_in_
@@ -311,7 +311,7 @@ Date: Mon Jan 1 00:00:00 2007 +0000 Can/have/embedded/single/slashes-commit 7c3ffa4f940c862e9f11f5d4a5ae421f7a8d3141 (refs/patches/master/backslash-isorbidden.patch)+commit 7c3ffa4f940c862e9f11f5d4a5ae421f7a8d3141 (refs/patches/master/backslash-is-forbidden.patch) Author: Author Name <author@email> Date: Mon Jan 1 00:00:00 2007 +0000
@@ -518,8 +518,6 @@ d .git/patches/master d .git/refs/patches d .git/refs/patches/master f 06beca7069b9e576bd431f65d13862ed5d3e2a0f .git/patches/master/ctrlisforbidden.patch-f 08267ec6783ea9d1adae55b275198f7594764ed0 .git/patches/master/series-f 08267ec6783ea9d1adae55b275198f7594764ed0 .git/patches/master/status f 09b7e9be44ae5ec3a4bb30f5ee9d4ebc2c042f64 .git/patches/master/two_consecutive_dots_(.)_is_forbidden.patch f 0b971c9a17aeca2319c93d700ffd98acc2a93451 .git/patches/master/question-mark-is-forbidden.patch f 2b8392f63d61efc12add554555adae30883993cc .git/patches/master/cannot-end-in-slash-.patch
@@ -529,7 +527,7 @@ f 34e07c584032df137f19bdb66d93f316f00a5ac8 .git/patches/master/tildeisforbidden f 49bab499826b63deb2bd704629d60c7268c57aee .git/patches/master/the_sequence_-._is_forbidden.patch f 5bcddb8ccb6e6e5e8a61e9e56cb2e0f70cbab2f5 .git/patches/master/cannot@have@the@sequence@at-brace.patch f 637b982fe14a240de181ae63226b27e0c406b3dc .git/patches/master/asterisk-is-forbidden.patch-f 698f8a7d41a64e3b6be1a3eba86574078b22a5f3 .git/patches/master/backslash-isorbidden.patch+f 698f8a7d41a64e3b6be1a3eba86574078b22a5f3 .git/patches/master/backslash-is-forbidden.patch f 7b103c3c7ae298cd2334f6f49da48bae1424f77b .git/patches/master/crisalsoforbidden.patch f 9b810b8c63779c51d2e7f61ab59cd49835041563 .git/patches/master/x.patch f a22958d9ae9976fd7b2b5a9d0bcd44bf7ad9b08a .git/patches/master/caretisforbidden.patch
@@ -537,6 +535,8 @@ f ab325bf5a432937fc6f231d3e8a773a62d53952b .git/patches/master/multiple-slashes f cb9cffbd4465bddee266c20ccebd14eb687eaa89 .git/patches/master/delisforbidden.patch f d0885a1a1fdee0fd1e4fedce3f7acd3100540bc4 .git/patches/master/openbracketisforbidden.patch f d2903523fb66a346596eabbdd1bda4e52b266440 .git/patches/master/check-multiple-.-dots-.-foo.patch+f da90de1c84138194524994e0bc3bc4ca8189c999 .git/patches/master/series+f da90de1c84138194524994e0bc3bc4ca8189c999 .git/patches/master/status f dfc11f76394059909671af036598c5fbe33001ba .git/patches/master/space_is_forbidden.patch f e47474c52d6c893f36d0457f885a6dd1267742bb .git/patches/master/colon_is_forbidden.patch f e7a5f8912592d9891e6159f5827c8b4f372cc406 .git/patches/master/the_sequence_.lock-_is_forbidden.patch
@@ -548,7 +548,7 @@ r 1626a11d979a1e9e775c766484172212277153df .git/refs/patches/master/asterisk-is r 3a0d5ccef0359004fcaa9cee98fbd6a2c4432e74 .git/refs/patches/master/tildeisforbidden.patch r 434e07cacdd8e7eb4723e67cb2d100b3a4121a3a .git/refs/patches/master/can-have-embedded-single-slashes.patch r 74df14ab3a0ec9a0382998fbf167ebb1b0a36c6a .git/refs/patches/master/question-mark-is-forbidden.patch-r 7c3ffa4f940c862e9f11f5d4a5ae421f7a8d3141 .git/refs/patches/master/backslash-isorbidden.patch+r 7c3ffa4f940c862e9f11f5d4a5ae421f7a8d3141 .git/refs/patches/master/backslash-is-forbidden.patch r 96a3e92c4df85f52362ce4f6d31983c462db9ae9 .git/refs/patches/master/a-component-may-not-end-in-foolock.patch r 9fc9677b61880f9159838e89f714893e0a2fcafb .git/refs/patches/master/delisforbidden.patch r a275ed5d7f10ea88c986852ee95a7d5a61663b5f .git/refs/patches/master/cannot@have@the@sequence@at-brace.patch
From: Per Cederqvist <hidden> Date: 2016-06-15 23:00:24
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 <redacted>
---
regression/scaffold | 1 +
1 file changed, 1 insertion(+)
@@ -87,6 +87,7 @@ function setup_git_repo # Explicitly set config that the tests rely on. git config log.date default git config log.decorate no+ git config guilt.diffstat false } function setup_guilt_repo
From: Per Cederqvist <hidden> Date: 2016-06-15 23:00:24
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 use the
supplied patch name as an unachored regexp if no exact match was
found. If the regexp yields a unique match, it is used; if more than
one patch matches, the names of all patches are listed and the command
fails. (Exercise left to the reader: generalized this so that "guilt
push" also accepts a unique regular expression.)
Signed-off-by: Per Cederqvist <redacted>
---
guilt-header | 33 ++++++++++++++++++++++++++++++---
1 file changed, 30 insertions(+), 3 deletions(-)
@@ -46,3 +46,12 @@ cmd git add file.txt cmdguiltrefresh fixup_time_infoc.patch cmdguiltgraph++# A patch name that contains funky characters, including unbalanced+# quotes.+cmdguiltnew"a-\"better&quicker'-patch.patch"+cmdechod>>file.txt+cmdgitaddfile.txt+cmdguiltrefresh+fixup_time_info"a-\"better&quicker'-patch.patch"+cmdguiltgraph--
1.8.3.1
--
To unsubscribe from this list: send the line "unsubscribe git" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
From: Jeff Sipek <hidden> Date: 2016-06-15 23:00:25
On Fri, Mar 21, 2014 at 08:31:38AM +0100, Per Cederqvist wrote:
I recently found myself sitting on a train with a computer in front of
me. I tried to use "guilt import-commit", which seemed to work, but
when I tried to "guilt push" the commits I had just imported I got
some errors. It turned out that "guilt import-commit" had generated
invalid patch names.
I decided to fix the issue, and write a test case that demonstrated
the problem.
One thing led to another, and here I am, a few late nights at a hotel
and a return trip on the train later, submitting a patch series in 28
parts. Sorry about the number of patches, but this is what happens
when you uncover a bug while writing a test case for the bug you
uncovered while writing a test case for your original problem.
No problem. I prefer large number of patches instead of a big wad that's
much harder to follow.
The patch series consists of:
...
- Changed behavior: "guilt push" when there is nothing more to push
now uses exit status 1. This makes it possible to write shell
loops such as "while guilt push; do make test||break; done". Also,
"guilt pop" when no patches are applied also uses exit status 1.
(This aligns "guilt push" and "guilt pop" with how "hg qpush" and
"hg qpop" has worked for several years.)
Sounds fine.
- Changed behavior: by default, guilt no longer changes branch when
you push a patch. You need to do "git config guilt.reusebranch
false" to re-enable that. This patch sets the default value of
guilt.reusebranch to true; it should in my opinion change to false
a year or two after the next release.
Probably a fair thing to do. I should really make a release soon :/
I'm sending this off before I go through all the patches so you know that
I've seen this and plan to comment/pull. It'll probably take a bit to go
through all 28 :)
Thanks,
Jeff.
--
Ready; T=0.01/0.01 08:47:23
@@ -23,7 +23,7 @@ if ! must_commit_first; then fi disp "About to begin conversion..." >&2-disp "Current head: `cat $GIT_DIR/refs/heads/\`git_branch\``" >&2+disp "Current head: `cat \"$GIT_DIR\"/refs/heads/\`git_branch\``" >&2
I wonder if it'd be better to use 'git rev-parse' here instead of looking at
the refs directly.
IOW,
disp "Current head: `git rev-parse \`git_branch\``" >&2
Maybe even $() instead of the inner `` to clean it up some more.
Jeff.
quoted hunk
for rev in `git rev-list $rhash`; do
s=`git log --pretty=oneline -1 $rev | cut -c 42-`
@@ -46,7 +46,7 @@ for rev in `git rev-list $rhash`; do do_make_header $rev echo "" git diff --binary $rev^..$rev- ) > $GUILT_DIR/$branch/$fname+ ) > "$GUILT_DIR/$branch/$fname" # FIXME: grab the GIT_AUTHOR_DATE from the commit object and set the # timestamp on the patch
@@ -68,6 +68,6 @@ for rev in `git rev-list $rhash`; do done disp "Done." >&2-disp "Current head: `cat $GIT_DIR/refs/heads/\`git_branch\``" >&2+disp "Current head: `cat \"$GIT_DIR\"/refs/heads/\`git_branch\``" >&2 }
--
1.8.3.1
--
It used to be said [...] that AIX looks like one space alien discovered
Unix, and described it to another different space alien who then implemented
AIX. But their universal translators were broken and they'd had to gesture a
lot.
- Paul Tomblin
From: Jeff Sipek <hidden> Date: 2016-06-15 23:00:25
On Fri, Mar 21, 2014 at 08:31:44AM +0100, Per Cederqvist wrote:
quoted hunk
When extracting the patch, we only want the actual patches. We don't
want the "---" delimiter. Simplify the extraction by simply deleting
everything before the first "diff " line. (Use sed instead of awk to
simplify the code.)
Without this patch, "guilt fold" and "guilt push" sometimes fails if
guilt.diffstat is true.
Signed-off-by: Per Cederqvist <redacted>
---
guilt | 7 +------
1 file changed, 1 insertion(+), 6 deletions(-)
So, the thought behind this mess was to allow minimal patches to work. The
'diff' line is *not* required by patch(1)!
Is it a problem if a patch description contains a line that starts with
'diff '? (The current code has this issue as well.)
For the record, this ambiguity is what's on several occasions made me
consider splitting the header and the patch into separate files. Yeah, it'd
be messier. :/
}
# usage: do_get_header patchfile
--
1.8.3.1
--
Defenestration n. (formal or joc.):
The act of removing Windows from your computer in disgust, usually
followed by the installation of Linux or some other Unix-like operating
system.
@@ -23,7 +23,7 @@ if ! must_commit_first; then fi disp "About to begin conversion..." >&2-disp "Current head: `cat $GIT_DIR/refs/heads/\`git_branch\``" >&2+disp "Current head: `cat \"$GIT_DIR\"/refs/heads/\`git_branch\``" >&2
I wonder if it'd be better to use 'git rev-parse' here instead of looking at
the refs directly.
IOW,
disp "Current head: `git rev-parse \`git_branch\``" >&2
That is probably a good idea. I only made the minimum change
required to get the test suite to pass.
Maybe even $() instead of the inner `` to clean it up some more.
Yes, given that that construct is already used in several places
it is apparently portable enough for guilt. (I guess nobody uses
/bin/sh on Solaris to run guilt. It doesn't support the $(...)
construct.)
Jeff.
/ceder
quoted
for rev in `git rev-list $rhash`; do
s=`git log --pretty=oneline -1 $rev | cut -c 42-`
@@ -46,7 +46,7 @@ for rev in `git rev-list $rhash`; do do_make_header $rev echo "" git diff --binary $rev^..$rev- ) > $GUILT_DIR/$branch/$fname+ ) > "$GUILT_DIR/$branch/$fname" # FIXME: grab the GIT_AUTHOR_DATE from the commit object and set the # timestamp on the patch
@@ -68,6 +68,6 @@ for rev in `git rev-list $rhash`; do done disp "Done." >&2-disp "Current head: `cat $GIT_DIR/refs/heads/\`git_branch\``" >&2+disp "Current head: `cat \"$GIT_DIR\"/refs/heads/\`git_branch\``" >&2 }--
1.8.3.1
--
It used to be said [...] that AIX looks like one space alien discovered
Unix, and described it to another different space alien who then implemented
AIX. But their universal translators were broken and they'd had to gesture a
lot.
- Paul Tomblin
@@ -23,7 +23,7 @@ if ! must_commit_first; then fi disp "About to begin conversion..." >&2-disp "Current head: `cat $GIT_DIR/refs/heads/\`git_branch\``" >&2+disp "Current head: `cat \"$GIT_DIR\"/refs/heads/\`git_branch\``" >&2
I wonder if it'd be better to use 'git rev-parse' here instead of looking at
the refs directly.
IOW,
disp "Current head: `git rev-parse \`git_branch\``" >&2
That is probably a good idea. I only made the minimum change
required to get the test suite to pass.
I totally understand.
quoted
Maybe even $() instead of the inner `` to clean it up some more.
Yes, given that that construct is already used in several places
it is apparently portable enough for guilt. (I guess nobody uses
/bin/sh on Solaris to run guilt. It doesn't support the $(...)
construct.)
Hrm? I'm using OpenIndiana (OpenSolaris derivative) and my /bin/sh seems to
be a symlink to ksh93. What version of Solaris are you seeing this behavior
on?
Jeff.
--
The reasonable man adapts himself to the world; the unreasonable one
persists in trying to adapt the world to himself. Therefore all progress
depends on the unreasonable man.
- George Bernard Shaw
From: Per Cederqvist <hidden> Date: 2016-06-15 23:00:25
On Sun, Mar 23, 2014 at 6:09 PM, Jeff Sipek [off-list ref] wrote:
On Fri, Mar 21, 2014 at 08:31:44AM +0100, Per Cederqvist wrote:
quoted
When extracting the patch, we only want the actual patches. We don't
want the "---" delimiter. Simplify the extraction by simply deleting
everything before the first "diff " line. (Use sed instead of awk to
simplify the code.)
Without this patch, "guilt fold" and "guilt push" sometimes fails if
guilt.diffstat is true.
Signed-off-by: Per Cederqvist <redacted>
---
guilt | 7 +------
1 file changed, 1 insertion(+), 6 deletions(-)
So, the thought behind this mess was to allow minimal patches to work. The
'diff' line is *not* required by patch(1)!
I see. I can see that this is sometimes useful, even though I think
it is more important that guilt actually works with the patches itself
creates.
Is it a problem if a patch description contains a line that starts with
'diff '? (The current code has this issue as well.)
Yes.
For the record, this ambiguity is what's on several occasions made me
consider splitting the header and the patch into separate files. Yeah, it'd
be messier. :/
I really like having the header and the patches in the same file. I had
to solve a similar problem when I wrote my utility for diffing two diff
files (https://git.lysator.liu.se/pdiffdiff). Based on the experience I got
doing that, I propose this new do_get_patch function:
# usage: do_get_patch patchfile
do_get_patch()
{
awk '
BEGIN {
patchheader = ""
patch = 0
}
patch == 1 {
print $0
next
}
/^(diff |index |=|RCS file:|retrieving revision )/ {
patchheader = patchheader $0 "\n"
next
}
/^(--- |((new|deleted) file|old) mode )/ {
printf "%s", patchheader
-/^(diff |---$|--- )/ {patch = 1} print $0
patch = 1
}
{
patchheader = ""
}' < "$1"
}
The idea is to collect lines that *might* start the patch in
patchheader. Once we detect the start of the patch (via a
line that matches "--- " or any of the mode change lines)
we print the patcheader and the current line. If we get a
line that neither looks like a patchheader nor starts a patch,
we discard the patcheader. This is the case of a commit
message with a line that starts with "diff ".
The function above solves the issue with lines that
start with "diff " in the commit message. On the other
hand, it introduces the same issue for lines that start
with for instance "old mode ".
Actually, a smaller change that probably fixes the
issue with diffstat is to replace
/^(diff |---$|--- )/ {patch = 1}
witih
/^(diff |--- )/ {patch = 1}
as the problem with the original implementation is that
the "---\n" line that starts the diffstat should not start
the patch.
/ceder
quoted
}
# usage: do_get_header patchfile
--
1.8.3.1
--
Defenestration n. (formal or joc.):
The act of removing Windows from your computer in disgust, usually
followed by the installation of Linux or some other Unix-like operating
system.
@@ -23,7 +23,7 @@ if ! must_commit_first; then fi disp "About to begin conversion..." >&2-disp "Current head: `cat $GIT_DIR/refs/heads/\`git_branch\``" >&2+disp "Current head: `cat \"$GIT_DIR\"/refs/heads/\`git_branch\``" >&2
I wonder if it'd be better to use 'git rev-parse' here instead of looking at
the refs directly.
IOW,
disp "Current head: `git rev-parse \`git_branch\``" >&2
That is probably a good idea. I only made the minimum change
required to get the test suite to pass.
I totally understand.
quoted
quoted
Maybe even $() instead of the inner `` to clean it up some more.
Yes, given that that construct is already used in several places
it is apparently portable enough for guilt. (I guess nobody uses
/bin/sh on Solaris to run guilt. It doesn't support the $(...)
construct.)
Hrm? I'm using OpenIndiana (OpenSolaris derivative) and my /bin/sh seems to
be a symlink to ksh93. What version of Solaris are you seeing this behavior
on?
Solaris 10:
Last login: Sun Mar 23 20:53:28 2014 from c80-217-121-12.
Sun Microsystems Inc. SunOS 5.10 Generic January 2005
You have mail.
500 ceder@bacon> uname -a
SunOS bacon 5.10 Generic_147147-26 sun4u sparc SUNW,Sun-Fire-15000
501 ceder@bacon> /bin/sh
$ echo `id`
uid=105(ceder) gid=20105(ceder)
$ echo $(id)
syntax error: `(' unexpected
/bin/sh is a symlink to /sbin/sh.
On Solaris 10, you are supposed to use /usr/xpg4/bin/sh if you want
a competent standards-compliant shell. /bin/sh is provided as a very
backward-compatible shell.
Jeff.
/ceder
--
The reasonable man adapts himself to the world; the unreasonable one
persists in trying to adapt the world to himself. Therefore all progress
depends on the unreasonable man.
- George Bernard Shaw
Strictly speaking, git log isn't necessary since list_files prints the
hashes of each of the files as well as the refs for all the applied patches.
If anything mismatches, the hashes will catch it. I'm ok with keeping the
git log here as long as people can't mess up the formatting with git
config/etc.
...
Maybe make two helper functions.. one to make a patch with an empty message
and one to make a patch with a non-empty message. Then each of these blocks
would look a bit cleaner.
echo "%% empty + non-empty (diffstat=$using_diffstat)"
empty_patch empty
nonempty_patch non-empty
cmd guilt pop non-empty
cmd guilt fold non-empty
fixup_time_info empty
cmd list_files
cleanup empty
cmd list_files
cleanup()
{
guilt pop $1
guilt delete -f $1
}
Eh, it's not as clean as I thought it would be, but I think it's still a
bit better. Ok, how about:
for using_diffstat in true false ; do
for patcha in empty nonempty ; do
for patchb in empty nonempty ; do
echo "%% $patcha + $patchb (diffstat=$using_diffstat)"
${patcha}_patch $patcha
${patchb}_patch $patchb
cmd guilt pop $patchb
cmd guilt fold $patchb
fixup_time_info $patcha
cmd list_files
cleanup $patcha
cmd list_files
done
done
done
Aha! That's better, IMO.
Adding the non-empty diff is a matter of another loop, but I'm ok with just
testing the headers (for now) :)
Jeff.
--
I abhor a system designed for the "user", if that word is a coded pejorative
meaning "stupid and unsophisticated."
- Ken Thompson
From: Jeff Sipek <hidden> Date: 2016-06-15 23:01:01
On Sun, Mar 23, 2014 at 10:03:48PM +0100, Per Cederqvist wrote:
On Sun, Mar 23, 2014 at 6:09 PM, Jeff Sipek [off-list ref] wrote:
quoted
On Fri, Mar 21, 2014 at 08:31:44AM +0100, Per Cederqvist wrote:
quoted
When extracting the patch, we only want the actual patches. We don't
want the "---" delimiter. Simplify the extraction by simply deleting
everything before the first "diff " line. (Use sed instead of awk to
simplify the code.)
Without this patch, "guilt fold" and "guilt push" sometimes fails if
guilt.diffstat is true.
Hrm, I just did a test and guilt-push seems to work with a patch such as:
aoeuaoeu
this is
---
not a patch!
---
foo | 1 +
1 files changed, 1 insertions(+), 0 deletions(-)
So, the thought behind this mess was to allow minimal patches to work. The
'diff' line is *not* required by patch(1)!
I see. I can see that this is sometimes useful, even though I think
it is more important that guilt actually works with the patches itself
creates.
Fair enough. I'm convinced that we should assume that all patches start
with 'diff '.
...
I had to solve a similar problem when I wrote my utility for diffing two
diff files (https://git.lysator.liu.se/pdiffdiff). Based on the experience
I got doing that, I propose this new do_get_patch function:
...
The idea is to collect lines that *might* start the patch in
patchheader. Once we detect the start of the patch (via a
line that matches "--- " or any of the mode change lines)
we print the patcheader and the current line. If we get a
line that neither looks like a patchheader nor starts a patch,
we discard the patcheader. This is the case of a commit
message with a line that starts with "diff ".
The function above solves the issue with lines that
start with "diff " in the commit message. On the other
hand, it introduces the same issue for lines that start
with for instance "old mode ".
Hrm. I'm open to revisiting the get-patch/get-header functions to address
the ambiguity issues in the future.
Actually, a smaller change that probably fixes the
issue with diffstat is to replace
/^(diff |---$|--- )/ {patch = 1}
witih
/^(diff |--- )/ {patch = 1}
as the problem with the original implementation is that
the "---\n" line that starts the diffstat should not start
the patch.
(Thinking out loud...) I suppose there are three portions to a patch file...
(1) the description
(2) optional diffstat
(3) the patch
You just convinced me that the patch should start with '^diff '. Currently,
the diffstat begins with '^---$'. Sadly, the description can contain what
looks like the beginning of a diffstat or a patch. In the case of
do_get_patch, we're only interested in the patch, so we can just look for
'^diff ' (because garbage before the diff itself seems to be ignored by
git). (If we wanted to allow patches without the 'diff ' line, we'd need
'^(diff |--- )'.)
I feel like I'm missing something.
Jeff.
--
I'm somewhere between geek and normal.
- Linus Torvalds
@@ -23,7 +23,7 @@ if ! must_commit_first; then fi disp "About to begin conversion..." >&2-disp "Current head: `cat $GIT_DIR/refs/heads/\`git_branch\``" >&2+disp "Current head: `cat \"$GIT_DIR\"/refs/heads/\`git_branch\``" >&2
I wonder if it'd be better to use 'git rev-parse' here instead of looking at
the refs directly.
IOW,
disp "Current head: `git rev-parse \`git_branch\``" >&2
That is probably a good idea. I only made the minimum change
required to get the test suite to pass.
I totally understand.
quoted
quoted
Maybe even $() instead of the inner `` to clean it up some more.
Yes, given that that construct is already used in several places
it is apparently portable enough for guilt. (I guess nobody uses
/bin/sh on Solaris to run guilt. It doesn't support the $(...)
construct.)
Hrm? I'm using OpenIndiana (OpenSolaris derivative) and my /bin/sh seems to
be a symlink to ksh93. What version of Solaris are you seeing this behavior
on?
Solaris 10:
Last login: Sun Mar 23 20:53:28 2014 from c80-217-121-12.
Sun Microsystems Inc. SunOS 5.10 Generic January 2005
You have mail.
500 ceder@bacon> uname -a
SunOS bacon 5.10 Generic_147147-26 sun4u sparc SUNW,Sun-Fire-15000
501 ceder@bacon> /bin/sh
$ echo `id`
uid=105(ceder) gid=20105(ceder)
$ echo $(id)
syntax error: `(' unexpected
/bin/sh is a symlink to /sbin/sh.
On Solaris 10, you are supposed to use /usr/xpg4/bin/sh if you want
a competent standards-compliant shell. /bin/sh is provided as a very
backward-compatible shell.
Ok, I finally got back to this series...
I'd say let's use the nested ``.
Jeff.
--
Hegh QaQ law'
quvHa'ghach QaQ puS
From: Jeff Sipek <hidden> Date: 2016-06-15 23:01:01
Signed-off-by: Josef 'Jeff' Sipek <redacted>
On Fri, Mar 21, 2014 at 08:31:55AM +0100, Per Cederqvist wrote:
quoted hunk
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 <redacted>
---
guilt-graph | 10 ++++++++--
regression/t-033.out | 3 +++
regression/t-033.sh | 11 +++++++++++
3 files changed, 22 insertions(+), 2 deletions(-)
create mode 100644 regression/t-033.out
create mode 100755 regression/t-033.sh
From: Jeff Sipek <hidden> Date: 2016-06-15 23:01:01
Signed-off-by: Josef 'Jeff' Sipek <redacted>
On Fri, Mar 21, 2014 at 08:31:49AM +0100, Per Cederqvist wrote:
quoted hunk
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 <redacted>
---
regression/t-021.sh | 2 +-
regression/t-025.sh | 2 +-
regression/t-028.sh | 2 +-
3 files changed, 3 insertions(+), 3 deletions(-)
@@ -29,6 +29,6 @@ guilt series | while read n; docmdguiltheader$ndone-shouldfailguiltheadernon-existant2>&1+shouldfailguiltheadernon-existant# FIXME: how do we check that -e works?
--
1.8.3.1
--
Failure is not an option,
It comes bundled with your Microsoft product.
From: Jeff Sipek <hidden> Date: 2016-06-15 23:01:01
Signed-off-by: Josef 'Jeff' Sipek <redacted>
On Fri, Mar 21, 2014 at 08:31:56AM +0100, Per Cederqvist wrote:
quoted hunk
This fix relies on the fact that git branch names can not contain ":".
Signed-off-by: Per Cederqvist <redacted>
---
guilt-graph | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
From: Jeff Sipek <hidden> Date: 2016-06-15 23:01:01
On Fri, Mar 21, 2014 at 08:31:48AM +0100, Per Cederqvist wrote:
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 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.)
@@ -55,11 +55,16 @@ function run_test # run the test cd "$REPODIR" > /dev/null- "$REG_DIR/t-$1.sh" 2>&1 > "$LOGFILE"- ERR=$?+ if "$REG_DIR/t-$1.sh" 2>&1 > "$LOGFILE"+ then+ ERR=false+ else+ ERR=true
I'm going to comment on this here... Coding style. Guilt is a bit of a
hodge-podge of style as my personal style for shell changed over the years
and various contributors threw in some more. I need to get better at
spotting style mismatch during review. With that said, I have two comments
about the above:
(1) I'd put the 'then' on the same line as 'if' but I don't feel strongly
enough about this to reject this patch.
(2) Tabs for indentation. I do feel strongly about this one :)
Jeff.
From: Jeff Sipek <hidden> Date: 2016-06-15 23:01:01
On Fri, Mar 21, 2014 at 08:31:57AM +0100, Per Cederqvist wrote:
quoted hunk
git branch names can contain commas. Check that "guilt graph" works
even in that case.
Signed-off-by: Per Cederqvist <redacted>
---
regression/t-033.out | 62 ++++++++++++++++++++++++++++++++++++++++++++++++++++
regression/t-033.sh | 37 +++++++++++++++++++++++++++++++
2 files changed, 99 insertions(+)
@@ -3,9 +3,46 @@# Test the graph code#+functionfixup_time_info+{+cmdguiltpop+touch-a-m-t"$TOUCH_DATE"".git/patches/a,graph/$1"+cmdguiltpush+}+source"$REG_DIR/scaffold" cmdsetup_repo
A comment here to justify this seemingly useless guilt-graph call? Maybe
adding one of the '%%' lines between each section. Otherwise, this looks
good.
shouldfail guilt graph
+cmd git checkout -b a,graph master
+
+cmd guilt init
+
+cmd guilt new a.patch
+
+fixup_time_info a.patch
+cmd guilt graph
+
+cmd echo a >> file.txt
+cmd git add file.txt
+cmd guilt refresh
+fixup_time_info a.patch
+cmd guilt graph
+
+# An unrelated file. No deps.
+cmd guilt new b.patch
+cmd echo b >> file2.txt
+cmd git add file2.txt
+cmd guilt refresh
+fixup_time_info b.patch
+cmd guilt graph
+
+# An change to an old file. Should add a dependency.
+cmd guilt new c.patch
+cmd echo c >> file.txt
+cmd git add file.txt
+cmd guilt refresh
+fixup_time_info c.patch
+cmd guilt graph
--
1.8.3.1
--
It used to be said [...] that AIX looks like one space alien discovered
Unix, and described it to another different space alien who then implemented
AIX. But their universal translators were broken and they'd had to gesture a
lot.
- Paul Tomblin
Some of this filtering is getting a bit unwieldy. I'd add spaces around the
|. Do we want to be paranoid and add quotes around $pname? If not, then it
looks good.
@@ -46,3 +46,12 @@ cmd git add file.txt cmdguiltrefresh fixup_time_infoc.patch cmdguiltgraph++# A patch name that contains funky characters, including unbalanced+# quotes.+cmdguiltnew"a-\"better&quicker'-patch.patch"+cmdechod>>file.txt+cmdgitaddfile.txt+cmdguiltrefresh+fixup_time_info"a-\"better&quicker'-patch.patch"+cmdguiltgraph--
1.8.3.1
--
To unsubscribe from this list: send the line "unsubscribe git" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
--
All parts should go together without forcing. You must remember that the
parts you are reassembling were disassembled by you. Therefore, if you
can’t get them together again, there must be a reason. By all means, do not
use a hammer.
— IBM Manual, 1925
From: Jeff Sipek <hidden> Date: 2016-06-15 23:01:01
Signed-off-by: Josef 'Jeff' Sipek <redacted>
On Fri, Mar 21, 2014 at 08:31:59AM +0100, Per Cederqvist wrote:
quoted hunk
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 Cederqvist <redacted>
---
guilt-import-commit | 2 +-
regression/t-034.out | 2 ++
regression/t-034.sh | 2 ++
3 files changed, 5 insertions(+), 1 deletion(-)
@@ -26,7 +26,7 @@ disp "About to begin conversion..." >&2 disp "Current head: `cat \"$GIT_DIR\"/refs/heads/\`git_branch\``" >&2 for rev in `git rev-list $rhash`; do- s=`git log --pretty=oneline -1 $rev | cut -c 42-`+ s=`git log --no-decorate --pretty=oneline -1 $rev | cut -c 42-` # Try to convert the first line of the commit message to a # valid patch name.
@@ -232,6 +232,7 @@ Date: Mon Jan 1 00:00:00 2007 +0000 Signed-off-by: Commiter Name <commiter@email> % guilt init+% git config log.decorate short % guilt import-commit base..HEAD About to begin conversion... Current head: 2a8b1889aa5066193bac978e6bf5073ffcfa6541
@@ -259,6 +260,7 @@ Converting 45e81b51 as the_sequence_.lock-_is_forbidden Converting eebb76e9 as the_sequence_-._is_forbidden Done. Current head: d4850419ccc1146c7169f500725ce504b9774ed0+% git config log.decorate no % guilt push -a Applying patch..the_sequence_-._is_forbidden.patch Patch applied.
@@ -57,7 +57,9 @@ cmd git log# Import all the commits to guilt. cmdguiltinit+cmdgitconfiglog.decorateshort cmdguiltimport-commitbase..HEAD+cmdgitconfiglog.decoratenoforpatchin.git/patches/master/*.patchdo
--
1.8.3.1
--
Evolution, n.:
A hypothetical process whereby infinitely improbable events occur with
alarming frequency, order arises from chaos, and no one is given credit.
@@ -47,7 +47,7 @@ if [ $? -ne 0 ]; then fi # display the list of commits to be sent as patches-git log --pretty=oneline "$r" | cut -c 1-8,41- | $pager+git log --no-decorate --pretty=oneline "$r" | cut -c 1-8,41- | $pager _disp "Are these what you want to send? [Y/n] " read n
From: Per Cederqvist <hidden> Date: 2016-06-15 23:01:03
n Tue, May 6, 2014 at 9:08 PM, Jeff Sipek [off-list ref] wrote:
quoted hunk
On Sun, Mar 23, 2014 at 10:03:48PM +0100, Per Cederqvist wrote:
quoted
On Sun, Mar 23, 2014 at 6:09 PM, Jeff Sipek [off-list ref] wrote:
quoted
On Fri, Mar 21, 2014 at 08:31:44AM +0100, Per Cederqvist wrote:
quoted
When extracting the patch, we only want the actual patches. We don't
want the "---" delimiter. Simplify the extraction by simply deleting
everything before the first "diff " line. (Use sed instead of awk to
simplify the code.)
Without this patch, "guilt fold" and "guilt push" sometimes fails if
guilt.diffstat is true.
Hrm, I just did a test and guilt-push seems to work with a patch such as:
aoeuaoeu
this is
---
not a patch!
---
foo | 1 +
1 files changed, 1 insertions(+), 0 deletions(-)
This sequence breaks:
mkdir guiltdemo
cd guiltdemo
git init
git commit --allow-empty -mstart
guilt init
git config guilt.diffstat true
guilt new empty-1
guilt new empty-2
guilt pop
guilt fold empty-2
guilt pop
guilt push
That is, create two empty patches, fold them together, pop them, and try to push
the combined (still empty) patch.
The last command fails with:
Applying patch..empty-1
fatal: unrecognized input
To force apply this patch, use 'guilt push -f'
At this point, the patch series consists of a single patch, empty-1,
which contains
the five characters "-", "-", "-", newline, newline.
The 06 patch (Added test cases for "guilt fold".) contains a test case
for this issue.
Which opens a style issue. When you fix a bug, should you:
- commit the bug fix first and the test case later, so that "git bisect" always
finds commits where "make test" works, or
- commit the test case first, and the bug fix later, so that it is more obvious
that you are actually fixing a pre-existing bug, or
- commit the test case and the bug fix in the same commit?
In this series I have committed bug fixes first and test cases later, but
I'm not convinced that is the right thing to do.
So, the thought behind this mess was to allow minimal patches to work. The
'diff' line is *not* required by patch(1)!
I see. I can see that this is sometimes useful, even though I think
it is more important that guilt actually works with the patches itself
creates.
Fair enough. I'm convinced that we should assume that all patches start
with 'diff '.
...
quoted
I had to solve a similar problem when I wrote my utility for diffing two
diff files (https://git.lysator.liu.se/pdiffdiff). Based on the experience
I got doing that, I propose this new do_get_patch function:
...
quoted
The idea is to collect lines that *might* start the patch in
patchheader. Once we detect the start of the patch (via a
line that matches "--- " or any of the mode change lines)
we print the patcheader and the current line. If we get a
line that neither looks like a patchheader nor starts a patch,
we discard the patcheader. This is the case of a commit
message with a line that starts with "diff ".
The function above solves the issue with lines that
start with "diff " in the commit message. On the other
hand, it introduces the same issue for lines that start
with for instance "old mode ".
Hrm. I'm open to revisiting the get-patch/get-header functions to address
the ambiguity issues in the future.
Postponing that for the future seems like a good plan. I think
there are three possible ways to deal with the problem.
- Store the commit message, diffstat, and diffs in separate files.
I don't like this option, as it would make it a lot less convenient
to work with the patch files.
- Add a quoting mechanism, so that you need to write ">diff" or
">---" instead of just "diff" or "---" if you want to include those
characters at the start of the line in a commit message.
- Ignore the problem. This is what guilt has done in the past,
and I see no reason why it needs to change *in this patch series*.
quoted
Actually, a smaller change that probably fixes the
issue with diffstat is to replace
/^(diff |---$|--- )/ {patch = 1}
witih
/^(diff |--- )/ {patch = 1}
as the problem with the original implementation is that
the "---\n" line that starts the diffstat should not start
the patch.
(Thinking out loud...) I suppose there are three portions to a patch file...
(1) the description
(2) optional diffstat
(3) the patch
You just convinced me that the patch should start with '^diff '. Currently,
the diffstat begins with '^---$'. Sadly, the description can contain what
looks like the beginning of a diffstat or a patch. In the case of
do_get_patch, we're only interested in the patch, so we can just look for
'^diff ' (because garbage before the diff itself seems to be ignored by
git). (If we wanted to allow patches without the 'diff ' line, we'd need
'^(diff |--- )'.)
I feel like I'm missing something.
Jeff.
Today, I think the most reasonable thing to do is simply remove the
"---$". After all, we want the patch, not the diffstat + patch. So this
patch would look like this:
From: Per Cederqvist <hidden> Date: 2016-06-15 23:01:03
On Tue, May 6, 2014 at 9:40 PM, Jeff Sipek [off-list ref] wrote:
On Fri, Mar 21, 2014 at 08:31:45AM +0100, Per Cederqvist wrote:
quoted
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.)
I feel like we should have *some* content there - most of the time, I care
more about the diffs getting folded than the commit message :)
I added these tests for a reason: the reproduce a bug in guilt that I found.
I'm afraid that having some content might hide the bug I found. (I'm also
equally afraid that it might uncover other bugs in guilt, which would delay
integration of this patch series. So adding more test cases with content
is a good thing to do, but maybe not in this patch series.)
Strictly speaking, git log isn't necessary since list_files prints the
hashes of each of the files as well as the refs for all the applied patches.
If anything mismatches, the hashes will catch it. I'm ok with keeping the
git log here as long as people can't mess up the formatting with git
config/etc.
Having the patches included was very helpful while I developed the
test case, but your concern about messing up the formatting is valid.
I'll remove them.
I see these redirected echos... what are they for?
The intent was to create files with some content. I was under
the impression that the "guilt new" on the next line would
include the file, since I use the -f option. Now I see that
that is not the case, and I will remove these lines.
Maybe make two helper functions.. one to make a patch with an empty message
and one to make a patch with a non-empty message. Then each of these blocks
would look a bit cleaner.
echo "%% empty + non-empty (diffstat=$using_diffstat)"
empty_patch empty
nonempty_patch non-empty
cmd guilt pop non-empty
cmd guilt fold non-empty
fixup_time_info empty
cmd list_files
cleanup empty
cmd list_files
cleanup()
{
guilt pop $1
guilt delete -f $1
}
Eh, it's not as clean as I thought it would be, but I think it's still a
bit better. Ok, how about:
for using_diffstat in true false ; do
for patcha in empty nonempty ; do
for patchb in empty nonempty ; do
echo "%% $patcha + $patchb (diffstat=$using_diffstat)"
${patcha}_patch $patcha
${patchb}_patch $patchb
cmd guilt pop $patchb
cmd guilt fold $patchb
fixup_time_info $patcha
cmd list_files
cleanup $patcha
cmd list_files
done
done
done
Aha! That's better, IMO.
I'll try that and post a version 2 of the series. It might take a few
days, though.
Adding the non-empty diff is a matter of another loop, but I'm ok with just
testing the headers (for now) :)
Jeff.
From: Jeff Sipek <hidden> Date: 2016-06-15 23:01:03
On Wed, May 07, 2014 at 10:59:56PM +0200, Per Cederqvist wrote:
On Tue, May 6, 2014 at 9:40 PM, Jeff Sipek [off-list ref] wrote:
quoted
On Fri, Mar 21, 2014 at 08:31:45AM +0100, Per Cederqvist wrote:
quoted
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.)
I feel like we should have *some* content there - most of the time, I care
more about the diffs getting folded than the commit message :)
I added these tests for a reason: the reproduce a bug in guilt that I found.
I'm afraid that having some content might hide the bug I found. (I'm also
equally afraid that it might uncover other bugs in guilt, which would delay
integration of this patch series. So adding more test cases with content
is a good thing to do, but maybe not in this patch series.)
Fair enough. I use guilt-fold all the time and it hasn't lost any of my
diffs, so I'm happy to defer this until some point in the future.
...
quoted
for using_diffstat in true false ; do
for patcha in empty nonempty ; do
for patchb in empty nonempty ; do
echo "%% $patcha + $patchb (diffstat=$using_diffstat)"
${patcha}_patch $patcha
${patchb}_patch $patchb
cmd guilt pop $patchb
cmd guilt fold $patchb
fixup_time_info $patcha
cmd list_files
cleanup $patcha
cmd list_files
done
done
done
Aha! That's better, IMO.
I'll try that and post a version 2 of the series. It might take a few
days, though.
No problem. I'm still the slower one of the two of us. :/
Jeff.
--
Keyboard not found!
Press F1 to enter Setup
@@ -381,7 +381,6 @@ ccd56089d1b5305a9d35617cb7f6f4b06ffa68ba commit refs/patches/master/mode ffb7faa126a6d91bcdd44a494f76b96dd860b8b9 commit refs/patches/master/remove % guilt pop -a No patches applied.-ccd56089d1b5305a9d35617cb7f6f4b06ffa68ba % git checkout guilt/master Switched to branch "guilt/master" % guilt pop -a
From: Jeff Sipek <hidden> Date: 2016-06-15 23:01:03
On Fri, Mar 21, 2014 at 08:32:02AM +0100, Per Cederqvist wrote:
Only one invocation of "disp" or "_disp" actually needed backslash
processing. In quite a few instances, it was wrong to do backslash
processing, as the message contained data derived from the user.
Created the new function "disp_e" that should be used when backslash
processing is required, and changed "disp" and "disp_" to use printf
@@ -36,15 +36,24 @@ usage() exit 1 }-# echo -n is a bashism, use printf instead+# Print arguments, but no trailing newline.+# (echo -n is a bashism, use printf instead) _disp() {- printf "%b" "$*"+ printf "%s" "$*" }-# echo -e is a bashism, use printf instead+# Print arguments.+# (echo -E is a bashism, use printf instead) disp() {+ printf "%s\n" "$*"+}++# Print arguments, processing backslash sequences.+# (echo -e is a bashism, use printf instead)+disp_e()+{ printf "%b\n" "$*" }
From: Jeff Sipek <hidden> Date: 2016-06-15 23:01:03
On Fri, Mar 21, 2014 at 08:32:03AM +0100, Per Cederqvist wrote:
quoted hunk
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 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 <redacted>
---
guilt-push | 14 ++++-----
regression/t-020.out | 89 ++++++++++++++++++++++++++++++++++++++++++++++++++++
regression/t-020.sh | 13 +++++++-
3 files changed, 108 insertions(+), 8 deletions(-)
I don't think there's any other place in the repo that does this. Instead
you see a lot of if-then-fi. To keep it consistent, I'd suggest:
if [ -z "$patch" ] ; then
patch=1
num=t
fi
Ah, this took me a while to figure out. The above turns:
$ guilt push
into
$ guilt push -n 1
I'd throw in a comment.
(Note to self, this file is a huge mess and could use a bit of cleanup.)
quoted hunk
@@ -78,11 +79,6 @@ elif [ ! -z "$num" ]; then # clamp to minimum [ $tidx -lt $eidx ] && eidx=$tidx-elif [ -z "$patch" ]; then- # we are supposed to push only the next patch onto the stack-- eidx=`wc -l < "$applied"`- eidx=`expr $eidx + 1` else # we're supposed to push only up to a patch, make sure the patch is # in the series
@@ -109,7 +105,11 @@ if [ "$sidx" -gt "$eidx" ]; then else disp "File series fully applied, ends at patch `get_series | tail -n 1`" fi- exit 0+ if [ -n "$all" ]; then+ exit 0+ else+ exit 1+ fi
This changes the output on stdout. E.g.,
$ guilt pu
$ guilt pu -n 1
File series fully applied, ends at patch crashdump
With this patch, both will print the message. Right?
fi
get_series | sed -n -e "${sidx},${eidx}p" | while read p
From: Per Cederqvist <hidden> Date: 2016-06-15 23:01:03
On Wed, May 7, 2014 at 11:06 PM, Jeff Sipek [off-list ref] wrote:
On Wed, May 07, 2014 at 10:59:56PM +0200, Per Cederqvist wrote:
quoted
On Tue, May 6, 2014 at 9:40 PM, Jeff Sipek [off-list ref] wrote:
quoted
On Fri, Mar 21, 2014 at 08:31:45AM +0100, Per Cederqvist wrote:
quoted
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.)
I feel like we should have *some* content there - most of the time, I care
more about the diffs getting folded than the commit message :)
I added these tests for a reason: the reproduce a bug in guilt that I found.
I'm afraid that having some content might hide the bug I found. (I'm also
equally afraid that it might uncover other bugs in guilt, which would delay
integration of this patch series. So adding more test cases with content
is a good thing to do, but maybe not in this patch series.)
Fair enough. I use guilt-fold all the time and it hasn't lost any of my
diffs, so I'm happy to defer this until some point in the future.
...
quoted
quoted
for using_diffstat in true false ; do
for patcha in empty nonempty ; do
for patchb in empty nonempty ; do
echo "%% $patcha + $patchb (diffstat=$using_diffstat)"
${patcha}_patch $patcha
${patchb}_patch $patchb
cmd guilt pop $patchb
cmd guilt fold $patchb
fixup_time_info $patcha
cmd list_files
cleanup $patcha
cmd list_files
done
done
done
Aha! That's better, IMO.
I'll try that and post a version 2 of the series. It might take a few
days, though.
No problem. I'm still the slower one of the two of us. :/
Jeff.
There were a few details that made it a bit more complex than that,
but I think the end result was still an improvement.
The most obvious detail is that if you add two empty patches, you
cannot name them both "empty", so when $patcha and $patchb is the same
you have to add suffixes.
The other detail is that my tests used different commit messages when
both commits contained a message. I want to retain that behaviour, so
that added a few lines of complexity.
I'll post an updated patch series once I've gone through all your
comments. In the meantime, you can see my new implementation here:
http://repo.or.cz/w/guilt/ceder.git/commitdiff/3107dc73eaff020da18024c3b5f5f92b94d17852?hp=6df110c95133d6e557ce3dbcb6fd39bc797f877b#patch2
/ceder
From: Jeff Sipek <hidden> Date: 2016-06-15 23:01:03
On Thu, May 08, 2014 at 09:41:22PM +0200, Per Cederqvist wrote:
On Wed, May 7, 2014 at 11:06 PM, Jeff Sipek [off-list ref] wrote:
quoted
On Wed, May 07, 2014 at 10:59:56PM +0200, Per Cederqvist wrote:
quoted
On Tue, May 6, 2014 at 9:40 PM, Jeff Sipek [off-list ref] wrote:
quoted
On Fri, Mar 21, 2014 at 08:31:45AM +0100, Per Cederqvist wrote:
quoted
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.)
I feel like we should have *some* content there - most of the time, I care
more about the diffs getting folded than the commit message :)
I added these tests for a reason: the reproduce a bug in guilt that I found.
I'm afraid that having some content might hide the bug I found. (I'm also
equally afraid that it might uncover other bugs in guilt, which would delay
integration of this patch series. So adding more test cases with content
is a good thing to do, but maybe not in this patch series.)
Fair enough. I use guilt-fold all the time and it hasn't lost any of my
diffs, so I'm happy to defer this until some point in the future.
...
quoted
quoted
for using_diffstat in true false ; do
for patcha in empty nonempty ; do
for patchb in empty nonempty ; do
echo "%% $patcha + $patchb (diffstat=$using_diffstat)"
${patcha}_patch $patcha
${patchb}_patch $patchb
cmd guilt pop $patchb
cmd guilt fold $patchb
fixup_time_info $patcha
cmd list_files
cleanup $patcha
cmd list_files
done
done
done
Aha! That's better, IMO.
I'll try that and post a version 2 of the series. It might take a few
days, though.
No problem. I'm still the slower one of the two of us. :/
Jeff.
There were a few details that made it a bit more complex than that,
but I think the end result was still an improvement.
The devil's in the details :)
The most obvious detail is that if you add two empty patches, you
cannot name them both "empty", so when $patcha and $patchb is the same
you have to add suffixes.
The other detail is that my tests used different commit messages when
both commits contained a message. I want to retain that behaviour, so
that added a few lines of complexity.
I'll post an updated patch series once I've gone through all your
comments. In the meantime, you can see my new implementation here:
http://repo.or.cz/w/guilt/ceder.git/commitdiff/3107dc73eaff020da18024c3b5f5f92b94d17852?hp=6df110c95133d6e557ce3dbcb6fd39bc797f877b#patch2
Much better than the original, IMO.
Thanks,
Jeff.
--
We have joy, we have fun, we have Linux on a Sun...
Some of this filtering is getting a bit unwieldy. I'd add spaces around the
|. Do we want to be paranoid and add quotes around $pname? If not, then it
looks good.
Indeed. I wish I could think of a better way to do this. :-)
I'll add spaces, and quote $pname just to play safe.
/ceder
@@ -46,3 +46,12 @@ cmd git add file.txt cmdguiltrefresh fixup_time_infoc.patch cmdguiltgraph++# A patch name that contains funky characters, including unbalanced+# quotes.+cmdguiltnew"a-\"better&quicker'-patch.patch"+cmdechod>>file.txt+cmdgitaddfile.txt+cmdguiltrefresh+fixup_time_info"a-\"better&quicker'-patch.patch"+cmdguiltgraph--
1.8.3.1
--
To unsubscribe from this list: send the line "unsubscribe git" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
--
All parts should go together without forcing. You must remember that the
parts you are reassembling were disassembled by you. Therefore, if you
can’t get them together again, there must be a reason. By all means, do not
use a hammer.
— IBM Manual, 1925
From: Per Cederqvist <hidden> Date: 2016-06-15 23:01:03
On Thu, May 8, 2014 at 12:04 AM, Jeff Sipek [off-list ref] wrote:
On Fri, Mar 21, 2014 at 08:32:03AM +0100, Per Cederqvist wrote:
quoted
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 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 <redacted>
---
guilt-push | 14 ++++-----
regression/t-020.out | 89 ++++++++++++++++++++++++++++++++++++++++++++++++++++
regression/t-020.sh | 13 +++++++-
3 files changed, 108 insertions(+), 8 deletions(-)
I don't think there's any other place in the repo that does this. Instead
you see a lot of if-then-fi. To keep it consistent, I'd suggest:
if [ -z "$patch" ] ; then
patch=1
num=t
fi
Ok.
Ah, this took me a while to figure out. The above turns:
$ guilt push
into
$ guilt push -n 1
I'd throw in a comment.
Will do.
(Note to self, this file is a huge mess and could use a bit of cleanup.)
quoted
@@ -78,11 +79,6 @@ elif [ ! -z "$num" ]; then # clamp to minimum [ $tidx -lt $eidx ] && eidx=$tidx-elif [ -z "$patch" ]; then- # we are supposed to push only the next patch onto the stack-- eidx=`wc -l < "$applied"`- eidx=`expr $eidx + 1` else # we're supposed to push only up to a patch, make sure the patch is # in the series
@@ -109,7 +105,11 @@ if [ "$sidx" -gt "$eidx" ]; then else disp "File series fully applied, ends at patch `get_series | tail -n 1`" fi- exit 0+ if [ -n "$all" ]; then+ exit 0+ else+ exit 1+ fi
This changes the output on stdout. E.g.,
$ guilt pu
$ guilt pu -n 1
File series fully applied, ends at patch crashdump
With this patch, both will print the message. Right?
Yes. Personally, I think that is a good change. It feels
strange that "guilt push" silently does nothing when
there is no patch to apply.
/ceder
quoted
fi
get_series | sed -n -e "${sidx},${eidx}p" | while read p
From: Jeff Sipek <hidden> Date: 2016-06-15 23:01:07
On Fri, Mar 21, 2014 at 08:31:57AM +0100, Per Cederqvist wrote:
quoted hunk
git branch names can contain commas. Check that "guilt graph" works
even in that case.
Signed-off-by: Per Cederqvist <redacted>
---
regression/t-033.out | 62 ++++++++++++++++++++++++++++++++++++++++++++++++++++
regression/t-033.sh | 37 +++++++++++++++++++++++++++++++
2 files changed, 99 insertions(+)
@@ -3,9 +3,46 @@# Test the graph code#+functionfixup_time_info+{+cmdguiltpop+touch-a-m-t"$TOUCH_DATE"".git/patches/a,graph/$1"+cmdguiltpush+}+source"$REG_DIR/scaffold" cmdsetup_repo
A comment here to justify this seemingly useless guilt-graph call? Maybe
adding one of the '%%' lines between each section. Otherwise, this looks
good.
shouldfail guilt graph
+cmd git checkout -b a,graph master
+
+cmd guilt init
+
+cmd guilt new a.patch
+
+fixup_time_info a.patch
+cmd guilt graph
+
+cmd echo a >> file.txt
+cmd git add file.txt
+cmd guilt refresh
+fixup_time_info a.patch
+cmd guilt graph
+
+# An unrelated file. No deps.
+cmd guilt new b.patch
+cmd echo b >> file2.txt
+cmd git add file2.txt
+cmd guilt refresh
+fixup_time_info b.patch
+cmd guilt graph
+
+# An change to an old file. Should add a dependency.
+cmd guilt new c.patch
+cmd echo c >> file.txt
+cmd git add file.txt
+cmd guilt refresh
+fixup_time_info c.patch
+cmd guilt graph
--
1.8.3.1
From: Jeff Sipek <hidden> Date: 2016-06-15 23:01:08
Sorry, I accidentally replied to the v1 of this patch...
On Tue, May 13, 2014 at 05:33:21PM -0400, Jeff Sipek wrote:
On Fri, Mar 21, 2014 at 08:31:57AM +0100, Per Cederqvist wrote:
quoted
git branch names can contain commas. Check that "guilt graph" works
even in that case.
Signed-off-by: Per Cederqvist <redacted>
---
regression/t-033.out | 62 ++++++++++++++++++++++++++++++++++++++++++++++++++++
regression/t-033.sh | 37 +++++++++++++++++++++++++++++++
2 files changed, 99 insertions(+)
@@ -3,9 +3,46 @@# Test the graph code#+functionfixup_time_info+{+cmdguiltpop+touch-a-m-t"$TOUCH_DATE"".git/patches/a,graph/$1"+cmdguiltpush+}+source"$REG_DIR/scaffold" cmdsetup_repo
A comment here to justify this seemingly useless guilt-graph call? Maybe
adding one of the '%%' lines between each section. Otherwise, this looks
good.
quoted
shouldfail guilt graph
+cmd git checkout -b a,graph master
+
+cmd guilt init
+
+cmd guilt new a.patch
+
+fixup_time_info a.patch
+cmd guilt graph
+
+cmd echo a >> file.txt
+cmd git add file.txt
+cmd guilt refresh
+fixup_time_info a.patch
+cmd guilt graph
+
+# An unrelated file. No deps.
+cmd guilt new b.patch
+cmd echo b >> file2.txt
+cmd git add file2.txt
+cmd guilt refresh
+fixup_time_info b.patch
+cmd guilt graph
+
+# An change to an old file. Should add a dependency.
+cmd guilt new c.patch
+cmd echo c >> file.txt
+cmd git add file.txt
+cmd guilt refresh
+fixup_time_info c.patch
+cmd guilt graph
--
1.8.3.1
--
Ready; T=0.01/0.01 17:32:39
--
C is quirky, flawed, and an enormous success.
- Dennis M. Ritchie.