Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
L
liblongpath-rsync
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
liblongpath
liblongpath-rsync
Commits
016ce715
Commit
016ce715
authored
Mar 19, 2011
by
Wayne Davison
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Make it possible to create a new patch file while on a patch branch.
parent
2792a83d
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
11 additions
and
8 deletions
+11
-8
git-status.pl
packaging/git-status.pl
+9
-6
patch-update
packaging/patch-update
+2
-2
No files found.
packaging/git-status.pl
View file @
016ce715
...
...
@@ -6,25 +6,28 @@ sub check_git_state
my
(
$master_branch
,
$fatal_unless_clean
,
$check_patches_dir
)
=
@_
;
my
(
$cur_branch
)
=
check_git_status
(
$fatal_unless_clean
);
if
(
$cur_branch
ne
$master_branch
)
{
(
my
$branch
=
$cur_branch
)
=~
s{^patch/([^/]+)/[^/]+$}{$1}
;
# change patch/BRANCH/PATCH_NAME into BRANCH
if
(
$branch
ne
$master_branch
)
{
print
"The checkout is not on the $master_branch branch.\n"
;
exit
1
if
$master_branch
ne
'master'
;
print
"Do you want me to continue with --branch=$
cur_
branch? [n] "
;
print
"Do you want me to continue with --branch=$branch? [n] "
;
$_
=
<
STDIN
>
;
exit
1
unless
/^y/i
;
$_
[
0
]
=
$master_branch
=
$
cur_
branch
;
# Updates caller's $master_branch too.
$_
[
0
]
=
$master_branch
=
$branch
;
# Updates caller's $master_branch too.
}
if
(
$check_patches_dir
&&
-
d
'patches/.git'
)
{
(
$
cur_
branch
)
=
check_git_status
(
$fatal_unless_clean
,
'patches'
);
if
(
$
cur_
branch
ne
$master_branch
)
{
print
"The *patches* checkout is on branch $
cur_
branch, not branch $master_branch.\n"
;
(
$branch
)
=
check_git_status
(
$fatal_unless_clean
,
'patches'
);
if
(
$branch
ne
$master_branch
)
{
print
"The *patches* checkout is on branch $branch, not branch $master_branch.\n"
;
print
"Do you want to change it to branch $master_branch? [n] "
;
$_
=
<
STDIN
>
;
exit
1
unless
/^y/i
;
system
"cd patches && git checkout '$master_branch'"
;
}
}
return
$cur_branch
;
}
sub
check_git_status
...
...
packaging/patch-update
View file @
016ce715
...
...
@@ -32,7 +32,7 @@ die "No '$patches_dir' directory was found.\n" unless -d $patches_dir;
die
"No '.git' directory present in the current dir.\n"
unless
-
d
'.git'
;
require
'packaging/git-status.pl'
;
check_git_state
(
$master_branch
,
!
$skip_branch_check
,
1
);
my
$starting_branch
=
check_git_state
(
$master_branch
,
!
$skip_branch_check
,
1
);
my
$master_commit
;
open
PIPE
,
'-|'
,
"git log -1 --no-color $master_branch"
or
die
$!
;
...
...
@@ -124,7 +124,7 @@ if ($incl_generated_files) {
}
sleep 1 while $last_touch >= time;
system "
git
checkout
$
master
_branch
" and exit 1;
system "
git
checkout
$
starting
_branch
" and exit 1;
exit;
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment