Skip to content

Commit afda065

Browse files
committed
Correctly sync generated files with source
* Correct use of variable with two file names * Correctly use variable with two file names Introduced in 23721cd as a fix to a shellcheck warning. * Include fullstops in list * Clarify export command * Update examples * Fix typo in e.g. Issue: #58
1 parent 5afcd1d commit afda065

File tree

5 files changed

+41
-45
lines changed

5 files changed

+41
-45
lines changed

README.md

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -136,7 +136,7 @@ You use _git issue_ with the following sub-commands.
136136

137137
The command can read, add/remove or edit any of the issue's attributes.
138138
Some potentially useful scripts to be used with this command are in the scripts/ directory.
139-
Remember to inspect the results (e.g `gi git diff`) and commit them with `gi git commit -a`.
139+
Remember to inspect the results (e.g. `gi git diff`) and commit them with `gi git commit -a`.
140140

141141
### Synchronize with remote repositories
142142
* `git issue push`: Update remote Git repository with local changes.
@@ -152,11 +152,11 @@ You use _git issue_ with the following sub-commands.
152152
In case the repository is part of a GitLab group, specify repository as groupname/reponame.
153153
* `git issue create`: Create the issue in the provided GitHub repository.
154154
With the `-e` option any escape sequences for the attributes present in the description, will be replaced as above.
155-
This can be used to e.g export an unsupported attribute to GitHub as text.
156-
* `git issue export`: Export issues for the specified project.
155+
This can be used to e.g. export an unsupported attribute to GitHub as text.
156+
* `git issue export`: Export modified issues for the specified project.
157157
Only the issues that have been imported and modified (or created by `git issue create`) by `git-issue` will be exported.
158158
With the `-e` option any escape sequences for the attributes present in the description, will be replaced as above.
159-
This can be used to e.g export an unsupported attribute to GitHub as text.
159+
This can be used to e.g. export an unsupported attribute to GitHub as text.
160160
* `git issue exportall`: Export all open issues in the database (`-a` to include closed ones) to GitHub/GitLab. Useful for cloning whole repositories.
161161

162162
### Help and debug
@@ -497,14 +497,14 @@ Edited comment d72c68d
497497

498498
```
499499
$ git issue export github dspinellis git-issue-test-issues # Needs a token with the relevant permissions
500-
Issue b83d92872dc16440402516a5f4ce1b8cc6436344 hasn't been modified, skipping...
501-
Comment a93764f32179e93493ceb0a7060efce1e980aff1 hasn't been modified, skipping...
500+
Issue b83d92872dc16440402516a5f4ce1b8cc6436344 not modified, skipping...
501+
Comment a93764f32179e93493ceb0a7060efce1e980aff1 not modified, skipping...
502502
Exporting issue 9179d381135273220301f175c03b101b3e9c703d as #15
503-
Issue 3651dd38e4e1d9dbce66649710324235c773fe78 hasn't been modified, skipping...
503+
Issue 3651dd38e4e1d9dbce66649710324235c773fe78 not modified, skipping...
504504
Updating comment d72c68d0177b500a91ea37548e6594f84457fd5b...
505-
Comment 6966d4d718c80cf8635e9276d6f391de70c22f93 hasn't been modified, skipping...
506-
Comment 85293a6904d0fbd6238fbb2e1c36fc65af9ffc60 hasn't been modified, skipping...
507-
Comment aea83723c0414ff135afcfb5165d64f8a7ad687c hasn't been modified, skipping...
505+
Comment 6966d4d718c80cf8635e9276d6f391de70c22f93 not modified, skipping...
506+
Comment 85293a6904d0fbd6238fbb2e1c36fc65af9ffc60 not modified, skipping...
507+
Comment aea83723c0414ff135afcfb5165d64f8a7ad687c not modified, skipping...
508508
```
509509

510510
### Sub-command auto-completion

git-issue.1

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -208,7 +208,7 @@ Create the issue in the provided GitHub repository.
208208
.PP
209209
\fBgit issue export\fP
210210
.RS 4
211-
Export issues for the specified project.
211+
Export modified issues for the specified project.
212212
Only the issues that have been imported and modified (or created by \fCgit issue create\fP) by \fCgit-issue\fP will be exported.
213213
With the \fC-e\fP option any escape sequences for the attributes present in the description, will be replaced as above.
214214
This can be used to e.g. export an unsupported attribute to GitHub as text.
@@ -673,7 +673,6 @@ $ git issue show [Tab]
673673
7dfa5b7 - An issue entered from the editor
674674
e6a95c9 - New issue entered from the command line
675675

676-
677676
.SH SEE ALSO
678677
.BR git ( 1 ),
679678
<\fIhttps://github\.com/dspinellis/git\-issue\fR>

git-issue.sh

Lines changed: 26 additions & 26 deletions
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@
2727
# User agent string
2828
# shellcheck disable=SC2034
2929
# SC2034 : USER_AGENT appears unused. Verify use (or export if used externally)
30-
USER_AGENT=https://github.com/dspinellis/git-issue/tree/ea66152
30+
USER_AGENT=https://github.com/dspinellis/git-issue/tree/e643025
3131

3232
# Determine our script library path
3333
my_IFS=$IFS
@@ -1376,44 +1376,44 @@ usage: git issue <command> [<args>]
13761376
The following commands are available:
13771377
13781378
Start an issue repository
1379-
clone Clone the specified remote repository
1380-
init Create a new issues repository in the current directory
1379+
clone Clone the specified remote repository.
1380+
init Create a new issues repository in the current directory.
13811381
13821382
Work with an issue
1383-
new Create a new open issue (with optional -s summary and -c "provider user repo" for github/gitlab export)
1384-
show Show specified issue (and its comments with -c)
1385-
comment Add an issue comment
1383+
new Create a new open issue (with optional -s summary and -c "provider user repo" for github/gitlab export).
1384+
show Show specified issue (and its comments with -c).
1385+
comment Add an issue comment.
13861386
edit Edit the specified issue's (or comment's with -c) description
1387-
tag Add (or remove with -r) a tag
1388-
milestone Specify (or remove with -r) the issue's milestone
1389-
weight Specify (or remove with -r) the issue's weight
1390-
duedate Specify (or remove with -r) the issue's due date
1391-
* timeestimate: Specify (or remove with -r) a time estimate for this issue
1392-
timespent Specify (or remove with -r) the time spent working on an issue so far
1393-
assign Assign (or remove -r) an issue to a person
1394-
attach Attach (or remove with -r) a file to an issue
1395-
watcher Add (or remove with -r) an issue watcher
1387+
tag Add (or remove with -r) a tag.
1388+
milestone Specify (or remove with -r) the issue's milestone.
1389+
weight Specify (or remove with -r) the issue's weight.
1390+
duedate Specify (or remove with -r) the issue's due date.
1391+
* timeestimate: Specify (or remove with -r) a time estimate for this issue.
1392+
timespent Specify (or remove with -r) the time spent working on an issue so far.
1393+
assign Assign (or remove -r) an issue to a person.
1394+
attach Attach (or remove with -r) a file to an issue.
1395+
watcher Add (or remove with -r) an issue watcher.
13961396
close Remove the open tag, add the closed tag
13971397
13981398
Show multiple issues
1399-
list List open issues (or all with -a)
1400-
* list -l formatstring: This will list issues in the specified format, given as an argument to -l
1399+
list List open issues (or all with -a).
1400+
* list -l formatstring: This will list issues in the specified format, given as an argument to -l.
14011401
14021402
Work with multiple issues
1403-
* filter-apply command: Run command in every issue directory The following environment variables will be set:
1403+
* filter-apply command: Run command in every issue directory. The following environment variables will be set:
14041404
14051405
Synchronize with remote repositories
1406-
push Update remote Git repository with local changes
1407-
pull Update local Git repository with remote changes
1408-
import Import/update GitHub/GitLab issues from the specified project
1409-
create Create the issue in the provided GitHub repository
1410-
export Export modified issues for the specified project
1411-
exportall Export all open issues in the database (-a to include closed ones) to GitHub/GitLab. Useful for cloning whole repositories
1406+
push Update remote Git repository with local changes.
1407+
pull Update local Git repository with remote changes.
1408+
import Import/update GitHub/GitLab issues from the specified project.
1409+
create Create the issue in the provided GitHub repository.
1410+
export Export modified issues for the specified project.
1411+
exportall Export all open issues in the database (-a to include closed ones) to GitHub/GitLab. Useful for cloning whole repositories.
14121412
14131413
Help and debug
1414-
help Display help information about git issue
1414+
help Display help information about git issue.
14151415
log Output a log of changes made
1416-
git Run the specified Git command on the issues repository
1416+
git Run the specified Git command on the issues repository.
14171417
USAGE_EOF
14181418
}
14191419

sync-docs.sh

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -46,8 +46,6 @@ MAN_PAGE=git-issue.1
4646
s/git issue //g
4747
# Remove code markup
4848
s/`//g
49-
# Remove fullstops
50-
s/\.//g
5149
# Format commands, depending on length
5250
s/^\* ([^:]{3}): / \1 /g
5351
s/^\* ([^:]{4}): / \1 /g

test.sh

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -185,21 +185,20 @@ GIT_ISSUE_LIB_PATH="$(pwd)/lib"
185185
export GIT_ISSUE_LIB_PATH
186186

187187
start sync-docs
188-
GenFiles="git-issue.sh git-issue.1"
188+
GenFiles='git-issue.sh git-issue.1'
189189
if ! git diff --quiet HEAD ; then
190190
fail "Uncommitted files sync-docs test skipped and pending"
191191
else
192192
sh sync-docs.sh --no-user-agent
193-
Status=$(git status --porcelain -- "$GenFiles")
193+
Status=$(git status --porcelain -- $GenFiles)
194194
if [ -z "$Status" ]; then
195195
ok "make sync-docs left $GenFiles as committed"
196196
else
197197
fail "make sync-docs changed $GenFiles"
198-
git diff -- "$GenFiles" >>"$TopDir/error.log"
199-
git checkout -- "$GenFiles"
198+
git diff -- $GenFiles >>"$TopDir/error.log"
199+
git checkout -- $GenFiles
200200
fi
201201
fi
202-
203202
cd "$TopDir"
204203

205204
mkdir testdir

0 commit comments

Comments
 (0)