Administrator
|
As per common Git workflow, I named an issue branch "port/mac-pharo-7". When
trying to load via: Metacello new baseline: 'VLC'; repository: 'github://seandenigris/Pharo-LibVLC:port/mac-pharo-7'; onConflict: [ :ex | ex allow ]; load. I got: NotFound: Revspec 'port' not found.. Bug? ----- Cheers, Sean -- Sent from: http://forum.world.st/Pharo-Smalltalk-Developers-f1294837.html
Cheers,
Sean |
Even from the command line I find slashes in branch names problematic, because slashes are as a "remote/branch" separator incites confusion about what is being referenced. Other have different problems... "slashes can cause problems. Because branches are implemented as paths, you cannot have a branch named "foo" and another branch named "foo/bar". This can be confusing for new users." "I'm going to start a campaign to never use slashes in git branch naming. The reason for this is that if on a CI for example, you want to refer to the branch name when packaging code for example, you want to refer to the name of the branch when building a URI or PATH (for example), perhaps building a URI in a bash script; you will have trouble building the URI due to the slash adding a URL part. Yes its possible to replace the slash but it is going to take me to much time to sort out." "If you use '/' is branch names you can create path conflicts. I've seen it happen and it took me a day to debug and figure out. There is some code checking for path conflicts in the git source but it's not invoked via all code paths that create branches. I recommend against using slashes in branch names unless you know what you are doing. For example: $ git branch fireos $ git branch fireos/feature-branch error: unable to create directory for .git/refs/heads/fireos/feature-branch fatal: Failed to lock ref for update: No such file or directory This happens because creating 'fireos' branch stores the sha1 in file .git/refs/heads/fireos. But if you later want to create branch 'fireos/feature-branch', git needs to store the sha1 in .git/refs/heads/fireos/feature-branch. This is impossible because 'fireos' is a file and cannot be a directory. Path conflict. It gets even uglier when you don't discover those conflicts until a pull or push. cheers -ben On Tue, 14 Jan 2020 at 07:45, Sean P. DeNigris <[hidden email]> wrote: As per common Git workflow, I named an issue branch "port/mac-pharo-7". When |
On Tue, Jan 14, 2020 at 12:35:27PM +0800, Ben Coman wrote:
> Even from the command line I find slashes in branch names problematic, > because slashes are as a "remote/branch" separator incites confusion about > what is being referenced. > > Other have different problems... The VM's shell scripts have problem with slashes in branch names too. I use underscore in place of slash. Pierce |
Administrator
|
In reply to this post by Ben Coman
Ben Coman wrote
> I find slashes in branch names problematic Okay, you've convinced me. How do we guide people toward that policy? A warning when creating such branches? At minimum we should change the ghost text from Iceberg's branch creation dialog, which suggests "feature/what" as a branch template! ----- Cheers, Sean -- Sent from: http://forum.world.st/Pharo-Smalltalk-Developers-f1294837.html
Cheers,
Sean |
On Tue, 14 Jan 2020 at 21:26, Sean P. DeNigris <[hidden email]> wrote:
> > Ben Coman wrote > > I find slashes in branch names problematic > > Okay, you've convinced me. How do we guide people toward that policy? > A warning when creating such branches? That sounds reasonable. Perhaps a discrete warning icon/button appears that opens a Help Subject that describes that slashes are supported, but warns of a few potential pitfalls. cheers -ben |
Hi all,
Iceberg supports branches named with slashes. It can pull, push, merge, checkout… IIRC, what does not properly work is metacello support regarding it, because the parser of metacello urls may consider those extra “url path elements” part of the directory to fetch the project. Guille > El 14 ene 2020, a las 18:33, Ben Coman <[hidden email]> escribió: > > On Tue, 14 Jan 2020 at 21:26, Sean P. DeNigris <[hidden email]> wrote: >> >> Ben Coman wrote >>> I find slashes in branch names problematic >> >> Okay, you've convinced me. How do we guide people toward that policy? >> A warning when creating such branches? > > That sounds reasonable. Perhaps a discrete warning icon/button appears > that opens a Help Subject > that describes that slashes are supported, but warns of a few > potential pitfalls. > > cheers -ben > |
In reply to this post by Ben Coman
While that may be true, I'd like to note that git-flow [1], one of the most widely used Git workflows, uses slashes in its default conventions.
Bernhard [1] https://github.com/petervanderdoes/gitflow-avh > Am 14.01.2020 um 05:35 schrieb Ben Coman <[hidden email]>: > > Even from the command line I find slashes in branch names problematic, > because slashes are as a "remote/branch" separator incites confusion about what is being referenced. > > Other have different problems... > > https://stackoverflow.com/questions/273695/what-are-some-examples-of-commonly-used-practices-for-naming-git-branches > "slashes can cause problems. Because branches are implemented as paths, > you cannot have a branch named "foo" and another branch named "foo/bar". This can be confusing for new users." > > "I'm going to start a campaign to never use slashes in git branch naming. The reason for this is that if on a CI for example, > you want to refer to the branch name when packaging code for example, you want to refer to the name of the branch > when building a URI or PATH (for example), perhaps building a URI in a bash script; you will have trouble building the URI due > to the slash adding a URL part. Yes its possible to replace the slash but it is going to take me to much time to sort out." > > > https://news.ycombinator.com/item?id=8872683 > "If you use '/' is branch names you can create path conflicts. I've seen it happen and it took me a day to debug and figure out. > There is some code checking for path conflicts in the git source but it's not invoked via all code paths that create branches. > I recommend against using slashes in branch names unless you know what you are doing. > For example: > $ git branch fireos > $ git branch fireos/feature-branch > error: unable to create directory for .git/refs/heads/fireos/feature-branch > fatal: Failed to lock ref for update: No such file or directory > This happens because creating 'fireos' branch stores the sha1 in file .git/refs/heads/fireos. > But if you later want to create branch 'fireos/feature-branch', git needs to store the sha1 in .git/refs/heads/fireos/feature-branch. > This is impossible because 'fireos' is a file and cannot be a directory. Path conflict. > > It gets even uglier when you don't discover those conflicts until a pull or push. > > cheers -ben > > > > > > > On Tue, 14 Jan 2020 at 07:45, Sean P. DeNigris <[hidden email]> wrote: > As per common Git workflow, I named an issue branch "port/mac-pharo-7". When > trying to load via: > Metacello new > baseline: 'VLC'; > repository: 'github://seandenigris/Pharo-LibVLC:port/mac-pharo-7'; > onConflict: [ :ex | ex allow ]; > load. > > I got: NotFound: Revspec 'port' not found.. > > Bug? > > > > ----- > Cheers, > Sean > -- > Sent from: http://forum.world.st/Pharo-Smalltalk-Developers-f1294837.html > |
Free forum by Nabble | Edit this page |