Project

General

Profile

Feature #7080

git-pbchk could evolve automatic parent branch selection

Added by Richard PALO over 3 years ago. Updated about 2 years ago.

Status:
Feedback
Priority:
Normal
Assignee:
-
Category:
-
Start date:
2016-06-08
Due date:
% Done:

0%

Estimated time:
Difficulty:
Medium
Tags:
needs-triage

Description

Outside of unnecessary branch iterations when choosing a parent branch,
pbchk could make use of environment variables to allow automating use of it.

If this branch tracks a remote branch, return the remote branch which is tracked.

Otherwise find and compare the url of each remote to PBCHK_PARENT_URL,
or to 'git://github.com/illumos/illumos-gate' if not defined.

If no match, default to PBCHK_PARENT or 'origin/master' if not defined.

No change if '-b <branch-name>' is specified.

Example uses:

richard@omnis:/home/richard/src/illumos-gate$ git pbchk

Current branch: test_tracked
Choosing tracked parent: upstream/master

richard@omnis:/home/richard/src/illumos-gate$ git pbchk

Current branch: pbchk1
Remotes available:
     illumos-core => git://github.com/gdamore/illumos-core.git
   illumos-joyent => git://github.com/joyent/illumos-joyent
   illumos-omnios => git://github.com/omniti-labs/illumos-omnios.git
           origin => ssh://git@github.com/risto3/illumos-gate
         upstream => git://github.com/illumos/illumos-gate
Choosing 'upstream/master' as parent.

Comments:
These comments are not valid bugs:
  inform branch info git-pbchk


richard@omnis:/home/richard/src/illumos-gate$ PBCHK_PARENT_URL=none git pbchk

Current branch: pbchk1
Remotes available:
     illumos-core => git://github.com/gdamore/illumos-core.git
   illumos-joyent => git://github.com/joyent/illumos-joyent
   illumos-omnios => git://github.com/omniti-labs/illumos-omnios.git
           origin => ssh://git@github.com/risto3/illumos-gate
         upstream => git://github.com/illumos/illumos-gate
Choosing 'origin/master' as default parent.

Comments:
These comments are not valid bugs:
  inform branch info git-pbchk


richard@omnis:/home/richard/src/illumos-gate$ PBCHK_PARENT_URL=git://github.com/joyent/illumos-joyent git pbchk

Current branch: pbchk1
Remotes available:
     illumos-core => git://github.com/gdamore/illumos-core.git
   illumos-joyent => git://github.com/joyent/illumos-joyent
   illumos-omnios => git://github.com/omniti-labs/illumos-omnios.git
           origin => ssh://git@github.com/risto3/illumos-gate
         upstream => git://github.com/illumos/illumos-gate
Choosing 'illumos-joyent/master' as parent.

Comments:
These comments are not valid bugs:
  inform branch info git-pbchk

Copyrights:
usr/src/lib/libc/port/threads/pthr_barrier.c: no copyright claim for current year found
usr/src/lib/libc/port/threads/pthr_mutex.c: no copyright claim for current year found
usr/src/lib/libc/port/threads/pthr_cond.c: no copyright claim for current year found
usr/src/lib/libc/port/threads/pthr_rwlock.c: no copyright claim for current year found


Files

0001-7080-git-pbchk-could-evolve-automatic-parent-branch-.patch (4.02 KB) 0001-7080-git-pbchk-could-evolve-automatic-parent-branch-.patch update patchset to use PBCHK_BRANCH + updated manpage Richard PALO, 2016-06-09 05:57 AM

History

#1

Updated by Richard PALO over 3 years ago

  • File 0001-7080-git-pbchk-could-evolve-automatic-parent-branch-.patch added
#2

Updated by Richard PALO over 3 years ago

  • File deleted (0001-inform-branch-info-git-pbchk.patch)
#3

Updated by Richard PALO over 3 years ago

  • File 0001-7080-git-pbchk-could-evolve-automatic-parent-branch-.patch added
#4

Updated by Richard PALO over 3 years ago

  • File deleted (0001-7080-git-pbchk-could-evolve-automatic-parent-branch-.patch)
#5

Updated by Richard PALO over 3 years ago

  • File 0001-7080-git-pbchk-could-evolve-automatic-parent-branch-.patch added
OPTIONS
       -b branch:

              Compare the current workspace to 'branch' for the purposes of
              generating file and comment lists.

              If this option is not specified an attempt is made to determine
              this automatically for 'tracking' branches.

              If no branch is specified and none can be determined
              automatically then the value of the environment variable
              'PBCHK_BRANCH' is used, if defined, or origin/master if not.

#6

Updated by Richard PALO over 3 years ago

  • File deleted (0001-7080-git-pbchk-could-evolve-automatic-parent-branch-.patch)
#8

Updated by Richard PALO over 3 years ago

  • File deleted (0001-7080-git-pbchk-could-evolve-automatic-parent-branch-.patch)
#9

Updated by Yuri Pankov about 2 years ago

  • Status changed from New to Feedback

Is this the same as #5167?

Also available in: Atom PDF